This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Alphabetise perldiag
[perl5.git] / pod / perldiag.pod
CommitLineData
a0d0e21e
LW
1=head1 NAME
2
3perldiag - various Perl diagnostics
4
5=head1 DESCRIPTION
6
7These messages are classified as follows (listed in increasing order of
8desperation):
9
10 (W) A warning (optional).
d1d15184 11 (D) A deprecation (enabled by default).
00eb3f2b 12 (S) A severe warning (enabled by default).
a0d0e21e
LW
13 (F) A fatal error (trappable).
14 (P) An internal error you should never see (trappable).
54310121 15 (X) A very fatal error (nontrappable).
cb1a09d0 16 (A) An alien error message (not generated by Perl).
a0d0e21e 17
75b44862 18The majority of messages from the first three classifications above
64977eb6 19(W, D & S) can be controlled using the C<warnings> pragma.
e476b1b5
GS
20
21If a message can be controlled by the C<warnings> pragma, its warning
22category is included with the classification letter in the description
466416ed 23below. E.g. C<(W closed)> means a warning in the C<closed> category.
e476b1b5
GS
24
25Optional warnings are enabled by using the C<warnings> pragma or the B<-w>
fa816bf3 26and B<-W> switches. Warnings may be captured by setting C<$SIG{__WARN__}>
e476b1b5
GS
27to a reference to a routine that will be called on each warning instead
28of printing it. See L<perlvar>.
29
b7eceb5b 30Severe warnings are always enabled, unless they are explicitly disabled
e476b1b5 31with the C<warnings> pragma or the B<-X> switch.
4438c4b7 32
748a9306 33Trappable errors may be trapped using the eval operator. See
4438c4b7
JH
34L<perlfunc/eval>. In almost all cases, warnings may be selectively
35disabled or promoted to fatal errors using the C<warnings> pragma.
36See L<warnings>.
a0d0e21e 37
6df41af2
GS
38The messages are in alphabetical order, without regard to upper or
39lower-case. Some of these messages are generic. Spots that vary are
40denoted with a %s or other printf-style escape. These escapes are
41ignored by the alphabetical order, as are all characters other than
42letters. To look up your message, just ignore anything that is not a
43letter.
a0d0e21e
LW
44
45=over 4
46
6df41af2 47=item accept() on closed socket %s
33633739 48
be771a83
GS
49(W closed) You tried to do an accept on a closed socket. Did you forget
50to check the return value of your socket() call? See
51L<perlfunc/accept>.
33633739 52
de42a5a9 53=item Allocation too large: %x
a0d0e21e 54
6df41af2 55(X) You can't allocate more than 64K on an MS-DOS machine.
a0d0e21e 56
04f74579 57=item '%c' allowed only after types %s in %s
ef54e1a4 58
1109a392
MHM
59(F) The modifiers '!', '<' and '>' are allowed in pack() or unpack() only
60after certain types. See L<perlfunc/pack>.
ef54e1a4 61
6df41af2 62=item Ambiguous call resolved as CORE::%s(), qualify as such or use &
43192e07 63
75b44862 64(W ambiguous) A subroutine you have declared has the same name as a Perl
be771a83
GS
65keyword, and you have used the name without qualification for calling
66one or the other. Perl decided to call the builtin because the
67subroutine is not imported.
43192e07 68
6df41af2
GS
69To force interpretation as a subroutine call, either put an ampersand
70before the subroutine name, or qualify the name with its package.
71Alternatively, you can import the subroutine (or pretend that it's
72imported with the C<use subs> pragma).
43192e07 73
6df41af2 74To silently interpret it as the Perl operator, use the C<CORE::> prefix
496a33f5 75on the operator (e.g. C<CORE::log($x)>) or declare the subroutine
be771a83
GS
76to be an object method (see L<perlsub/"Subroutine Attributes"> or
77L<attributes>).
43192e07 78
c2e66d9e
GS
79=item Ambiguous range in transliteration operator
80
81(F) You wrote something like C<tr/a-z-0//> which doesn't mean anything at
82all. To include a C<-> character in a transliteration, put it either
83first or last. (In the past, C<tr/a-z-0//> was synonymous with
84C<tr/a-y//>, which was probably not what you would have expected.)
85
6df41af2 86=item Ambiguous use of %s resolved as %s
43192e07 87
7c7af292 88(S ambiguous) You said something that may not be interpreted the way
6df41af2
GS
89you thought. Normally it's pretty easy to disambiguate it by supplying
90a missing quote, operator, parenthesis pair or declaration.
a0d0e21e 91
d8225693
JM
92=item Ambiguous use of %c resolved as operator %c
93
7c7af292 94(S ambiguous) C<%>, C<&>, and C<*> are both infix operators (modulus,
3303f755
FC
95bitwise and, and multiplication) I<and> initial special characters
96(denoting hashes, subroutines and typeglobs), and you said something
97like C<*foo * foo> that might be interpreted as either of them. We
98assumed you meant the infix operator, but please try to make it more
99clear -- in the example given, you might write C<*foo * foo()> if you
100really meant to multiply a glob by the result of calling a function.
d8225693 101
1ef43bca
JM
102=item Ambiguous use of %c{%s} resolved to %c%s
103
104(W ambiguous) You wrote something like C<@{foo}>, which might be
105asking for the variable C<@foo>, or it might be calling a function
106named foo, and dereferencing it as an array reference. If you wanted
1cecf2c0 107the variable, you can just write C<@foo>. If you wanted to call the
1ef43bca
JM
108function, write C<@{foo()}> ... or you could just not have a variable
109and a function with the same name, and save yourself a lot of trouble.
110
e850844c
FC
111=item Ambiguous use of %c{%s[...]} resolved to %c%s[...]
112
113=item Ambiguous use of %c{%s{...}} resolved to %c%s{...}
4da60377 114
fa816bf3
FC
115(W ambiguous) You wrote something like C<${foo[2]}> (where foo represents
116the name of a Perl keyword), which might be looking for element number
1172 of the array named C<@foo>, in which case please write C<$foo[2]>, or you
118might have meant to pass an anonymous arrayref to the function named
119foo, and then do a scalar deref on the value it returns. If you meant
120that, write C<${foo([2])}>.
ccaaf480
FC
121
122In regular expressions, the C<${foo[2]}> syntax is sometimes necessary
123to disambiguate between array subscripts and character classes.
fa816bf3
FC
124C</$length[2345]/>, for instance, will be interpreted as C<$length> followed
125by the character class C<[2345]>. If an array subscript is what you
126want, you can avoid the warning by changing C</${length[2345]}/> to the
127unsightly C</${\$length[2345]}/>, by renaming your array to something
128that does not coincide with a built-in keyword, or by simply turning
129off warnings with C<no warnings 'ambiguous';>.
4da60377 130
bdac9d71 131=item Ambiguous use of -%s resolved as -&%s()
397d0f13 132
7c7af292 133(S ambiguous) You wrote something like C<-foo>, which might be the
a7f6e211
FC
134string C<"-foo">, or a call to the function C<foo>, negated. If you meant
135the string, just write C<"-foo">. If you meant the function call,
397d0f13
JM
136write C<-foo()>.
137
6df41af2 138=item '|' and '<' may not both be specified on command line
a0d0e21e 139
be771a83
GS
140(F) An error peculiar to VMS. Perl does its own command line
141redirection, and found that STDIN was a pipe, and that you also tried to
142redirect STDIN using '<'. Only one STDIN stream to a customer, please.
c9f97d15 143
6df41af2 144=item '|' and '>' may not both be specified on command line
1028017a 145
be771a83
GS
146(F) An error peculiar to VMS. Perl does its own command line
147redirection, and thinks you tried to redirect stdout both to a file and
148into a pipe to another command. You need to choose one or the other,
149though nothing's stopping you from piping into a program or Perl script
150which 'splits' output into two streams, such as
1028017a 151
6df41af2
GS
152 open(OUT,">$ARGV[0]") or die "Can't write to $ARGV[0]: $!";
153 while (<STDIN>) {
154 print;
155 print OUT;
156 }
157 close OUT;
c9f97d15 158
6df41af2 159=item Applying %s to %s will act on scalar(%s)
eb6e2d6f 160
496a33f5
SC
161(W misc) The pattern match (C<//>), substitution (C<s///>), and
162transliteration (C<tr///>) operators work on scalar values. If you apply
be771a83 163one of them to an array or a hash, it will convert the array or hash to
ac036724 164a scalar value (the length of an array, or the population info of a
165hash) and then work on that scalar value. This is probably not what
be771a83
GS
166you meant to do. See L<perlfunc/grep> and L<perlfunc/map> for
167alternatives.
eb6e2d6f 168
6df41af2 169=item Arg too short for msgsnd
76cd736e 170
6df41af2 171(F) msgsnd() requires a string at least as long as sizeof(long).
76cd736e 172
b0fdf69e 173=item %s argument is not a HASH or ARRAY element or a subroutine
a0d0e21e 174
cc1c2e42
FC
175(F) The argument to exists() must be a hash or array element or a
176subroutine with an ampersand, such as:
a0d0e21e
LW
177
178 $foo{$bar}
cb4f522a 179 $ref->{"susie"}[12]
cc1c2e42 180 &do_something
a0d0e21e 181
8ea97a1e 182=item %s argument is not a HASH or ARRAY element or slice
5f05dabc 183
06e52bfa
FC
184(F) The argument to delete() must be either a hash or array element,
185such as:
5f05dabc
PP
186
187 $foo{$bar}
cb4f522a 188 $ref->{"susie"}[12]
5f05dabc 189
8ea97a1e 190or a hash or array slice, such as:
5f05dabc 191
6df41af2
GS
192 @foo[$bar, $baz, $xyzzy]
193 @{$ref->[12]}{"susie", "queue"}
5315574d 194
6df41af2 195=item %s argument is not a subroutine name
a0d0e21e 196
6df41af2 197(F) The argument to exists() for C<exists &sub> must be a subroutine
be771a83
GS
198name, and not a subroutine call. C<exists &sub()> will generate this
199error.
a0d0e21e 200
f86702cc 201=item Argument "%s" isn't numeric%s
a0d0e21e 202
be771a83
GS
203(W numeric) The indicated string was fed as an argument to an operator
204that expected a numeric value instead. If you're fortunate the message
205will identify which operator was so unfortunate.
a0d0e21e 206
b4581f09
JH
207=item Argument list not closed for PerlIO layer "%s"
208
a534ac11
FC
209(W layer) When pushing a layer with arguments onto the Perl I/O
210system you forgot the ) that closes the argument list. (Layers
211take care of transforming data between external and internal
212representations.) Perl stopped parsing the layer list at this
213point and did not attempt to push this layer. If your program
214didn't explicitly request the failing operation, it may be the
215result of the value of the environment variable PERLIO.
b4581f09 216
10565108
FC
217=item Argument "%s" treated as 0 in increment (++)
218
219(W numeric) The indicated string was fed as an argument to the C<++>
220operator which expects either a number or a string matching
221C</^[a-zA-Z]*[0-9]*\z/>. See L<perlop/Auto-increment and
222Auto-decrement> for details.
223
a0d0e21e
LW
224=item Array @%s missing the @ in argument %d of %s()
225
75b44862
GS
226(D deprecated) Really old Perl let you omit the @ on array names in some
227spots. This is now heavily deprecated.
a0d0e21e 228
bd299e29
KW
229=item A sequence of multiple spaces in a charnames alias definition is deprecated
230
94ec3a20
FC
231(D deprecated) You defined a character name which had multiple space
232characters in a row. Change them to single spaces. Usually these
233names are defined in the C<:alias> import argument to C<use charnames>, but
234they could be defined by a translator installed into C<$^H{charnames}>.
235See L<charnames/CUSTOM ALIASES>.
bd299e29 236
a0d0e21e
LW
237=item assertion botched: %s
238
21b5e840 239(X) The malloc package that comes with Perl had an internal failure.
a0d0e21e
LW
240
241=item Assertion failed: file "%s"
242
21b5e840 243(X) A general assertion failed. The file in question must be examined.
a0d0e21e 244
82122228
FC
245=item Assigning non-zero to $[ is no longer possible
246
7d345e3d
FC
247(F) When the "array_base" feature is disabled (e.g., under C<use v5.16;>)
248the special variable C<$[>, which is deprecated, is now a fixed zero value.
82122228 249
a0d0e21e
LW
250=item Assignment to both a list and a scalar
251
252(F) If you assign to a conditional operator, the 2nd and 3rd arguments
253must either both be scalars or both be lists. Otherwise Perl won't
254know which context to supply to the right side.
255
96ebfdd7
RK
256=item A thread exited while %d threads were running
257
b92a77e8
FC
258(W threads)(S) When using threaded Perl, a thread (not necessarily
259the main thread) exited while there were still other threads running.
111a855e
FC
260Usually it's a good idea first to collect the return values of the
261created threads by joining them, and only then to exit from the main
96ebfdd7
RK
262thread. See L<threads>.
263
2393f1b9 264=item Attempt to access disallowed key '%s' in a restricted hash
1b1f1335 265
49293501 266(F) The failing code has attempted to get or set a key which is not in
2393f1b9 267the current set of allowed keys of a restricted hash.
49293501 268
dcdfe746
FC
269=item Attempt to bless into a freed package
270
271(F) You wrote C<bless $foo> with one argument after somehow causing
272the current package to be freed. Perl cannot figure out what to
273do, so it throws up in hands in despair.
274
81689caa
HS
275=item Attempt to bless into a reference
276
277(F) The CLASSNAME argument to the bless() operator is expected to be
57dedab9 278the name of the package to bless the resulting object into. You've
81689caa
HS
279supplied instead a reference to something: perhaps you wrote
280
281 bless $self, $proto;
282
283when you intended
284
285 bless $self, ref($proto) || $proto;
286
287If you actually want to bless into the stringified version
288of the reference supplied, you need to stringify it yourself, for
289example by:
290
291 bless $self, "$proto";
292
a730510a
FC
293=item Attempt to clear deleted array
294
295(S debugging) An array was assigned to when it was being freed.
296Freed values are not supposed to be visible to Perl code. This
297can also happen if XS code calls C<av_clear> from a custom magic
298callback on the array.
299
96ebfdd7
RK
300=item Attempt to delete disallowed key '%s' from a restricted hash
301
302(F) The failing code attempted to delete from a restricted hash a key
303which is not in its key set.
304
305=item Attempt to delete readonly key '%s' from a restricted hash
306
307(F) The failing code attempted to delete a key whose value has been
308declared readonly from a restricted hash.
309
de42a5a9 310=item Attempt to free non-arena SV: 0x%x
a0d0e21e 311
f84fe999 312(S internal) All SV objects are supposed to be allocated from arenas
be771a83
GS
313that will be garbage collected on exit. An SV was discovered to be
314outside any of those arenas.
a0d0e21e 315
12578ffb 316=item Attempt to free nonexistent shared string '%s'%s
bbce6d69 317
f84fe999 318(S internal) Perl maintains a reference-counted internal table of
be771a83
GS
319strings to optimize the storage and access of hash keys and other
320strings. This indicates someone tried to decrement the reference count
321of a string that can no longer be found in the table.
bbce6d69 322
7d5b40b4 323=item Attempt to free temp prematurely: SV 0x%x
a0d0e21e 324
f84fe999 325(S debugging) Mortalized values are supposed to be freed by the
be771a83
GS
326free_tmps() routine. This indicates that something else is freeing the
327SV before the free_tmps() routine gets a chance, which means that the
328free_tmps() routine will be freeing an unreferenced scalar when it does
329try to free it.
a0d0e21e
LW
330
331=item Attempt to free unreferenced glob pointers
332
f84fe999 333(S internal) The reference counts got screwed up on symbol aliases.
a0d0e21e 334
7d5b40b4 335=item Attempt to free unreferenced scalar: SV 0x%x
a0d0e21e 336
8f7e4d2c 337(S internal) Perl went to decrement the reference count of a scalar to
be771a83
GS
338see if it would go to 0, and discovered that it had already gone to 0
339earlier, and should have been freed, and in fact, probably was freed.
340This could indicate that SvREFCNT_dec() was called too many times, or
341that SvREFCNT_inc() was called too few times, or that the SV was
342mortalized when it shouldn't have been, or that memory has been
343corrupted.
a0d0e21e 344
dcdda58d
GS
345=item Attempt to join self
346
347(F) You tried to join a thread from within itself, which is an
be771a83
GS
348impossible task. You may be joining the wrong thread, or you may need
349to move the join() to some other thread.
dcdda58d 350
84902520
TB
351=item Attempt to pack pointer to temporary value
352
be771a83
GS
353(W pack) You tried to pass a temporary value (like the result of a
354function, or a computed expression) to the "p" pack() template. This
355means the result contains a pointer to a location that could become
356invalid anytime, even before the end of the current statement. Use
357literals or global values as arguments to the "p" pack() template to
358avoid this warning.
84902520 359
087b5369
RD
360=item Attempt to reload %s aborted.
361
362(F) You tried to load a file with C<use> or C<require> that failed to
363compile once already. Perl will not try to compile this file again
364unless you delete its entry from %INC. See L<perlfunc/require> and
365L<perlvar/%INC>.
366
1b20cd17
NC
367=item Attempt to set length of freed array
368
0c5c527f
FC
369(W misc) You tried to set the length of an array which has
370been freed. You can do this by storing a reference to the
371scalar representing the last index of an array and later
372assigning through that reference. For example
1b20cd17
NC
373
374 $r = do {my @a; \$#a};
375 $$r = 503
376
b7a902f4
PP
377=item Attempt to use reference as lvalue in substr
378
be771a83
GS
379(W substr) You supplied a reference as the first argument to substr()
380used as an lvalue, which is pretty strange. Perhaps you forgot to
381dereference it first. See L<perlfunc/substr>.
b7a902f4 382
c32124fe
NC
383=item Attribute "locked" is deprecated
384
57dedab9
FC
385(D deprecated) You have used the attributes pragma to modify the
386"locked" attribute on a code reference. The :locked attribute is
387obsolete, has had no effect since 5005 threads were removed, and
388will be removed in a future release of Perl 5.
c32124fe 389
f1a3ce43
NC
390=item Attribute "unique" is deprecated
391
57dedab9
FC
392(D deprecated) You have used the attributes pragma to modify
393the "unique" attribute on an array, hash or scalar reference.
394The :unique attribute has had no effect since Perl 5.8.8, and
395will be removed in a future release of Perl 5.
f1a3ce43 396
ccce04a4
FC
397=item av_reify called on tied array
398
399(S debugging) This indicates that something went wrong and Perl got I<very>
400confused about C<@_> or C<@DB::args> being tied.
401
de42a5a9 402=item Bad arg length for %s, is %u, should be %d
a0d0e21e 403
be771a83
GS
404(F) You passed a buffer of the wrong size to one of msgctl(), semctl()
405or shmctl(). In C parlance, the correct sizes are, respectively,
5f05dabc 406S<sizeof(struct msqid_ds *)>, S<sizeof(struct semid_ds *)>, and
a0d0e21e
LW
407S<sizeof(struct shmid_ds *)>.
408
7a95317d
GS
409=item Bad evalled substitution pattern
410
496a33f5 411(F) You've used the C</e> switch to evaluate the replacement for a
7a95317d
GS
412substitution, but perl found a syntax error in the code to evaluate,
413most likely an unexpected right brace '}'.
414
a0d0e21e
LW
415=item Bad filehandle: %s
416
be771a83
GS
417(F) A symbol was passed to something wanting a filehandle, but the
418symbol has no filehandle associated with it. Perhaps you didn't do an
419open(), or did it in another package.
a0d0e21e
LW
420
421=item Bad free() ignored
422
be771a83 423(S malloc) An internal routine called free() on something that had never
fa816bf3 424been malloc()ed in the first place. Mandatory, but can be disabled by
9ea8bc6d 425setting environment variable C<PERL_BADFREE> to 0.
33c8a3fe 426
9ea8bc6d 427This message can be seen quite often with DB_File on systems with "hard"
6903afa2 428dynamic linking, like C<AIX> and C<OS/2>. It is a bug of C<Berkeley DB>
be771a83 429which is left unnoticed if C<DB> uses I<forgiving> system malloc().
a0d0e21e 430
aa689395
PP
431=item Bad hash
432
433(P) One of the internal hash routines was passed a null HV pointer.
434
6df41af2
GS
435=item Badly placed ()'s
436
437(A) You've accidentally run your script through B<csh> instead
438of Perl. Check the #! line, or manually feed your script into
439Perl yourself.
440
a7cb8dae 441=item Bad name after %s
a0d0e21e 442
be771a83
GS
443(F) You started to name a symbol by using a package prefix, and then
444didn't finish the symbol. In particular, you can't interpolate outside
445of quotes, so
a0d0e21e
LW
446
447 $var = 'myvar';
448 $sym = mypack::$var;
449
450is not the same as
451
452 $var = 'myvar';
453 $sym = "mypack::$var";
454
88e1f1a2
JV
455=item Bad plugin affecting keyword '%s'
456
457(F) An extension using the keyword plugin mechanism violated the
458plugin API.
459
4ad56ec9
IZ
460=item Bad realloc() ignored
461
6903afa2
FC
462(S malloc) An internal routine called realloc() on something that
463had never been malloc()ed in the first place. Mandatory, but can
464be disabled by setting the environment variable C<PERL_BADFREE> to 1.
4ad56ec9 465
a0d0e21e
LW
466=item Bad symbol for array
467
468(P) An internal request asked to add an array entry to something that
469wasn't a symbol table entry.
470
4df3f177
SP
471=item Bad symbol for dirhandle
472
473(P) An internal request asked to add a dirhandle entry to something
474that wasn't a symbol table entry.
475
a0d0e21e
LW
476=item Bad symbol for filehandle
477
be771a83
GS
478(P) An internal request asked to add a filehandle entry to something
479that wasn't a symbol table entry.
a0d0e21e
LW
480
481=item Bad symbol for hash
482
483(P) An internal request asked to add a hash entry to something that
484wasn't a symbol table entry.
485
34d09196
GS
486=item Bareword found in conditional
487
be771a83
GS
488(W bareword) The compiler found a bareword where it expected a
489conditional, which often indicates that an || or && was parsed as part
490of the last argument of the previous construct, for example:
34d09196
GS
491
492 open FOO || die;
493
be771a83
GS
494It may also indicate a misspelled constant that has been interpreted as
495a bareword:
34d09196
GS
496
497 use constant TYPO => 1;
498 if (TYOP) { print "foo" }
499
500The C<strict> pragma is useful in avoiding such errors.
501
6df41af2
GS
502=item Bareword "%s" not allowed while "strict subs" in use
503
504(F) With "strict subs" in use, a bareword is only allowed as a
be771a83
GS
505subroutine identifier, in curly brackets or to the left of the "=>"
506symbol. Perhaps you need to predeclare a subroutine?
6df41af2
GS
507
508=item Bareword "%s" refers to nonexistent package
509
be771a83
GS
510(W bareword) You used a qualified bareword of the form C<Foo::>, but the
511compiler saw no other uses of that namespace before that point. Perhaps
512you need to predeclare a package?
6df41af2 513
a0d0e21e
LW
514=item BEGIN failed--compilation aborted
515
be771a83
GS
516(F) An untrapped exception was raised while executing a BEGIN
517subroutine. Compilation stops immediately and the interpreter is
518exited.
a0d0e21e 519
68dc0745
PP
520=item BEGIN not safe after errors--compilation aborted
521
522(F) Perl found a C<BEGIN {}> subroutine (or a C<use> directive, which
be771a83
GS
523implies a C<BEGIN {}>) after one or more compilation errors had already
524occurred. Since the intended environment for the C<BEGIN {}> could not
525be guaranteed (due to the errors), and since subsequent code likely
526depends on its correct operation, Perl just gave up.
68dc0745 527
6df41af2
GS
528=item \1 better written as $1
529
be771a83
GS
530(W syntax) Outside of patterns, backreferences live on as variables.
531The use of backslashes is grandfathered on the right-hand side of a
532substitution, but stylistically it's better to use the variable form
533because other Perl programmers will expect it, and it works better if
534there are more than 9 backreferences.
6df41af2 535
252aa082
JH
536=item Binary number > 0b11111111111111111111111111111111 non-portable
537
e476b1b5 538(W portable) The binary number you specified is larger than 2**32-1
9e24b6e2
JH
539(4294967295) and therefore non-portable between systems. See
540L<perlport> for more on portability concerns.
252aa082 541
69282e91 542=item bind() on closed socket %s
a0d0e21e 543
be771a83
GS
544(W closed) You tried to do a bind on a closed socket. Did you forget to
545check the return value of your socket() call? See L<perlfunc/bind>.
a0d0e21e 546
c289d2f7
JH
547=item binmode() on closed filehandle %s
548
549(W unopened) You tried binmode() on a filehandle that was never opened.
4dcecea4 550Check your control flow and number of arguments.
c289d2f7 551
d7bb0749 552=item "\b{" is deprecated; use "\b\{" or "\b[{]" instead in regex; marked by <-- HERE in m/%s/
f866a7cd 553
d7bb0749 554=item "\B{" is deprecated; use "\B\{" or "\B[{]" instead in regex; marked by <-- HERE in m/%s/
f866a7cd 555
3c664d1a 556(D deprecated) Use of an unescaped "{" immediately following
a38411bc
FC
557a C<\b> or C<\B> is now deprecated so as to reserve its use for Perl
558itself in a future release. You can either precede the brace
559with a backslash, or enclose it in square brackets; the latter
560is the way to go if the pattern delimiters are C<{}>.
f866a7cd 561
c5a0f51a
JH
562=item Bit vector size > 32 non-portable
563
e476b1b5 564(W portable) Using bit vector sizes larger than 32 is non-portable.
c5a0f51a 565
043c750c 566=item Bizarre copy of %s
4633a7c4 567
be771a83 568(P) Perl detected an attempt to copy an internal value that is not
ab830aa0 569copiable.
4633a7c4 570
5a25739d
FC
571=item Bizarre SvTYPE [%d]
572
434f489b 573(P) When starting a new thread or returning values from a thread, Perl
5a25739d
FC
574encountered an invalid data type.
575
f675dbe5
CB
576=item Buffer overflow in prime_env_iter: %s
577
be771a83
GS
578(W internal) A warning peculiar to VMS. While Perl was preparing to
579iterate over %ENV, it encountered a logical name or symbol definition
580which was too long, so it was truncated to the string shown.
f675dbe5 581
a0d0e21e
LW
582=item Callback called exit
583
4929bf7b 584(F) A subroutine invoked from an external package via call_sv()
a0d0e21e
LW
585exited by calling exit.
586
6df41af2 587=item %s() called too early to check prototype
f675dbe5 588
be771a83
GS
589(W prototype) You've called a function that has a prototype before the
590parser saw a definition or declaration for it, and Perl could not check
591that the call conforms to the prototype. You need to either add an
592early prototype declaration for the subroutine in question, or move the
593subroutine definition ahead of the call to get proper prototype
594checking. Alternatively, if you are certain that you're calling the
595function correctly, you may put an ampersand before the name to avoid
596the warning. See L<perlsub>.
f675dbe5 597
49704364 598=item Cannot compress integer in pack
0258719b
NC
599
600(F) An argument to pack("w",...) was too large to compress. The BER
601compressed integer format can only be used with positive integers, and you
602attempted to compress Infinity or a very large number (> 1e308).
603See L<perlfunc/pack>.
604
49704364 605=item Cannot compress negative numbers in pack
0258719b
NC
606
607(F) An argument to pack("w",...) was negative. The BER compressed integer
608format can only be used with positive integers. See L<perlfunc/pack>.
609
5c1f4d79
NC
610=item Cannot convert a reference to %s to typeglob
611
6903afa2
FC
612(F) You manipulated Perl's symbol table directly, stored a reference
613in it, then tried to access that symbol via conventional Perl syntax.
614The access triggers Perl to autovivify that typeglob, but it there is
615no legal conversion from that type of reference to a typeglob.
5c1f4d79 616
4040665a 617=item Cannot copy to %s
ba2fdce6
NC
618
619(P) Perl detected an attempt to copy a value to an internal type that cannot
4dcecea4 620be directly assigned to.
ba2fdce6 621
b5d97229
RGS
622=item Cannot find encoding "%s"
623
624(S io) You tried to apply an encoding that did not exist to a filehandle,
625either with open() or binmode().
626
7355df7e
FC
627=item Cannot set tied @DB::args
628
629(F) C<caller> tried to set C<@DB::args>, but found it tied. Tying C<@DB::args>
630is not supported. (Before this error was added, it used to crash.)
631
ce65bc73
FC
632=item Cannot tie unreifiable array
633
634(P) You somehow managed to call C<tie> on an array that does not
635keep a reference count on its arguments and cannot be made to
636do so. Such arrays are not even supposed to be accessible to
637Perl code, but are only used internally.
638
96ebfdd7
RK
639=item Can only compress unsigned integers in pack
640
641(F) An argument to pack("w",...) was not an integer. The BER compressed
642integer format can only be used with positive integers, and you attempted
643to compress something else. See L<perlfunc/pack>.
644
a0d0e21e
LW
645=item Can't bless non-reference value
646
647(F) Only hard references may be blessed. This is how Perl "enforces"
648encapsulation of objects. See L<perlobj>.
649
dc57907a
RGS
650=item Can't "break" in a loop topicalizer
651
0d863452 652(F) You called C<break>, but you're in a C<foreach> block rather than
6903afa2 653a C<given> block. You probably meant to use C<next> or C<last>.
0d863452
RH
654
655=item Can't "break" outside a given block
dc57907a 656
0d863452
RH
657(F) You called C<break>, but you're not inside a C<given> block.
658
6df41af2
GS
659=item Can't call method "%s" on an undefined value
660
661(F) You used the syntax of a method call, but the slot filled by the
be771a83
GS
662object reference or package name contains an undefined value. Something
663like this will reproduce the error:
6df41af2
GS
664
665 $BADREF = undef;
666 process $BADREF 1,2,3;
667 $BADREF->process(1,2,3);
668
a0d0e21e
LW
669=item Can't call method "%s" on unblessed reference
670
54310121 671(F) A method call must know in what package it's supposed to run. It
be771a83
GS
672ordinarily finds this out from the object reference you supply, but you
673didn't supply an object reference in this case. A reference isn't an
674object reference until it has been blessed. See L<perlobj>.
a0d0e21e
LW
675
676=item Can't call method "%s" without a package or object reference
677
678(F) You used the syntax of a method call, but the slot filled by the
be771a83
GS
679object reference or package name contains an expression that returns a
680defined value which is neither an object reference nor a package name.
72b5445b
GS
681Something like this will reproduce the error:
682
683 $BADREF = 42;
684 process $BADREF 1,2,3;
685 $BADREF->process(1,2,3);
686
dfe378f1
FC
687=item Can't call mro_isa_changed_in() on anonymous symbol table
688
689(P) Perl got confused as to whether a hash was a plain hash or a
690symbol table hash when trying to update @ISA caches.
691
2bf7e7b2
FC
692=item Can't call mro_method_changed_in() on anonymous symbol table
693
694(F) An XS module tried to call C<mro_method_changed_in> on a hash that was
695not attached to the symbol table.
696
a0d0e21e
LW
697=item Can't chdir to %s
698
f703fc96 699(F) You called C<perl -x/foo/bar>, but F</foo/bar> is not a directory
a0d0e21e
LW
700that you can chdir to, possibly because it doesn't exist.
701
0545a864 702=item Can't check filesystem of script "%s" for nosuid
104d25b7 703
be771a83
GS
704(P) For some reason you can't check the filesystem of the script for
705nosuid.
104d25b7 706
22e74366 707=item Can't coerce %s to %s in %s
a0d0e21e
LW
708
709(F) Certain types of SVs, in particular real symbol table entries
55497cff 710(typeglobs), can't be forced to stop being what they are. So you can't
a0d0e21e
LW
711say things like:
712
713 *foo += 1;
714
715You CAN say
716
717 $foo = *foo;
718 $foo += 1;
719
720but then $foo no longer contains a glob.
721
0d863452 722=item Can't "continue" outside a when block
dc57907a 723
0d863452
RH
724(F) You called C<continue>, but you're not inside a C<when>
725or C<default> block.
726
a0d0e21e
LW
727=item Can't create pipe mailbox
728
be771a83
GS
729(P) An error peculiar to VMS. The process is suffering from exhausted
730quotas or other plumbing problems.
a0d0e21e 731
eb64745e
GS
732=item Can't declare %s in "%s"
733
30c282f6
NC
734(F) Only scalar, array, and hash variables may be declared as "my", "our" or
735"state" variables. They must have ordinary identifiers as names.
a0d0e21e 736
fc7debfb
FC
737=item Can't "default" outside a topicalizer
738
739(F) You have used a C<default> block that is neither inside a
740C<foreach> loop nor a C<given> block. (Note that this error is
741issued on exit from the C<default> block, so you won't get the
742error if you use an explicit C<continue>.)
743
6df41af2
GS
744=item Can't do inplace edit: %s is not a regular file
745
be771a83 746(S inplace) You tried to use the B<-i> switch on a special file, such as
df7075a8 747a file in /dev, a FIFO or an uneditable directory. The file was ignored.
6df41af2 748
a0d0e21e
LW
749=item Can't do inplace edit on %s: %s
750
be771a83
GS
751(S inplace) The creation of the new file failed for the indicated
752reason.
a0d0e21e 753
54310121 754=item Can't do inplace edit without backup
a0d0e21e 755
be771a83
GS
756(F) You're on a system such as MS-DOS that gets confused if you try
757reading from a deleted (but still opened) file. You have to say
758C<-i.bak>, or some such.
a0d0e21e 759
10f9c03d 760=item Can't do inplace edit: %s would not be unique
a0d0e21e 761
e476b1b5 762(S inplace) Your filesystem does not support filenames longer than 14
10f9c03d
CK
763characters and Perl was unable to create a unique filename during
764inplace editing with the B<-i> switch. The file was ignored.
a0d0e21e 765
a0d0e21e
LW
766=item Can't do waitpid with flags
767
be771a83
GS
768(F) This machine doesn't have either waitpid() or wait4(), so only
769waitpid() without flags is emulated.
a0d0e21e 770
a0d0e21e
LW
771=item Can't emulate -%s on #! line
772
be771a83
GS
773(F) The #! line specifies a switch that doesn't make sense at this
774point. For example, it'd be kind of silly to put a B<-x> on the #!
775line.
a0d0e21e 776
1109a392
MHM
777=item Can't %s %s-endian %ss on this platform
778
779(F) Your platform's byte-order is neither big-endian nor little-endian,
780or it has a very strange pointer size. Packing and unpacking big- or
781little-endian floating point values and pointers may not be possible.
782See L<perlfunc/pack>.
783
a0d0e21e
LW
784=item Can't exec "%s": %s
785
d1be9408 786(W exec) A system(), exec(), or piped open call could not execute the
be771a83
GS
787named program for the indicated reason. Typical reasons include: the
788permissions were wrong on the file, the file wasn't found in
789C<$ENV{PATH}>, the executable in question was compiled for another
790architecture, or the #! line in a script points to an interpreter that
791can't be run for similar reasons. (Or maybe your system doesn't support
792#! at all.)
a0d0e21e
LW
793
794=item Can't exec %s
795
be771a83
GS
796(F) Perl was trying to execute the indicated program for you because
797that's what the #! line said. If that's not what you wanted, you may
798need to mention "perl" on the #! line somewhere.
a0d0e21e
LW
799
800=item Can't execute %s
801
be771a83
GS
802(F) You used the B<-S> switch, but the copies of the script to execute
803found in the PATH did not have correct permissions.
2a92aaa0 804
6df41af2 805=item Can't find an opnumber for "%s"
2a92aaa0 806
be771a83
GS
807(F) A string of a form C<CORE::word> was given to prototype(), but there
808is no builtin with the name C<word>.
6df41af2 809
56ca2fc0
JH
810=item Can't find %s character property "%s"
811
812(F) You used C<\p{}> or C<\P{}> but the character property by that name
6903afa2 813could not be found. Maybe you misspelled the name of the property?
e1b711da 814See L<perluniprops/Properties accessible through \p{} and \P{}>
9b73678d 815for a complete list of available official properties.
56ca2fc0 816
6df41af2
GS
817=item Can't find label %s
818
be771a83
GS
819(F) You said to goto a label that isn't mentioned anywhere that it's
820possible for us to go to. See L<perlfunc/goto>.
2a92aaa0
GS
821
822=item Can't find %s on PATH
823
be771a83
GS
824(F) You used the B<-S> switch, but the script to execute could not be
825found in the PATH.
a0d0e21e 826
6df41af2 827=item Can't find %s on PATH, '.' not in PATH
a0d0e21e 828
be771a83
GS
829(F) You used the B<-S> switch, but the script to execute could not be
830found in the PATH, or at least not with the correct permissions. The
831script exists in the current directory, but PATH prohibits running it.
a0d0e21e
LW
832
833=item Can't find string terminator %s anywhere before EOF
834
be771a83
GS
835(F) Perl strings can stretch over multiple lines. This message means
836that the closing delimiter was omitted. Because bracketed quotes count
837nesting levels, the following is missing its final parenthesis:
a0d0e21e 838
fb73857a
PP
839 print q(The character '(' starts a side comment.);
840
97b3d10f 841If you're getting this error from a here-document, you may have
b6b8cb97
FC
842included unseen whitespace before or after your closing tag or there
843may not be a linebreak after it. A good programmer's editor will have
844a way to help you find these characters (or lack of characters). See
845L<perlop> for the full details on here-documents.
a0d0e21e 846
660a4616
ST
847=item Can't find Unicode property definition "%s"
848
5f8ad6b6
FC
849(F) You may have tried to use C<\p> which means a Unicode
850property (for example C<\p{Lu}> matches all uppercase
fa816bf3 851letters). If you did mean to use a Unicode property, see
e1b711da 852L<perluniprops/Properties accessible through \p{} and \P{}>
6903afa2 853for a complete list of available properties. If you didn't
fa816bf3
FC
854mean to use a Unicode property, escape the C<\p>, either by
855C<\\p> (just the C<\p>) or by C<\Q\p> (the rest of the string, or
5f8ad6b6 856until C<\E>).
660a4616 857
b3647a36 858=item Can't fork: %s
a0d0e21e 859
be771a83
GS
860(F) A fatal error occurred while trying to fork while opening a
861pipeline.
a0d0e21e 862
b3647a36
SR
863=item Can't fork, trying again in 5 seconds
864
c973c02e 865(W pipe) A fork in a piped open failed with EAGAIN and will be retried
b3647a36
SR
866after five seconds.
867
748a9306
LW
868=item Can't get filespec - stale stat buffer?
869
be771a83
GS
870(S) A warning peculiar to VMS. This arises because of the difference
871between access checks under VMS and under the Unix model Perl assumes.
872Under VMS, access checks are done by filename, rather than by bits in
873the stat buffer, so that ACLs and other protections can be taken into
874account. Unfortunately, Perl assumes that the stat buffer contains all
875the necessary information, and passes it, instead of the filespec, to
2fe2bdfd 876the access-checking routine. It will try to retrieve the filespec using
be771a83
GS
877the device name and FID present in the stat buffer, but this works only
878if you haven't made a subsequent call to the CRTL stat() routine,
879because the device name is overwritten with each call. If this warning
2fe2bdfd
FC
880appears, the name lookup failed, and the access-checking routine gave up
881and returned FALSE, just to be conservative. (Note: The access-checking
be771a83
GS
882routine knows about the Perl C<stat> operator and file tests, so you
883shouldn't ever see this warning in response to a Perl command; it arises
884only if some internal code takes stat buffers lightly.)
748a9306 885
a0d0e21e
LW
886=item Can't get pipe mailbox device name
887
be771a83
GS
888(P) An error peculiar to VMS. After creating a mailbox to act as a
889pipe, Perl can't retrieve its name for later use.
a0d0e21e
LW
890
891=item Can't get SYSGEN parameter value for MAXBUF
892
748a9306
LW
893(P) An error peculiar to VMS. Perl asked $GETSYI how big you want your
894mailbox buffers to be, and didn't get an answer.
a0d0e21e 895
6df41af2 896=item Can't "goto" into the middle of a foreach loop
a0d0e21e 897
be771a83
GS
898(F) A "goto" statement was executed to jump into the middle of a foreach
899loop. You can't get there from here. See L<perlfunc/goto>.
6df41af2
GS
900
901=item Can't "goto" out of a pseudo block
902
be771a83
GS
903(F) A "goto" statement was executed to jump out of what might look like
904a block, except that it isn't a proper block. This usually occurs if
905you tried to jump out of a sort() block or subroutine, which is a no-no.
906See L<perlfunc/goto>.
a0d0e21e 907
5a25739d
FC
908=item Can't goto subroutine from an eval-%s
909
910(F) The "goto subroutine" call can't be used to jump out of an eval
911"string" or block.
912
9850bf21 913=item Can't goto subroutine from a sort sub (or similar callback)
cd299c6e 914
9850bf21
RH
915(F) The "goto subroutine" call can't be used to jump out of the
916comparison sub for a sort(), or from a similar callback (such
917as the reduce() function in List::Util).
918
6df41af2
GS
919=item Can't goto subroutine outside a subroutine
920
be771a83
GS
921(F) The deeply magical "goto subroutine" call can only replace one
922subroutine call for another. It can't manufacture one out of whole
923cloth. In general you should be calling it out of only an AUTOLOAD
924routine anyway. See L<perlfunc/goto>.
6df41af2 925
0b5b802d
GS
926=item Can't ignore signal CHLD, forcing to default
927
be771a83
GS
928(W signal) Perl has detected that it is being run with the SIGCHLD
929signal (sometimes known as SIGCLD) disabled. Since disabling this
930signal will interfere with proper determination of exit status of child
931processes, Perl has reset the signal to its default value. This
932situation typically indicates that the parent program under which Perl
933may be running (e.g. cron) is being very careless.
0b5b802d 934
e2c0f81f
DG
935=item Can't kill a non-numeric process ID
936
937(F) Process identifiers must be (signed) integers. It is a fatal error to
938attempt to kill() an undefined, empty-string or otherwise non-numeric
939process identifier.
940
6df41af2 941=item Can't "last" outside a loop block
4633a7c4 942
6df41af2 943(F) A "last" statement was executed to break out of the current block,
be771a83
GS
944except that there's this itty bitty problem called there isn't a current
945block. Note that an "if" or "else" block doesn't count as a "loopish"
946block, as doesn't a block given to sort(), map() or grep(). You can
947usually double the curlies to get the same effect though, because the
948inner curlies will be considered a block that loops once. See
949L<perlfunc/last>.
4633a7c4 950
2c7d6b9c
RGS
951=item Can't linearize anonymous symbol table
952
953(F) Perl tried to calculate the method resolution order (MRO) of a
954package, but failed because the package stash has no name.
955
b8170e59
JB
956=item Can't load '%s' for module %s
957
6903afa2
FC
958(F) The module you tried to load failed to load a dynamic extension.
959This may either mean that you upgraded your version of perl to one
960that is incompatible with your old dynamic extensions (which is known
961to happen between major versions of perl), or (more likely) that your
962dynamic extension was built against an older version of the library
963that is installed on your system. You may need to rebuild your old
964dynamic extensions.
b8170e59 965
748a9306
LW
966=item Can't localize lexical variable %s
967
2ba9eb46 968(F) You used local on a variable name that was previously declared as a
b7e4ecc1
FC
969lexical variable using "my" or "state". This is not allowed. If you
970want to localize a package variable of the same name, qualify it with
971the package name.
748a9306 972
6df41af2 973=item Can't localize through a reference
4727527e 974
6df41af2
GS
975(F) You said something like C<local $$ref>, which Perl can't currently
976handle, because when it goes to restore the old value of whatever $ref
be771a83 977pointed to after the scope of the local() is finished, it can't be sure
64977eb6 978that $ref will still be a reference.
4727527e 979
ea071790 980=item Can't locate %s
ec889f3a 981
fa816bf3
FC
982(F) You said to C<do> (or C<require>, or C<use>) a file that couldn't be found.
983Perl looks for the file in all the locations mentioned in @INC, unless
984the file name included the full path to the file. Perhaps you need
985to set the PERL5LIB or PERL5OPT environment variable to say where the
986extra library is, or maybe the script needs to add the library name
be771a83
GS
987to @INC. Or maybe you just misspelled the name of the file. See
988L<perlfunc/require> and L<lib>.
a0d0e21e 989
6df41af2
GS
990=item Can't locate auto/%s.al in @INC
991
be771a83
GS
992(F) A function (or method) was called in a package which allows
993autoload, but there is no function to autoload. Most probable causes
994are a misprint in a function/method name or a failure to C<AutoSplit>
995the file, say, by doing C<make install>.
6df41af2 996
b8170e59
JB
997=item Can't locate loadable object for module %s in @INC
998
999(F) The module you loaded is trying to load an external library, like
d70d8e57 1000for example, F<foo.so> or F<bar.dll>, but the L<DynaLoader> module was
b8170e59
JB
1001unable to locate this library. See L<DynaLoader>.
1002
a0d0e21e
LW
1003=item Can't locate object method "%s" via package "%s"
1004
1005(F) You called a method correctly, and it correctly indicated a package
1006functioning as a class, but that package doesn't define that particular
2ba9eb46 1007method, nor does any of its base classes. See L<perlobj>.
a0d0e21e
LW
1008
1009=item Can't locate package %s for @%s::ISA
1010
be771a83
GS
1011(W syntax) The @ISA array contained the name of another package that
1012doesn't seem to exist.
a0d0e21e 1013
2f7da168
RK
1014=item Can't locate PerlIO%s
1015
1016(F) You tried to use in open() a PerlIO layer that does not exist,
1017e.g. open(FH, ">:nosuchlayer", "somefile").
1018
f4ad53f4 1019=item Can't make list assignment to %ENV on this system
3e3baf6d 1020
be771a83
GS
1021(F) List assignment to %ENV is not supported on some systems, notably
1022VMS.
3e3baf6d 1023
cd40cd58
NC
1024=item Can't make loaded symbols global on this platform while loading %s
1025
ff9c1ae8 1026(S) A module passed the flag 0x01 to DynaLoader::dl_load_file() to request
cd40cd58
NC
1027that symbols from the stated file are made available globally within the
1028process, but that functionality is not available on this platform. Whilst
1029the module likely will still work, this may prevent the perl interpreter
1030from loading other XS-based extensions which need to link directly to
1031functions defined in the C or XS code in the stated file.
1032
a0d0e21e
LW
1033=item Can't modify %s in %s
1034
be771a83
GS
1035(F) You aren't allowed to assign to the item indicated, or otherwise try
1036to change it, such as with an auto-increment.
a0d0e21e 1037
54310121 1038=item Can't modify nonexistent substring
a0d0e21e
LW
1039
1040(P) The internal routine that does assignment to a substr() was handed
1041a NULL.
1042
6df41af2
GS
1043=item Can't modify non-lvalue subroutine call
1044
1045(F) Subroutines meant to be used in lvalue context should be declared as
2fe2bdfd 1046such. See L<perlsub/"Lvalue subroutines">.
6df41af2 1047
5f05dabc 1048=item Can't msgrcv to read-only var
a0d0e21e 1049
5f05dabc 1050(F) The target of a msgrcv must be modifiable to be used as a receive
a0d0e21e
LW
1051buffer.
1052
6df41af2
GS
1053=item Can't "next" outside a loop block
1054
1055(F) A "next" statement was executed to reiterate the current block, but
1056there isn't a current block. Note that an "if" or "else" block doesn't
be771a83
GS
1057count as a "loopish" block, as doesn't a block given to sort(), map() or
1058grep(). You can usually double the curlies to get the same effect
1059though, because the inner curlies will be considered a block that loops
1060once. See L<perlfunc/next>.
6df41af2 1061
46fa9b26
FC
1062=item Can't open %s
1063
1064(F) You tried to run a perl built with MAD support with
1065the PERL_XMLDUMP environment variable set, but the file
1066named by that variable could not be opened.
1067
a0d0e21e
LW
1068=item Can't open %s: %s
1069
c47ff5f1 1070(S inplace) The implicit opening of a file through use of the C<< <> >>
08e9d68e 1071filehandle, either implicitly under the C<-n> or C<-p> command-line
46fa9b26
FC
1072switches, or explicitly, failed for the indicated reason. Usually
1073this is because you don't have read permission for a file which
1074you named on the command line.
1075
1076(F) You tried to call perl with the B<-e> switch, but F</dev/null> (or
1077your operating system's equivalent) could not be opened.
a0d0e21e 1078
9a869a14
RGS
1079=item Can't open a reference
1080
1081(W io) You tried to open a scalar reference for reading or writing,
2fe2bdfd 1082using the 3-arg open() syntax:
9a869a14
RGS
1083
1084 open FH, '>', $ref;
1085
1086but your version of perl is compiled without perlio, and this form of
1087open is not supported.
1088
a0d0e21e
LW
1089=item Can't open bidirectional pipe
1090
be771a83
GS
1091(W pipe) You tried to say C<open(CMD, "|cmd|")>, which is not supported.
1092You can try any of several modules in the Perl library to do this, such
1093as IPC::Open2. Alternately, direct the pipe's output to a file using
1094">", and then read it in under a different file handle.
a0d0e21e 1095
748a9306
LW
1096=item Can't open error file %s as stderr
1097
be771a83
GS
1098(F) An error peculiar to VMS. Perl does its own command line
1099redirection, and couldn't open the file specified after '2>' or '2>>' on
1100the command line for writing.
748a9306
LW
1101
1102=item Can't open input file %s as stdin
1103
be771a83
GS
1104(F) An error peculiar to VMS. Perl does its own command line
1105redirection, and couldn't open the file specified after '<' on the
1106command line for reading.
748a9306
LW
1107
1108=item Can't open output file %s as stdout
1109
be771a83
GS
1110(F) An error peculiar to VMS. Perl does its own command line
1111redirection, and couldn't open the file specified after '>' or '>>' on
1112the command line for writing.
748a9306
LW
1113
1114=item Can't open output pipe (name: %s)
1115
be771a83
GS
1116(P) An error peculiar to VMS. Perl does its own command line
1117redirection, and couldn't open the pipe into which to send data destined
1118for stdout.
748a9306 1119
3b1cf97d 1120=item Can't open perl script "%s": %s
a0d0e21e
LW
1121
1122(F) The script you specified can't be opened for the indicated reason.
1123
fa3aa65a
JC
1124If you're debugging a script that uses #!, and normally relies on the
1125shell's $PATH search, the -S option causes perl to do that search, so
1126you don't have to type the path or C<`which $scriptname`>.
1127
6df41af2
GS
1128=item Can't read CRTL environ
1129
1130(S) A warning peculiar to VMS. Perl tried to read an element of %ENV
1131from the CRTL's internal environment array and discovered the array was
1132missing. You need to figure out where your CRTL misplaced its environ
be771a83
GS
1133or define F<PERL_ENV_TABLES> (see L<perlvms>) so that environ is not
1134searched.
6df41af2 1135
6df41af2
GS
1136=item Can't "redo" outside a loop block
1137
1138(F) A "redo" statement was executed to restart the current block, but
1139there isn't a current block. Note that an "if" or "else" block doesn't
1140count as a "loopish" block, as doesn't a block given to sort(), map()
1141or grep(). You can usually double the curlies to get the same effect
1142though, because the inner curlies will be considered a block that
1143loops once. See L<perlfunc/redo>.
1144
64977eb6 1145=item Can't remove %s: %s, skipping file
10f9c03d 1146
be771a83
GS
1147(S inplace) You requested an inplace edit without creating a backup
1148file. Perl was unable to remove the original file to replace it with
1149the modified file. The file was left unmodified.
10f9c03d 1150
a0d0e21e
LW
1151=item Can't rename %s to %s: %s, skipping file
1152
e476b1b5 1153(S inplace) The rename done by the B<-i> switch failed for some reason,
10f9c03d 1154probably because you don't have write permission to the directory.
a0d0e21e 1155
748a9306
LW
1156=item Can't reopen input pipe (name: %s) in binary mode
1157
be771a83
GS
1158(P) An error peculiar to VMS. Perl thought stdin was a pipe, and tried
1159to reopen it to accept binary data. Alas, it failed.
748a9306 1160
4f12ec0e
FC
1161=item Can't reset %ENV on this system
1162
1163(F) You called C<reset('E')> or similar, which tried to reset
1164all variables in the current package beginning with "E". In
1165the main package, that includes %ENV. Resetting %ENV is not
1166supported on some systems, notably VMS.
1167
fe13d51d 1168=item Can't resolve method "%s" overloading "%s" in package "%s"
6df41af2 1169
1fa582fa
FC
1170(F)(P) Error resolving overloading specified by a method name (as
1171opposed to a subroutine reference): no such method callable via the
1172package. If the method name is C<???>, this is an internal error.
6df41af2 1173
cd06dffe
GS
1174=item Can't return %s from lvalue subroutine
1175
be771a83
GS
1176(F) Perl detected an attempt to return illegal lvalues (such as
1177temporary or readonly values) from a subroutine used as an lvalue. This
1178is not allowed.
cd06dffe 1179
96ebfdd7
RK
1180=item Can't return outside a subroutine
1181
1182(F) The return statement was executed in mainline code, that is, where
1183there was no subroutine call to return out of. See L<perlsub>.
1184
78f9721b
SM
1185=item Can't return %s to lvalue scalar context
1186
6903afa2
FC
1187(F) You tried to return a complete array or hash from an lvalue
1188subroutine, but you called the subroutine in a way that made Perl
1189think you meant to return only one value. You probably meant to
1190write parentheses around the call to the subroutine, which tell
1191Perl that the call should be in list context.
78f9721b 1192
a0d0e21e
LW
1193=item Can't stat script "%s"
1194
be771a83
GS
1195(P) For some reason you can't fstat() the script even though you have it
1196open already. Bizarre.
a0d0e21e 1197
a0d0e21e
LW
1198=item Can't take log of %g
1199
fb73857a 1200(F) For ordinary real numbers, you can't take the logarithm of a
6903afa2 1201negative number or zero. There's a Math::Complex package that comes
be771a83
GS
1202standard with Perl, though, if you really want to do that for the
1203negative numbers.
a0d0e21e
LW
1204
1205=item Can't take sqrt of %g
1206
1207(F) For ordinary real numbers, you can't take the square root of a
fb73857a
PP
1208negative number. There's a Math::Complex package that comes standard
1209with Perl, though, if you really want to do that.
a0d0e21e
LW
1210
1211=item Can't undef active subroutine
1212
1213(F) You can't undefine a routine that's currently running. You can,
1214however, redefine it while it's running, and you can even undef the
1215redefined subroutine while the old routine is running. Go figure.
1216
c81225bc 1217=item Can't upgrade %s (%d) to %d
a0d0e21e 1218
be771a83
GS
1219(P) The internal sv_upgrade routine adds "members" to an SV, making it
1220into a more specialized kind of SV. The top several SV types are so
1221specialized, however, that they cannot be interconverted. This message
1222indicates that such a conversion was attempted.
a0d0e21e 1223
6651ba0b
FC
1224=item Can't use '%c' after -mname
1225
1226(F) You tried to call perl with the B<-m> switch, but you put something
1227other than "=" after the module name.
1228
1db89ea5
BS
1229=item Can't use anonymous symbol table for method lookup
1230
e27ad1f2 1231(F) The internal routine that does method lookup was handed a symbol
1db89ea5
BS
1232table that doesn't have a name. Symbol tables can become anonymous
1233for example by undefining stashes: C<undef %Some::Package::>.
1234
96ebfdd7
RK
1235=item Can't use an undefined value as %s reference
1236
1237(F) A value used as either a hard reference or a symbolic reference must
1238be a defined value. This helps to delurk some insidious errors.
1239
6df41af2
GS
1240=item Can't use bareword ("%s") as %s ref while "strict refs" in use
1241
be771a83
GS
1242(F) Only hard references are allowed by "strict refs". Symbolic
1243references are disallowed. See L<perlref>.
6df41af2 1244
90b75b61 1245=item Can't use %! because Errno.pm is not available
1d2dff63 1246
20561843 1247(F) The first time the C<%!> hash is used, perl automatically loads the
6903afa2 1248Errno.pm module. The Errno module is expected to tie the %! hash to
1d2dff63
GS
1249provide symbolic names for C<$!> errno values.
1250
1109a392
MHM
1251=item Can't use both '<' and '>' after type '%c' in %s
1252
1253(F) A type cannot be forced to have both big-endian and little-endian
1254byte-order at the same time, so this combination of modifiers is not
1255allowed. See L<perlfunc/pack>.
1256
6df41af2
GS
1257=item Can't use %s for loop variable
1258
be771a83
GS
1259(F) Only a simple scalar variable may be used as a loop variable on a
1260foreach.
6df41af2 1261
aab6a793 1262=item Can't use global %s in "%s"
6df41af2 1263
be771a83
GS
1264(F) You tried to declare a magical variable as a lexical variable. This
1265is not allowed, because the magic can be tied to only one location
1266(namely the global variable) and it would be incredibly confusing to
1267have variables in your program that looked like magical variables but
6df41af2
GS
1268weren't.
1269
6d3b25aa
RGS
1270=item Can't use '%c' in a group with different byte-order in %s
1271
1272(F) You attempted to force a different byte-order on a type
1273that is already inside a group with a byte-order modifier.
1274For example you cannot force little-endianness on a type that
1275is inside a big-endian group.
1276
c07a80fd
PP
1277=item Can't use "my %s" in sort comparison
1278
1279(F) The global variables $a and $b are reserved for sort comparisons.
c47ff5f1 1280You mentioned $a or $b in the same line as the <=> or cmp operator,
c07a80fd
PP
1281and the variable had earlier been declared as a lexical variable.
1282Either qualify the sort variable with the package name, or rename the
1283lexical variable.
1284
a0d0e21e
LW
1285=item Can't use %s ref as %s ref
1286
1287(F) You've mixed up your reference types. You have to dereference a
1288reference of the type needed. You can use the ref() function to
1289test the type of the reference, if need be.
1290
748a9306 1291=item Can't use string ("%s") as %s ref while "strict refs" in use
a0d0e21e 1292
5e634d20
FC
1293=item Can't use string ("%s"...) as %s ref while "strict refs" in use
1294
b41bf23f
FC
1295(F) You've told Perl to dereference a string, something which
1296C<use strict> blocks to prevent it happening accidentally. See
1297L<perlref/"Symbolic references">. This can be triggered by an C<@> or C<$>
1298in a double-quoted string immediately before interpolating a variable,
1299for example in C<"user @$twitter_id">, which says to treat the contents
1300of C<$twitter_id> as an array reference; use a C<\> to have a literal C<@>
1301symbol followed by the contents of C<$twitter_id>: C<"user \@$twitter_id">.
a0d0e21e 1302
748a9306
LW
1303=item Can't use subscript on %s
1304
1305(F) The compiler tried to interpret a bracketed expression as a
1306subscript. But to the left of the brackets was an expression that
209e7cf1 1307didn't look like a hash or array reference, or anything else subscriptable.
748a9306 1308
6df41af2
GS
1309=item Can't use \%c to mean $%c in expression
1310
75b44862
GS
1311(W syntax) In an ordinary expression, backslash is a unary operator that
1312creates a reference to its argument. The use of backslash to indicate a
1313backreference to a matched substring is valid only as part of a regular
be771a83
GS
1314expression pattern. Trying to do this in ordinary Perl code produces a
1315value that prints out looking like SCALAR(0xdecaf). Use the $1 form
1316instead.
6df41af2 1317
810b8aa5
GS
1318=item Can't weaken a nonreference
1319
1320(F) You attempted to weaken something that was not a reference. Only
1321references can be weakened.
1322
fc7debfb
FC
1323=item Can't "when" outside a topicalizer
1324
1325(F) You have used a when() block that is neither inside a C<foreach>
1326loop nor a C<given> block. (Note that this error is issued on exit
1327from the C<when> block, so you won't get the error if the match fails,
1328or if you use an explicit C<continue>.)
1329
5f05dabc 1330=item Can't x= to read-only value
a0d0e21e 1331
be771a83
GS
1332(F) You tried to repeat a constant value (often the undefined value)
1333with an assignment operator, which implies modifying the value itself.
a0d0e21e
LW
1334Perhaps you need to copy the value to a temporary, and repeat that.
1335
4a68bf9d 1336=item Character following "\c" must be ASCII
f9d13529 1337
3c664d1a 1338(F)(D deprecated, syntax) In C<\cI<X>>, I<X> must be an ASCII character.
675fa9ff
FC
1339It is planned to make this fatal in all instances in Perl v5.20. In
1340the cases where it isn't fatal, the character this evaluates to is
17a3df4c
KW
1341derived by exclusive or'ing the code point of this character with 0x40.
1342
c9faaf04
KW
1343Note that non-alphabetic ASCII characters are discouraged here as well,
1344and using non-printable ones will be deprecated starting in v5.18.
f9d13529 1345
f337b084 1346=item Character in 'C' format wrapped in pack
ac7cd81a
SC
1347
1348(W pack) You said
1349
1350 pack("C", $x)
1351
1352where $x is either less than 0 or more than 255; the C<"C"> format is
1353only for encoding native operating system characters (ASCII, EBCDIC,
1354and so on) and not for Unicode characters, so Perl behaved as if you meant
1355
1356 pack("C", $x & 255)
1357
1358If you actually want to pack Unicode codepoints, use the C<"U"> format
1359instead.
1360
f337b084 1361=item Character in 'c' format wrapped in pack
ac7cd81a
SC
1362
1363(W pack) You said
1364
1365 pack("c", $x)
1366
1367where $x is either less than -128 or more than 127; the C<"c"> format
1368is only for encoding native operating system characters (ASCII, EBCDIC,
1369and so on) and not for Unicode characters, so Perl behaved as if you meant
1370
1371 pack("c", $x & 255);
1372
1373If you actually want to pack Unicode codepoints, use the C<"U"> format
1374instead.
1375
f337b084
TH
1376=item Character in '%c' format wrapped in unpack
1377
1378(W unpack) You tried something like
1379
1380 unpack("H", "\x{2a1}")
1381
1a147d38 1382where the format expects to process a byte (a character with a value
6903afa2
FC
1383below 256), but a higher value was provided instead. Perl uses the
1384value modulus 256 instead, as if you had provided:
f337b084
TH
1385
1386 unpack("H", "\x{a1}")
1387
5a25739d
FC
1388=item Character in 'W' format wrapped in pack
1389
1390(W pack) You said
1391
1392 pack("U0W", $x)
1393
1394where $x is either less than 0 or more than 255. However, C<U0>-mode
1395expects all values to fall in the interval [0, 255], so Perl behaved
1396as if you meant:
1397
1398 pack("U0W", $x & 255)
1399
f337b084
TH
1400=item Character(s) in '%c' format wrapped in pack
1401
1402(W pack) You tried something like
1403
1404 pack("u", "\x{1f3}b")
1405
1a147d38 1406where the format expects to process a sequence of bytes (character with a
6903afa2 1407value below 256), but some of the characters had a higher value. Perl
f337b084
TH
1408uses the character values modulus 256 instead, as if you had provided:
1409
1410 pack("u", "\x{f3}b")
1411
1412=item Character(s) in '%c' format wrapped in unpack
1413
1414(W unpack) You tried something like
1415
1416 unpack("s", "\x{1f3}b")
1417
1a147d38 1418where the format expects to process a sequence of bytes (character with a
6903afa2 1419value below 256), but some of the characters had a higher value. Perl
f337b084
TH
1420uses the character values modulus 256 instead, as if you had provided:
1421
1422 unpack("s", "\x{f3}b")
1423
f866a7cd
FC
1424=item "\c{" is deprecated and is more clearly written as ";"
1425
1426(D deprecated, syntax) The C<\cI<X>> construct is intended to be a way
1427to specify non-printable characters. You used it with a "{" which
1428evaluates to ";", which is printable. It is planned to remove the
c9faaf04 1429ability to specify a semi-colon this way in Perl 5.20. Just use a
f866a7cd
FC
1430semi-colon or a backslash-semi-colon without the "\c".
1431
1432=item "\c%c" is more clearly written simply as "%s"
1433
1434(W syntax) The C<\cI<X>> construct is intended to be a way to specify
1435non-printable characters. You used it for a printable one, which is better
1436written as simply itself, perhaps preceded by a backslash for non-word
1437characters.
1438
6651ba0b
FC
1439=item Cloning substitution context is unimplemented
1440
1441(F) Creating a new thread inside the C<s///> operator is not supported.
1442
abc7ecad
SP
1443=item closedir() attempted on invalid dirhandle %s
1444
1445(W io) The dirhandle you tried to close is either closed or not really
1446a dirhandle. Check your control flow.
1447
5a25739d
FC
1448=item close() on unopened filehandle %s
1449
1450(W unopened) You tried to close a filehandle that was never opened.
1451
541ed3a9
FC
1452=item Closure prototype called
1453
1454(F) If a closure has attributes, the subroutine passed to an attribute
1455handler is the prototype that is cloned when a new closure is created.
1456This subroutine cannot be called.
1457
49704364
LW
1458=item Code missing after '/'
1459
6903afa2
FC
1460(F) You had a (sub-)template that ends with a '/'. There must be
1461another template code following the slash. See L<perlfunc/pack>.
49704364 1462
6fbc9859
MH
1463=item Code point 0x%X is not Unicode, all \p{} matches fail; all \P{} matches
1464succeed
9ae3ac1a 1465
5a25739d
FC
1466=item Code point 0x%X is not Unicode, may not be portable
1467
e2f4a215 1468(S utf8, non_unicode) You had a code point above the Unicode maximum
1b64326b
FC
1469of U+10FFFF.
1470
1471Perl allows strings to contain a superset of Unicode code points, up
1472to the limit of what is storable in an unsigned integer on your system,
1473but these may not be accepted by other languages/systems. At one time,
1474it was legal in some standards to have code points up to 0x7FFF_FFFF,
1475but not higher. Code points above 0xFFFF_FFFF require larger than a
147632 bit word.
0876b9a0 1477
9ae3ac1a
KW
1478None of the Unicode or Perl-defined properties will match a non-Unicode
1479code point. For example,
1480
1481 chr(0x7FF_FFFF) =~ /\p{Any}/
1482
1483will not match, because the code point is not in Unicode. But
1484
1485 chr(0x7FF_FFFF) =~ /\P{Any}/
1486
1487will match.
1488
94b42e47
KW
1489This may be counterintuitive at times, as both these fail:
1490
f9d4ccdc
FC
1491 chr(0x110000) =~ /\p{ASCII_Hex_Digit=True}/ # Fails.
1492 chr(0x110000) =~ /\p{ASCII_Hex_Digit=False}/ # Also fails!
94b42e47
KW
1493
1494and both these succeed:
1495
f9d4ccdc
FC
1496 chr(0x110000) =~ /\P{ASCII_Hex_Digit=True}/ # Succeeds.
1497 chr(0x110000) =~ /\P{ASCII_Hex_Digit=False}/ # Also succeeds!
94b42e47 1498
6df41af2
GS
1499=item %s: Command not found
1500
a892b81a
FC
1501(A) You've accidentally run your script through B<csh> or another shell
1502shell instead of Perl. Check the #! line, or manually feed your script
1503into Perl yourself. The #! line at the top of your file could look like
8f721816
MM
1504
1505 #!/usr/bin/perl -w
6df41af2 1506
7a2e2cd6
PP
1507=item Compilation failed in require
1508
1509(F) Perl could not compile a file specified in a C<require> statement.
be771a83
GS
1510Perl uses this generic message when none of the errors that it
1511encountered were severe enough to halt compilation immediately.
7a2e2cd6 1512
c3464db5
DD
1513=item Complex regular subexpression recursion limit (%d) exceeded
1514
be771a83
GS
1515(W regexp) The regular expression engine uses recursion in complex
1516situations where back-tracking is required. Recursion depth is limited
1517to 32766, or perhaps less in architectures where the stack cannot grow
1518arbitrarily. ("Simple" and "medium" situations are handled without
1519recursion and are not subject to a limit.) Try shortening the string
1520under examination; looping in Perl code (e.g. with C<while>) rather than
1521in the regular expression engine; or rewriting the regular expression so
c2e66d9e 1522that it is simpler or backtracks less. (See L<perlfaq2> for information
be771a83 1523on I<Mastering Regular Expressions>.)
c3464db5 1524
38875929
DM
1525=item cond_broadcast() called on unlocked variable
1526
6903afa2
FC
1527(W threads) Within a thread-enabled program, you tried to
1528call cond_broadcast() on a variable which wasn't locked.
1529The cond_broadcast() function is used to wake up another thread
1530that is waiting in a cond_wait(). To ensure that the signal isn't
1531sent before the other thread has a chance to enter the wait, it
1532is usual for the signaling thread first to wait for a lock on
1533variable. This lock attempt will only succeed after the other
1534thread has entered cond_wait() and thus relinquished the lock.
38875929 1535
38875929
DM
1536=item cond_signal() called on unlocked variable
1537
6903afa2
FC
1538(W threads) Within a thread-enabled program, you tried to
1539call cond_signal() on a variable which wasn't locked. The
1540cond_signal() function is used to wake up another thread that
1541is waiting in a cond_wait(). To ensure that the signal isn't
1542sent before the other thread has a chance to enter the wait, it
1543is usual for the signaling thread first to wait for a lock on
1544variable. This lock attempt will only succeed after the other
1545thread has entered cond_wait() and thus relinquished the lock.
38875929 1546
69282e91 1547=item connect() on closed socket %s
a0d0e21e 1548
be771a83
GS
1549(W closed) You tried to do a connect on a closed socket. Did you forget
1550to check the return value of your socket() call? See
1551L<perlfunc/connect>.
a0d0e21e 1552
e21e7c6a
FC
1553=item Constant(%s): Call to &{$^H{%s}} did not return a defined value
1554
1555(F) The subroutine registered to handle constant overloading
1556(see L<overload>) or a custom charnames handler (see
1557L<charnames/CUSTOM TRANSLATORS>) returned an undefined value.
1558
1559=item Constant(%s): $^H{%s} is not defined
1560
1561(F) The parser found inconsistencies while attempting to define an
1562overloaded constant. Perhaps you forgot to load the corresponding
1563L<overload> pragma?.
1564
779c5bc9
GS
1565=item Constant is not %s reference
1566
1567(F) A constant value (perhaps declared using the C<use constant> pragma)
be771a83 1568is being dereferenced, but it amounts to the wrong type of reference.
6903afa2 1569The message indicates the type of reference that was expected. This
be771a83 1570usually indicates a syntax error in dereferencing the constant value.
779c5bc9
GS
1571See L<perlsub/"Constant Functions"> and L<constant>.
1572
4cee8e80
CS
1573=item Constant subroutine %s redefined
1574
aeb94125
FC
1575(W redefine)(S) You redefined a subroutine which had previously
1576been eligible for inlining. See L<perlsub/"Constant Functions">
1577for commentary and workarounds.
4cee8e80 1578
9607fc9c
PP
1579=item Constant subroutine %s undefined
1580
be771a83
GS
1581(W misc) You undefined a subroutine which had previously been eligible
1582for inlining. See L<perlsub/"Constant Functions"> for commentary and
1583workarounds.
9607fc9c 1584
5a25739d
FC
1585=item Constant(%s) unknown
1586
1587(F) The parser found inconsistencies either while attempting
1588to define an overloaded constant, or when trying to find the
1589character name specified in the C<\N{...}> escape. Perhaps you
1590forgot to load the corresponding L<overload> pragma?.
1591
e7ea3e70
IZ
1592=item Copy method did not return a reference
1593
6903afa2 1594(F) The method which overloads "=" is buggy. See
13a2d996 1595L<overload/Copy Constructor>.
e7ea3e70 1596
4aaa4757
FC
1597=item &CORE::%s cannot be called directly
1598
1599(F) You tried to call a subroutine in the C<CORE::> namespace
8d605c0d 1600with C<&foo> syntax or through a reference. Some subroutines
4aaa4757
FC
1601in this package cannot yet be called that way, but must be
1602called as barewords. Something like this will work:
1603
1604 BEGIN { *shove = \&CORE::push; }
1605 shove @array, 1,2,3; # pushes on to @array
1606
6798c92b
GS
1607=item CORE::%s is not a keyword
1608
1609(F) The CORE:: namespace is reserved for Perl keywords.
1610
675fa9ff
FC
1611=item Corrupted regexp opcode %d > %d
1612
1613(P) This is either an error in Perl, or, if you're using
1614one, your L<custom regular expression engine|perlreapi>. If not the
1615latter, report the problem through the L<perlbug> utility.
1616
a0d0e21e
LW
1617=item corrupted regexp pointers
1618
1619(P) The regular expression engine got confused by what the regular
1620expression compiler gave it.
1621
1622=item corrupted regexp program
1623
be771a83
GS
1624(P) The regular expression engine got passed a regexp program without a
1625valid magic number.
a0d0e21e 1626
de42a5a9 1627=item Corrupt malloc ptr 0x%x at 0x%x
6df41af2
GS
1628
1629(P) The malloc package that comes with Perl had an internal failure.
1630
49704364
LW
1631=item Count after length/code in unpack
1632
1633(F) You had an unpack template indicating a counted-length string, but
1634you have also specified an explicit size for the string. See
1635L<perlfunc/pack>.
1636
6651ba0b
FC
1637=item Deep recursion on anonymous subroutine
1638
a0d0e21e
LW
1639=item Deep recursion on subroutine "%s"
1640
be771a83
GS
1641(W recursion) This subroutine has called itself (directly or indirectly)
1642100 times more than it has returned. This probably indicates an
1643infinite recursion, unless you're writing strange benchmark programs, in
1644which case it indicates something else.
a0d0e21e 1645
aad1d01f
NC
1646This threshold can be changed from 100, by recompiling the F<perl> binary,
1647setting the C pre-processor macro C<PERL_SUB_DEPTH_WARN> to the desired value.
1648
f10b0346 1649=item defined(@array) is deprecated
69794302 1650
be771a83
GS
1651(D deprecated) defined() is not usually useful on arrays because it
1652checks for an undefined I<scalar> value. If you want to see if the
64977eb6 1653array is empty, just use C<if (@array) { # not empty }> for example.
69794302 1654
f10b0346 1655=item defined(%hash) is deprecated
69794302 1656
f0ec9725
KR
1657(D deprecated) C<defined()> is not usually right on hashes and has been
1658discouraged since 5.004.
1659
1660Although C<defined %hash> is false on a plain not-yet-used hash, it
1661becomes true in several non-obvious circumstances, including iterators,
1662weak references, stash names, even remaining true after C<undef %hash>.
1663These things make C<defined %hash> fairly useless in practice.
1664
1665If a check for non-empty is what you wanted then just put it in boolean
1666context (see L<perldata/Scalar values>):
16546e45
KR
1667
1668 if (%hash) {
1669 # not empty
1670 }
1671
f0ec9725
KR
1672If you had C<defined %Foo::Bar::QUUX> to check whether such a package
1673variable exists then that's never really been reliable, and isn't
1674a good way to enquire about the features of a package, or whether
1675it's loaded, etc.
1676
69794302 1677
6fbc9859
MH
1678=item (?(DEFINE)....) does not allow branches in regex; marked by <-- HERE in
1679m/%s/
bcb95744 1680
6903afa2 1681(F) You used something like C<(?(DEFINE)...|..)> which is illegal. The
bcb95744
FC
1682most likely cause of this error is that you left out a parenthesis inside
1683of the C<....> part.
1684
9e3ec65c 1685The <-- HERE shows whereabouts in the regular expression the problem was
bcb95744
FC
1686discovered.
1687
62658f4d
PM
1688=item %s defines neither package nor VERSION--version check failed
1689
1690(F) You said something like "use Module 42" but in the Module file
1691there are neither package declarations nor a C<$VERSION>.
1692
fc36a67e
PP
1693=item Delimiter for here document is too long
1694
be771a83
GS
1695(F) In a here document construct like C<<<FOO>, the label C<FOO> is too
1696long for Perl to handle. You have to be seriously twisted to write code
1697that triggers this error.
fc36a67e 1698
6d3b25aa
RGS
1699=item Deprecated use of my() in false conditional
1700
fa816bf3
FC
1701(D deprecated) You used a declaration similar to C<my $x if 0>. There
1702has been a long-standing bug in Perl that causes a lexical variable
6d3b25aa 1703not to be cleared at scope exit when its declaration includes a false
6903afa2 1704conditional. Some people have exploited this bug to achieve a kind of
fa816bf3 1705static variable. Since we intend to fix this bug, we don't want people
6903afa2 1706relying on this behavior. You can achieve a similar static effect by
6d3b25aa 1707declaring the variable in a separate block outside the function, eg
36fb85f3 1708
6d3b25aa
RGS
1709 sub f { my $x if 0; return $x++ }
1710
1711becomes
1712
1713 { my $x; sub f { return $x++ } }
1714
fa816bf3
FC
1715Beginning with perl 5.9.4, you can also use C<state> variables to have
1716lexicals that are initialized only once (see L<feature>):
36fb85f3
RGS
1717
1718 sub f { state $x; return $x++ }
1719
500ab966
RGS
1720=item DESTROY created new reference to dead object '%s'
1721
1722(F) A DESTROY() method created a new reference to the object which is
6903afa2
FC
1723just being DESTROYed. Perl is confused, and prefers to abort rather
1724than to create a dangling reference.
500ab966 1725
3cdd684c
TP
1726=item Did not produce a valid header
1727
1728See Server error.
1729
6df41af2
GS
1730=item %s did not return a true value
1731
1732(F) A required (or used) file must return a true value to indicate that
1733it compiled correctly and ran its initialization code correctly. It's
1734traditional to end such a file with a "1;", though any true value would
1735do. See L<perlfunc/require>.
1736
cc507455 1737=item (Did you mean &%s instead?)
4633a7c4 1738
413ff9f6
FC
1739(W misc) You probably referred to an imported subroutine &FOO as $FOO or
1740some such.
4633a7c4 1741
cc507455 1742=item (Did you mean "local" instead of "our"?)
33633739 1743
be771a83
GS
1744(W misc) Remember that "our" does not localize the declared global
1745variable. You have declared it again in the same lexical scope, which
1746seems superfluous.
33633739 1747
cc507455 1748=item (Did you mean $ or @ instead of %?)
a0d0e21e 1749
be771a83
GS
1750(W) You probably said %hash{$key} when you meant $hash{$key} or
1751@hash{@keys}. On the other hand, maybe you just meant %hash and got
1752carried away.
748a9306 1753
7e1af8bc 1754=item Died
5f05dabc
PP
1755
1756(F) You passed die() an empty string (the equivalent of C<die "">) or
075b00aa 1757you called it with no args and C<$@> was empty.
5f05dabc 1758
3cdd684c
TP
1759=item Document contains no data
1760
1761See Server error.
1762
62658f4d
PM
1763=item %s does not define %s::VERSION--version check failed
1764
1765(F) You said something like "use Module 42" but the Module did not
943fc58e 1766define a C<$VERSION>.
62658f4d 1767
49704364
LW
1768=item '/' does not take a repeat count
1769
1770(F) You cannot put a repeat count of any kind right after the '/' code.
1771See L<perlfunc/pack>.
1772
4021c788 1773=item Don't know how to handle magic of type \%o
a0d0e21e
LW
1774
1775(P) The internal handling of magical variables has been cursed.
1776
1777=item do_study: out of memory
1778
1779(P) This should have been caught by safemalloc() instead.
1780
6df41af2
GS
1781=item (Do you need to predeclare %s?)
1782
56da5a46
RGS
1783(S syntax) This is an educated guess made in conjunction with the message
1784"%s found where operator expected". It often means a subroutine or module
6df41af2
GS
1785name is being referenced that hasn't been declared yet. This may be
1786because of ordering problems in your file, or because of a missing
be771a83
GS
1787"sub", "package", "require", or "use" statement. If you're referencing
1788something that isn't defined yet, you don't actually have to define the
1789subroutine or package before the current location. You can use an empty
1790"sub foo;" or "package FOO;" to enter a "forward" declaration.
6df41af2 1791
ac206dc8
RGS
1792=item dump() better written as CORE::dump()
1793
1794(W misc) You used the obsolescent C<dump()> built-in function, without fully
1795qualifying it as C<CORE::dump()>. Maybe it's a typo. See L<perlfunc/dump>.
1796
84d78eb7
YO
1797=item dump is not supported
1798
1799(F) Your machine doesn't support dump/undump.
1800
a0d0e21e
LW
1801=item Duplicate free() ignored
1802
be771a83
GS
1803(S malloc) An internal routine called free() on something that had
1804already been freed.
a0d0e21e 1805
1109a392
MHM
1806=item Duplicate modifier '%c' after '%c' in %s
1807
35f0cd76
FC
1808(W unpack) You have applied the same modifier more than once after a
1809type in a pack template. See L<perlfunc/pack>.
1109a392 1810
4633a7c4
LW
1811=item elseif should be elsif
1812
fa816bf3
FC
1813(S syntax) There is no keyword "elseif" in Perl because Larry thinks
1814it's ugly. Your code will be interpreted as an attempt to call a method
1815named "elseif" for the class returned by the following block. This is
4633a7c4
LW
1816unlikely to be what you want.
1817
c608e803 1818=item Empty \%c{} in regex; marked by <-- HERE in m/%s/
ab13f0c7 1819
af6f566e 1820(F) C<\p> and C<\P> are used to introduce a named Unicode property, as
6903afa2 1821described in L<perlunicode> and L<perlre>. You used C<\p> or C<\P> in
af6f566e 1822a regular expression without specifying the property name.
ab13f0c7 1823
85ab1d1d 1824=item entering effective %s failed
5ff3f7a4 1825
85ab1d1d 1826(F) While under the C<use filetest> pragma, switching the real and
5ff3f7a4
GS
1827effective uids or gids failed.
1828
c038024b
RGS
1829=item %ENV is aliased to %s
1830
1831(F) You're running under taint mode, and the C<%ENV> variable has been
1832aliased to another hash, so it doesn't reflect anymore the state of the
6903afa2 1833program's environment. This is potentially insecure.
c038024b 1834
748a9306
LW
1835=item Error converting file specification %s
1836
5f05dabc 1837(F) An error peculiar to VMS. Because Perl may have to deal with file
748a9306 1838specifications in either VMS or Unix syntax, it converts them to a
be771a83
GS
1839single form when it must operate on them directly. Either you've passed
1840an invalid file specification to Perl, or you've found a case the
1841conversion routines don't handle. Drat.
748a9306 1842
ff56e4f1
KW
1843=item Escape literal pattern white space under /x
1844
1845(D deprecated) You compiled a regular expression pattern with C</x> to
1846ignore white space, and you used, as a literal, one of the characters
1847that Perl plans to eventually treat as white space. The character must
1848be escaped somehow, or it will work differently on a future Perl that
1849does treat it as white space. The easiest way is to insert a backslash
1850immediately before it, or to enclose it with square brackets. This
1851change is to bring Perl into conformance with Unicode recommendations.
1852Here are the five characters that generate this warning:
1853U+0085 NEXT LINE,
1854U+200E LEFT-TO-RIGHT MARK,
1855U+200F RIGHT-TO-LEFT MARK,
1856U+2028 LINE SEPARATOR,
1857and
1858U+2029 PARAGRAPH SEPARATOR.
1859
ad19ef22 1860=item Eval-group in insecure regular expression
e4d48cc9 1861
be771a83
GS
1862(F) Perl detected tainted data when trying to compile a regular
1863expression that contains the C<(?{ ... })> zero-width assertion, which
1864is unsafe. See L<perlre/(?{ code })>, and L<perlsec>.
e4d48cc9 1865
ad19ef22 1866=item Eval-group not allowed at runtime, use re 'eval' in regex m/%s/
e4d48cc9 1867
be771a83
GS
1868(F) Perl tried to compile a regular expression containing the
1869C<(?{ ... })> zero-width assertion at run time, as it would when the
f11307f5
FC
1870pattern contains interpolated values. Since that is a security risk,
1871it is not allowed. If you insist, you may still do this by using the
1872C<re 'eval'> pragma or by explicitly building the pattern from an
1873interpolated string at run time and using that in an eval(). See
1874L<perlre/(?{ code })>.
e4d48cc9 1875
ad19ef22 1876=item Eval-group not allowed, use re 'eval' in regex m/%s/
6df41af2 1877
be771a83
GS
1878(F) A regular expression contained the C<(?{ ... })> zero-width
1879assertion, but that construct is only allowed when the C<use re 'eval'>
1880pragma is in effect. See L<perlre/(?{ code })>.
6df41af2 1881
6fbc9859
MH
1882=item EVAL without pos change exceeded limit in regex; marked by <-- HERE in
1883m/%s/
1a147d38
YO
1884
1885(F) You used a pattern that nested too many EVAL calls without consuming
6903afa2 1886any text. Restructure the pattern so that text is consumed.
1a147d38 1887
9e3ec65c 1888The <-- HERE shows whereabouts in the regular expression the problem was
1a147d38
YO
1889discovered.
1890
fc36a67e
PP
1891=item Excessively long <> operator
1892
1893(F) The contents of a <> operator may not exceed the maximum size of a
1894Perl identifier. If you're just trying to glob a long list of
1895filenames, try using the glob() operator, or put the filenames into a
1896variable and glob that.
1897
ed9aa3b7
SG
1898=item exec? I'm not *that* kind of operating system
1899
af8bb25a 1900(F) The C<exec> function is not implemented on some systems, e.g., Symbian
6903afa2 1901OS. See L<perlport>.
ed9aa3b7 1902
fe13d51d 1903=item Execution of %s aborted due to compilation errors.
a0d0e21e
LW
1904
1905(F) The final summary message when a Perl compilation fails.
1906
1907=item Exiting eval via %s
1908
be771a83
GS
1909(W exiting) You are exiting an eval by unconventional means, such as a
1910goto, or a loop control statement.
e476b1b5
GS
1911
1912=item Exiting format via %s
1913
9a2ff54b 1914(W exiting) You are exiting a format by unconventional means, such as a
be771a83 1915goto, or a loop control statement.
a0d0e21e 1916
0a753a76
PP
1917=item Exiting pseudo-block via %s
1918
be771a83
GS
1919(W exiting) You are exiting a rather special block construct (like a
1920sort block or subroutine) by unconventional means, such as a goto, or a
1921loop control statement. See L<perlfunc/sort>.
0a753a76 1922
a0d0e21e
LW
1923=item Exiting subroutine via %s
1924
be771a83
GS
1925(W exiting) You are exiting a subroutine by unconventional means, such
1926as a goto, or a loop control statement.
a0d0e21e
LW
1927
1928=item Exiting substitution via %s
1929
be771a83
GS
1930(W exiting) You are exiting a substitution by unconventional means, such
1931as a return, a goto, or a loop control statement.
a0d0e21e 1932
c608e803
KW
1933=item Expecting close bracket in regex; marked by <-- HERE in m/%s/
1934
675fa9ff 1935(F) You wrote something like
c608e803
KW
1936
1937 (?13
1938
1939to denote a capturing group of the form
1940L<C<(?I<PARNO>)>|perlre/(?PARNO) (?-PARNO) (?+PARNO) (?R) (?0)>,
1941but omitted the C<")">.
1942
27350048
FC
1943=item Expecting '(?flags:(?[...' in regex; marked by <-- HERE in m/%s/
1944
8b6fbf55
FC
1945(F) The C<(?[...])> extended character class regular expression construct
1946only allows character classes (including character class escapes like
1947C<\d>), operators, and parentheses. The one exception is C<(?flags:...)>
1948containing at least one flag and exactly one C<(?[...])> construct.
27350048
FC
1949This allows a regular expression containing just C<(?[...])> to be
1950interpolated. If you see this error message, then you probably
1951have some other C<(?...)> construct inside your character class. See
1952L<perlrecharclass/Extended Bracketed Character Classes>.
1953
e7d0b801
FC
1954=item Experimental "%s" subs not enabled
1955
1956(F) To use lexical subs, you must first enable them:
1957
f1d34ca8 1958 no warnings 'experimental::lexical_subs';
e7d0b801
FC
1959 use feature 'lexical_subs';
1960 my sub foo { ... }
1961
7b8d334a
GS
1962=item Explicit blessing to '' (assuming package main)
1963
be771a83
GS
1964(W misc) You are blessing a reference to a zero length string. This has
1965the effect of blessing the reference into the package main. This is
1966usually not what you want. Consider providing a default target package,
1967e.g. bless($ref, $p || 'MyPackage');
7b8d334a 1968
6df41af2
GS
1969=item %s: Expression syntax
1970
be771a83
GS
1971(A) You've accidentally run your script through B<csh> instead of Perl.
1972Check the #! line, or manually feed your script into Perl yourself.
6df41af2
GS
1973
1974=item %s failed--call queue aborted
1975
3c10abe3
AG
1976(F) An untrapped exception was raised while executing a UNITCHECK,
1977CHECK, INIT, or END subroutine. Processing of the remainder of the
1978queue of such routines has been prematurely ended.
6df41af2 1979
7253e4e3 1980=item False [] range "%s" in regex; marked by <-- HERE in m/%s/
73b437c8 1981
4f2e2aa2 1982(W regexp)(F) A character class range must start and end at a literal
7253e4e3 1983character, not another character class like C<\d> or C<[:alpha:]>. The "-"
3c6ca74a
FC
1984in your false range is interpreted as a literal "-". In a C<(?[...])>
1985construct, this is an error, rather than a warning. Consider quoting
1986the "-", "\-". The <-- HERE shows whereabouts in the regular expression
1987the problem was discovered. See L<perlre>.
73b437c8 1988
1b1ee2ef 1989=item Fatal VMS error (status=%d) at %s, line %d
a0d0e21e 1990
be771a83
GS
1991(P) An error peculiar to VMS. Something untoward happened in a VMS
1992system service or RTL routine; Perl's exit status should provide more
1993details. The filename in "at %s" and the line number in "line %d" tell
1994you which section of the Perl source code is distressed.
a0d0e21e
LW
1995
1996=item fcntl is not implemented
1997
1998(F) Your machine apparently doesn't implement fcntl(). What is this, a
1999PDP-11 or something?
2000
22846ab4
AB
2001=item FETCHSIZE returned a negative value
2002
2003(F) A tied array claimed to have a negative number of elements, which
2004is not possible.
2005
f337b084
TH
2006=item Field too wide in 'u' format in pack
2007
d8b5cc61 2008(W pack) Each line in an uuencoded string starts with a length indicator
6903afa2
FC
2009which can't encode values above 63. So there is no point in asking for
2010a line length bigger than that. Perl will behave as if you specified
5c96f6f7 2011C<u63> as the format.
f337b084 2012
af8c498a 2013=item Filehandle %s opened only for input
a0d0e21e 2014
6c8d78fb
HS
2015(W io) You tried to write on a read-only filehandle. If you intended
2016it to be a read-write filehandle, you needed to open it with "+<" or
2017"+>" or "+>>" instead of with "<" or nothing. If you intended only to
2018write the file, use ">" or ">>". See L<perlfunc/open>.
a0d0e21e 2019
af8c498a 2020=item Filehandle %s opened only for output
a0d0e21e 2021
6c8d78fb
HS
2022(W io) You tried to read from a filehandle opened only for writing, If
2023you intended it to be a read/write filehandle, you needed to open it
89a1bda8
FC
2024with "+<" or "+>" or "+>>" instead of with ">". If you intended only to
2025read from the file, use "<". See L<perlfunc/open>. Another possibility
2026is that you attempted to open filedescriptor 0 (also known as STDIN) for
2027output (maybe you closed STDIN earlier?).
97828cef
RGS
2028
2029=item Filehandle %s reopened as %s only for input
2030
2031(W io) You opened for reading a filehandle that got the same filehandle id
6903afa2 2032as STDOUT or STDERR. This occurred because you closed STDOUT or STDERR
97828cef
RGS
2033previously.
2034
2035=item Filehandle STDIN reopened as %s only for output
2036
2037(W io) You opened for writing a filehandle that got the same filehandle id
fa816bf3 2038as STDIN. This occurred because you closed STDIN previously.
a0d0e21e
LW
2039
2040=item Final $ should be \$ or $name
2041
2042(F) You must now decide whether the final $ in a string was meant to be
be771a83
GS
2043a literal dollar sign, or was meant to introduce a variable name that
2044happens to be missing. So you have to put either the backslash or the
2045name.
a0d0e21e 2046
56e90b21
GS
2047=item flock() on closed filehandle %s
2048
be771a83 2049(W closed) The filehandle you're attempting to flock() got itself closed
c289d2f7 2050some time before now. Check your control flow. flock() operates on
be771a83
GS
2051filehandles. Are you attempting to call flock() on a dirhandle by the
2052same name?
56e90b21 2053
6df41af2
GS
2054=item Format not terminated
2055
2056(F) A format must be terminated by a line with a solitary dot. Perl got
2057to the end of your file without finding such a line.
2058
a0d0e21e
LW
2059=item Format %s redefined
2060
e476b1b5 2061(W redefine) You redefined a format. To suppress this warning, say
a0d0e21e
LW
2062
2063 {
271595cc 2064 no warnings 'redefine';
a0d0e21e
LW
2065 eval "format NAME =...";
2066 }
2067
a0d0e21e
LW
2068=item Found = in conditional, should be ==
2069
e476b1b5 2070(W syntax) You said
a0d0e21e
LW
2071
2072 if ($foo = 123)
2073
2074when you meant
2075
2076 if ($foo == 123)
2077
2078(or something like that).
2079
6df41af2
GS
2080=item %s found where operator expected
2081
56da5a46
RGS
2082(S syntax) The Perl lexer knows whether to expect a term or an operator.
2083If it sees what it knows to be a term when it was expecting to see an
be771a83
GS
2084operator, it gives you this warning. Usually it indicates that an
2085operator or delimiter was omitted, such as a semicolon.
6df41af2 2086
a0d0e21e
LW
2087=item gdbm store returned %d, errno %d, key "%s"
2088
2089(S) A warning from the GDBM_File extension that a store failed.
2090
2091=item gethostent not implemented
2092
2093(F) Your C library apparently doesn't implement gethostent(), probably
2094because if it did, it'd feel morally obligated to return every hostname
2095on the Internet.
2096
69282e91 2097=item get%sname() on closed socket %s
a0d0e21e 2098
be771a83
GS
2099(W closed) You tried to get a socket or peer socket name on a closed
2100socket. Did you forget to check the return value of your socket() call?
a0d0e21e 2101
748a9306
LW
2102=item getpwnam returned invalid UIC %#o for user "%s"
2103
2104(S) A warning peculiar to VMS. The call to C<sys$getuai> underlying the
2105C<getpwnam> operator returned an invalid UIC.
2106
6df41af2
GS
2107=item getsockopt() on closed socket %s
2108
be771a83
GS
2109(W closed) You tried to get a socket option on a closed socket. Did you
2110forget to check the return value of your socket() call? See
6df41af2
GS
2111L<perlfunc/getsockopt>.
2112
0f539b13
BF
2113=item given is experimental
2114
675fa9ff
FC
2115(S experimental::smartmatch) C<given> depends on smartmatch, which
2116is experimental, so its behavior may change or even be removed
2117in any future release of perl. See the explanation under
2118L<perlsyn/Experimental Details on given and when>.
0f539b13 2119
6df41af2
GS
2120=item Global symbol "%s" requires explicit package name
2121
a4edf47d 2122(F) You've said "use strict" or "use strict vars", which indicates
30c282f6 2123that all variables must either be lexically scoped (using "my" or "state"),
a4edf47d
GS
2124declared beforehand using "our", or explicitly qualified to say
2125which package the global variable is in (using "::").
6df41af2 2126
e476b1b5
GS
2127=item glob failed (%s)
2128
5ead438e 2129(S glob) Something went wrong with the external program(s) used
73c4e9dc
FC
2130for C<glob> and C<< <*.c> >>. Usually, this means that you supplied a C<glob>
2131pattern that caused the external program to fail and exit with a
be771a83 2132nonzero status. If the message indicates that the abnormal exit
73c4e9dc
FC
2133resulted in a coredump, this may also mean that your csh (C shell)
2134is broken. If so, you should change all of the csh-related variables
2135in config.sh: If you have tcsh, make the variables refer to it as
2136if it were csh (e.g. C<full_csh='/usr/bin/tcsh'>); otherwise, make them
2137all empty (except that C<d_csh> should be C<'undef'>) so that Perl will
be771a83 2138think csh is missing. In either case, after editing config.sh, run
75b44862 2139C<./Configure -S> and rebuild Perl.
e476b1b5 2140
a0d0e21e
LW
2141=item Glob not terminated
2142
2143(F) The lexer saw a left angle bracket in a place where it was expecting
be771a83
GS
2144a term, so it's looking for the corresponding right angle bracket, and
2145not finding it. Chances are you left some needed parentheses out
2146earlier in the line, and you really meant a "less than".
a0d0e21e 2147
bcd05b94 2148=item gmtime(%f) too large
8b56d6ff 2149
e9200be3 2150(W overflow) You called C<gmtime> with a number that was larger than
fc003d4b 2151it can reliably handle and C<gmtime> probably returned the wrong
6903afa2 2152date. This warning is also triggered with NaN (the special
fc003d4b
MS
2153not-a-number value).
2154
bcd05b94 2155=item gmtime(%f) too small
fc003d4b 2156
e9200be3 2157(W overflow) You called C<gmtime> with a number that was smaller than
e7a1a147 2158it can reliably handle and C<gmtime> probably returned the wrong date.
8b56d6ff 2159
6df41af2 2160=item Got an error from DosAllocMem
a0d0e21e 2161
6df41af2
GS
2162(P) An error peculiar to OS/2. Most probably you're using an obsolete
2163version of Perl, and this should not happen anyway.
a0d0e21e
LW
2164
2165=item goto must have label
2166
2167(F) Unlike with "next" or "last", you're not allowed to goto an
2168unspecified destination. See L<perlfunc/goto>.
2169
6651ba0b
FC
2170=item Goto undefined subroutine%s
2171
2172(F) You tried to call a subroutine with C<goto &sub> syntax, but
2173the indicated subroutine hasn't been defined, or if it was, it
2174has since been undefined.
2175
6fbc9859
MH
2176=item Group name must start with a non-digit word character in regex; marked by
2177<-- HERE in m/%s/
1f4f6bf1
YO
2178
2179(F) Group names must follow the rules for perl identifiers, meaning
f26c79ba
FC
2180they must start with a non-digit word character. A common cause of
2181this error is using (?&0) instead of (?0). See L<perlre>.
1f4f6bf1 2182
5a25739d
FC
2183=item ()-group starts with a count
2184
2185(F) A ()-group started with a count. A count is supposed to follow
2186something: a template character or a ()-group. See L<perlfunc/pack>.
2187
fe13d51d 2188=item %s had compilation errors.
6df41af2
GS
2189
2190(F) The final summary message when a C<perl -c> fails.
2191
a0d0e21e
LW
2192=item Had to create %s unexpectedly
2193
be771a83
GS
2194(S internal) A routine asked for a symbol from a symbol table that ought
2195to have existed already, but for some reason it didn't, and had to be
2196created on an emergency basis to prevent a core dump.
a0d0e21e
LW
2197
2198=item Hash %%s missing the % in argument %d of %s()
2199
be771a83
GS
2200(D deprecated) Really old Perl let you omit the % on hash names in some
2201spots. This is now heavily deprecated.
a0d0e21e 2202
6df41af2
GS
2203=item %s has too many errors
2204
2205(F) The parser has given up trying to parse the program after 10 errors.
2206Further error messages would likely be uninformative.
2207
252aa082
JH
2208=item Hexadecimal number > 0xffffffff non-portable
2209
e476b1b5 2210(W portable) The hexadecimal number you specified is larger than 2**32-1
9e24b6e2
JH
2211(4294967295) and therefore non-portable between systems. See
2212L<perlport> for more on portability concerns.
252aa082 2213
8903cb82
PP
2214=item Identifier too long
2215
2216(F) Perl limits identifiers (names for variables, functions, etc.) to
fc36a67e 2217about 250 characters for simple names, and somewhat more for compound
be771a83
GS
2218names (like C<$A::B>). You've exceeded Perl's limits. Future versions
2219of Perl are likely to eliminate these arbitrary limitations.
8903cb82 2220
b33c0c71 2221=item Ignoring zero length \N{} in character class in regex; marked by <-- HERE in m/%s/
fc8cd66c 2222
b5e3739b
FC
2223(W regexp) Named Unicode character escapes C<(\N{...})> may return a
2224zero-length sequence. When such an escape is used in a character class
2225its behaviour is not well defined. Check that the correct escape has
fc8cd66c
YO
2226been used, and the correct charname handler is in scope.
2227
6df41af2 2228=item Illegal binary digit %s
f675dbe5 2229
6df41af2 2230(F) You used a digit other than 0 or 1 in a binary number.
f675dbe5 2231
6df41af2 2232=item Illegal binary digit %s ignored
a0d0e21e 2233
be771a83
GS
2234(W digit) You may have tried to use a digit other than 0 or 1 in a
2235binary number. Interpretation of the binary number stopped before the
2236offending digit.
a0d0e21e 2237
6597eb22
FC
2238=item Illegal character after '_' in prototype for %s : %s
2239
e4d150f1
FC
2240(W illegalproto) An illegal character was found in a prototype
2241declaration. The '_' in a prototype must be followed by a ';',
2242indicating the rest of the parameters are optional, or one of '@'
2243or '%', since those two will accept 0 or more final parameters.
6597eb22 2244
78d0fecf 2245=item Illegal character \%o (carriage return)
4fdae800 2246
d5898338 2247(F) Perl normally treats carriage returns in the program text as it
be771a83
GS
2248would any other whitespace, which means you should never see this error
2249when Perl was built using standard options. For some reason, your
2250version of Perl appears to have been built without this support. Talk
2251to your Perl administrator.
4fdae800 2252
d37a9538
ST
2253=item Illegal character in prototype for %s : %s
2254
197afce1 2255(W illegalproto) An illegal character was found in a prototype declaration.
2e9cc7ef 2256Legal characters in prototypes are $, @, %, *, ;, [, ], &, \, and +.
d37a9538 2257
904d85c5
RGS
2258=item Illegal declaration of anonymous subroutine
2259
2260(F) When using the C<sub> keyword to construct an anonymous subroutine,
6903afa2 2261you must always specify a block of code. See L<perlsub>.
904d85c5 2262
8e742a20
MHM
2263=item Illegal declaration of subroutine %s
2264
6903afa2 2265(F) A subroutine was not declared correctly. See L<perlsub>.
8e742a20 2266
a0d0e21e
LW
2267=item Illegal division by zero
2268
be771a83
GS
2269(F) You tried to divide a number by 0. Either something was wrong in
2270your logic, or you need to put a conditional in to guard against
2271meaningless input.
a0d0e21e 2272
6df41af2
GS
2273=item Illegal hexadecimal digit %s ignored
2274
be771a83
GS
2275(W digit) You may have tried to use a character other than 0 - 9 or
2276A - F, a - f in a hexadecimal number. Interpretation of the hexadecimal
2277number stopped before the illegal character.
6df41af2 2278
a0d0e21e
LW
2279=item Illegal modulus zero
2280
be771a83
GS
2281(F) You tried to divide a number by 0 to get the remainder. Most
2282numbers don't take to this kindly.
a0d0e21e 2283
6df41af2 2284=item Illegal number of bits in vec
399388f4 2285
6df41af2
GS
2286(F) The number of bits in vec() (the third argument) must be a power of
2287two from 1 to 32 (or 64, if your platform supports that).
399388f4
GS
2288
2289=item Illegal octal digit %s
a0d0e21e 2290
d1be9408 2291(F) You used an 8 or 9 in an octal number.
a0d0e21e 2292
399388f4 2293=item Illegal octal digit %s ignored
748a9306 2294
d1be9408 2295(W digit) You may have tried to use an 8 or 9 in an octal number.
75b44862 2296Interpretation of the octal number stopped before the 8 or 9.
748a9306 2297
c608e803
KW
2298=item Illegal pattern in regex; marked by <-- HERE in m/%s/
2299
675fa9ff 2300(F) You wrote something like
c608e803
KW
2301
2302 (?+foo)
2303
2304The C<"+"> is valid only when followed by digits, indicating a
2305capturing group. See
2306L<C<(?I<PARNO>)>|perlre/(?PARNO) (?-PARNO) (?+PARNO) (?R) (?0)>.
2307
fe13d51d 2308=item Illegal switch in PERL5OPT: -%c
6ff81951 2309
6df41af2 2310(X) The PERL5OPT environment variable may only be used to set the
646ca9b2 2311following switches: B<-[CDIMUdmtw]>.
6ff81951 2312
6df41af2 2313=item Ill-formed CRTL environ value "%s"
81e118e0 2314
75b44862 2315(W internal) A warning peculiar to VMS. Perl tried to read the CRTL's
be771a83
GS
2316internal environ array, and encountered an element without the C<=>
2317delimiter used to separate keys from values. The element is ignored.
09bef843 2318
6df41af2 2319=item Ill-formed message in prime_env_iter: |%s|
54310121 2320
be771a83
GS
2321(W internal) A warning peculiar to VMS. Perl tried to read a logical
2322name or CLI symbol definition when preparing to iterate over %ENV, and
2323didn't see the expected delimiter between key and value, so the line was
2324ignored.
54310121 2325
6df41af2 2326=item (in cleanup) %s
9607fc9c 2327
be771a83
GS
2328(W misc) This prefix usually indicates that a DESTROY() method raised
2329the indicated exception. Since destructors are usually called by the
2330system at arbitrary points during execution, and often a vast number of
2331times, the warning is issued only once for any number of failures that
2332would otherwise result in the same message being repeated.
6df41af2 2333
be771a83
GS
2334Failure of user callbacks dispatched using the C<G_KEEPERR> flag could
2335also result in this warning. See L<perlcall/G_KEEPERR>.
9607fc9c 2336
0d0b4b3b
KW
2337=item Incomplete expression within '(?[ ])' in regex; marked by <-- HERE in m/%s/
2338
675fa9ff 2339(F) There was a syntax error within the C<(?[ ])>. This can happen if the
0d0b4b3b
KW
2340expression inside the construct was completely empty, or if there are
2341too many or few operands for the number of operators. Perl is not smart
2342enough to give you a more precise indication as to what is wrong.
2343
6fbc9859
MH
2344=item Inconsistent hierarchy during C3 merge of class '%s': merging failed on
2345parent '%s'
2c7d6b9c
RGS
2346
2347(F) The method resolution order (MRO) of the given class is not
2348C3-consistent, and you have enabled the C3 MRO for this class. See the C3
2349documentation in L<mro> for more information.
2350
979699d9
JH
2351=item In EBCDIC the v-string components cannot exceed 2147483647
2352
2353(F) An error peculiar to EBCDIC. Internally, v-strings are stored as
2354Unicode code points, and encoded in EBCDIC as UTF-EBCDIC. The UTF-EBCDIC
2355encoding is limited to code points no larger than 2147483647 (0x7FFFFFFF).
2356
6a2ed79a 2357=item Infinite recursion in regex
1a147d38
YO
2358
2359(F) You used a pattern that references itself without consuming any input
6903afa2 2360text. You should check the pattern to ensure that recursive patterns
1a147d38
YO
2361either consume text or fail.
2362
6dbe9451
NC
2363=item Initialization of state variables in list context currently forbidden
2364
6903afa2
FC
2365(F) Currently the implementation of "state" only permits the
2366initialization of scalar variables in scalar context. Re-write
2367C<state ($a) = 42> as C<state $a = 42> to change from list to scalar
2368context. Constructions such as C<state (@a) = foo()> will be
2369supported in a future perl release.
6dbe9451 2370
a0d0e21e
LW
2371=item Insecure dependency in %s
2372
8b1a09fc 2373(F) You tried to do something that the tainting mechanism didn't like.
be771a83
GS
2374The tainting mechanism is turned on when you're running setuid or
2375setgid, or when you specify B<-T> to turn it on explicitly. The
2376tainting mechanism labels all data that's derived directly or indirectly
2377from the user, who is considered to be unworthy of your trust. If any
2378such data is used in a "dangerous" operation, you get this error. See
2379L<perlsec> for more information.
a0d0e21e
LW
2380
2381=item Insecure directory in %s
2382
be771a83
GS
2383(F) You can't use system(), exec(), or a piped open in a setuid or
2384setgid script if C<$ENV{PATH}> contains a directory that is writable by
df98f984
RGS
2385the world. Also, the PATH must not contain any relative directory.
2386See L<perlsec>.
a0d0e21e 2387
62f468fc 2388=item Insecure $ENV{%s} while running %s
a0d0e21e
LW
2389
2390(F) You can't use system(), exec(), or a piped open in a setuid or
62f468fc 2391setgid script if any of C<$ENV{PATH}>, C<$ENV{IFS}>, C<$ENV{CDPATH}>,
332d5f78
SR
2392C<$ENV{ENV}>, C<$ENV{BASH_ENV}> or C<$ENV{TERM}> are derived from data
2393supplied (or potentially supplied) by the user. The script must set
2394the path to a known value, using trustworthy data. See L<perlsec>.
a0d0e21e 2395
0e9be77f
DM
2396=item Insecure user-defined property %s
2397
2398(F) Perl detected tainted data when trying to compile a regular
2399expression that contains a call to a user-defined character property
2400function, i.e. C<\p{IsFoo}> or C<\p{InFoo}>.
2401See L<perlunicode/User-Defined Character Properties> and L<perlsec>.
2402
675fa9ff
FC
2403=item In '(?...)', splitting the initial '(?' is deprecated in regex; marked by <-- HERE in m/%s/
2404
2405(D regexp, deprecated) The two-character sequence C<"(?"> in
2406this context in a regular expression pattern should be an
2407indivisible token, with nothing intervening between the C<"(">
2408and the C<"?">, but you separated them. Due to an accident of
2409implementation, this prohibition was not enforced, but we do
2410plan to forbid it in a future Perl version. This message
2411serves as giving you fair warning of this pending change.
2412
b9ef414d
FC
2413=item Integer overflow in format string for %s
2414
2415(F) The indexes and widths specified in the format string of C<printf()>
2416or C<sprintf()> are too large. The numbers must not overflow the size of
2417integers for your architecture.
2418
a7ae9550
GS
2419=item Integer overflow in %s number
2420
35928bc5 2421(S overflow) The hexadecimal, octal or binary number you have specified
be771a83
GS
2422either as a literal or as an argument to hex() or oct() is too big for
2423your architecture, and has been converted to a floating point number.
2424On a 32-bit architecture the largest hexadecimal, octal or binary number
9e24b6e2
JH
2425representable without overflow is 0xFFFFFFFF, 037777777777, or
24260b11111111111111111111111111111111 respectively. Note that Perl
2427transparently promotes all numbers to a floating point representation
2428internally--subject to loss of precision errors in subsequent
2429operations.
bbce6d69 2430
fc89ca81
FC
2431=item Integer overflow in srand
2432
2433(S overflow) The number you have passed to srand is too big to fit
2434in your architecture's integer representation. The number has been
2435replaced with the largest integer supported (0xFFFFFFFF on 32-bit
2436architectures). This means you may be getting less randomness than
2437you expect, because different random seeds above the maximum will
2438return the same sequence of random numbers.
2439
46314c13
JP
2440=item Integer overflow in version
2441
18da5252
FC
2442=item Integer overflow in version %d
2443
784d71ed
FC
2444(W overflow) Some portion of a version initialization is too large for
2445the size of integers for your architecture. This is not a warning
f084e84f 2446because there is no rational reason for a version to try and use an
784d71ed
FC
2447element larger than typically 2**32. This is usually caused by trying
2448to use some odd mathematical operation as a version, like 100/9.
46314c13 2449
7253e4e3 2450=item Internal disaster in regex; marked by <-- HERE in m/%s/
6df41af2
GS
2451
2452(P) Something went badly wrong in the regular expression parser.
9e3ec65c 2453The <-- HERE shows whereabouts in the regular expression the problem was
b45f050a
JF
2454discovered.
2455
748a9306
LW
2456=item Internal inconsistency in tracking vforks
2457
be771a83
GS
2458(S) A warning peculiar to VMS. Perl keeps track of the number of times
2459you've called C<fork> and C<exec>, to determine whether the current call
2460to C<exec> should affect the current script or a subprocess (see
2461L<perlvms/"exec LIST">). Somehow, this count has become scrambled, so
2462Perl is making a guess and treating this C<exec> as a request to
2463terminate the Perl script and execute the specified command.
748a9306 2464
870978ae
FC
2465=item internal %<num>p might conflict with future printf extensions
2466
2467(S internal) Perl's internal routine that handles C<printf> and C<sprintf>
2468formatting follows a slightly different set of rules when called from
2469C or XS code. Specifically, formats consisting of digits followed
2470by "p" (e.g., "%7p") are reserved for future use. If you see this
2471message, then an XS module tried to call that routine with one such
2472reserved format.
2473
7253e4e3 2474=item Internal urp in regex; marked by <-- HERE in m/%s/
b45f050a 2475
fa816bf3 2476(P) Something went badly awry in the regular expression parser. The
9e3ec65c 2477<-- HERE shows whereabouts in the regular expression the problem was
7253e4e3 2478discovered.
a0d0e21e 2479
6df41af2
GS
2480=item %s (...) interpreted as function
2481
75b44862 2482(W syntax) You've run afoul of the rule that says that any list operator
be771a83 2483followed by parentheses turns into a function, with all the list
64977eb6 2484operators arguments found inside the parentheses. See
13a2d996 2485L<perlop/Terms and List Operators (Leftward)>.
6df41af2 2486
09bef843
SB
2487=item Invalid %s attribute: %s
2488
a4a4c9e2 2489(F) The indicated attribute for a subroutine or variable was not recognized
09bef843
SB
2490by Perl or by a user-supplied handler. See L<attributes>.
2491
2492=item Invalid %s attributes: %s
2493
a4a4c9e2 2494(F) The indicated attributes for a subroutine or variable were not
be771a83 2495recognized by Perl or by a user-supplied handler. See L<attributes>.
09bef843 2496
225fb84f
KW
2497=item Invalid character in charnames alias definition; marked by <-- HERE in '%s
2498
2499(F) You tried to create a custom alias for a character name, with
2500the C<:alias> option to C<use charnames> and the specified character in
2501the indicated name isn't valid. See L<charnames/CUSTOM ALIASES>.
2502
5a25739d
FC
2503=item Invalid character in \N{...}; marked by <-- HERE in \N{%s}
2504
2505(F) Only certain characters are valid for character names. The
2506indicated one isn't. See L<charnames/CUSTOM ALIASES>.
2507
c635e13b
PP
2508=item Invalid conversion in %s: "%s"
2509
be771a83
GS
2510(W printf) Perl does not understand the given format conversion. See
2511L<perlfunc/sprintf>.
c635e13b 2512
6fbc9859
MH
2513=item Invalid escape in the specified encoding in regex; marked by <-- HERE in
2514m/%s/
9e08bc66
ST
2515
2516(W regexp) The numeric escape (for example C<\xHH>) of value < 256
2517didn't correspond to a single character through the conversion
2518from the encoding specified by the encoding pragma.
2519The escape was replaced with REPLACEMENT CHARACTER (U+FFFD) instead.
9e3ec65c 2520The <-- HERE shows whereabouts in the regular expression the
9e08bc66
ST
2521escape was discovered.
2522
8149aa9f
FC
2523=item Invalid hexadecimal number in \N{U+...}
2524
6fbc9859
MH
2525=item Invalid hexadecimal number in \N{U+...} in regex; marked by <-- HERE in
2526m/%s/
aec0ef10 2527
8149aa9f 2528(F) The character constant represented by C<...> is not a valid hexadecimal
74f8e9e3
FC
2529number. Either it is empty, or you tried to use a character other than
25300 - 9 or A - F, a - f in a hexadecimal number.
8149aa9f 2531
6651ba0b
FC
2532=item Invalid module name %s with -%c option: contains single ':'
2533
2534(F) The module argument to perl's B<-m> and B<-M> command-line options
2535cannot contain single colons in the module name, but only in the
2536arguments after "=". In other words, B<-MFoo::Bar=:baz> is ok, but
2537B<-MFoo:Bar=baz> is not.
2538
2c7d6b9c
RGS
2539=item Invalid mro name: '%s'
2540
162a3e34
FC
2541(F) You tried to C<mro::set_mro("classname", "foo")> or C<use mro 'foo'>,
2542where C<foo> is not a valid method resolution order (MRO). Currently,
2543the only valid ones supported are C<dfs> and C<c3>, unless you have loaded
2544a module that is a MRO plugin. See L<mro> and L<perlmroapi>.
2c7d6b9c 2545
40e4140b
FC
2546=item Invalid negative number (%s) in chr
2547
2548(W utf8) You passed a negative number to C<chr>. Negative numbers are
2549not valid characters numbers, so it return the Unicode replacement
2550character (U+FFFD).
2551
6651ba0b
FC
2552=item invalid option -D%c, use -D'' to see choices
2553
8ff21bfe
FC
2554(S debugging) Perl was called with invalid debugger flags. Call perl
2555with the B<-D> option with no flags to see the list of acceptable values.
982c4ecb 2556See also L<perlrun/-Dletters>.
6651ba0b 2557
7253e4e3 2558=item Invalid [] range "%s" in regex; marked by <-- HERE in m/%s/
6df41af2
GS
2559
2560(F) The range specified in a character class had a minimum character
7253e4e3
RK
2561greater than the maximum character. One possibility is that you forgot the
2562C<{}> from your ending C<\x{}> - C<\x> without the curly braces can go only
9e3ec65c 2563up to C<ff>. The <-- HERE shows whereabouts in the regular expression the
7253e4e3 2564problem was discovered. See L<perlre>.
6df41af2 2565
d1573ac7 2566=item Invalid range "%s" in transliteration operator
c2e66d9e
GS
2567
2568(F) The range specified in the tr/// or y/// operator had a minimum
2569character greater than the maximum character. See L<perlop>.
2570
09bef843
SB
2571=item Invalid separator character %s in attribute list
2572
0120eecf 2573(F) Something other than a colon or whitespace was seen between the
be771a83
GS
2574elements of an attribute list. If the previous attribute had a
2575parenthesised parameter list, perhaps that list was terminated too soon.
2576See L<attributes>.
09bef843 2577
b4581f09
JH
2578=item Invalid separator character %s in PerlIO layer specification %s
2579
2bfc5f71
FC
2580(W layer) When pushing layers onto the Perl I/O system, something other
2581than a colon or whitespace was seen between the elements of a layer list.
b4581f09
JH
2582If the previous attribute had a parenthesised parameter list, perhaps that
2583list was terminated too soon.
2584
2c86d456
DG
2585=item Invalid strict version format (%s)
2586
fa816bf3 2587(F) A version number did not meet the "strict" criteria for versions.
2c86d456
DG
2588A "strict" version number is a positive decimal number (integer or
2589decimal-fraction) without exponentiation or else a dotted-decimal
2590v-string with a leading 'v' character and at least three components.
a6485a24 2591The parenthesized text indicates which criteria were not met.
2c86d456
DG
2592See the L<version> module for more details on allowed version formats.
2593
49704364 2594=item Invalid type '%s' in %s
96e4d5b1 2595
49704364
LW
2596(F) The given character is not a valid pack or unpack type.
2597See L<perlfunc/pack>.
6728c851 2598
49704364 2599(W) The given character is not a valid pack or unpack type but used to be
75b44862 2600silently ignored.
96e4d5b1 2601
2c86d456
DG
2602=item Invalid version format (%s)
2603
fa816bf3 2604(F) A version number did not meet the "lax" criteria for versions.
2c86d456
DG
2605A "lax" version number is a positive decimal number (integer or
2606decimal-fraction) without exponentiation or else a dotted-decimal
fa816bf3
FC
2607v-string. If the v-string has fewer than three components, it
2608must have a leading 'v' character. Otherwise, the leading 'v' is
2609optional. Both decimal and dotted-decimal versions may have a
2610trailing "alpha" component separated by an underscore character
2611after a fractional or dotted-decimal component. The parenthesized
2612text indicates which criteria were not met. See the L<version> module
2613for more details on allowed version formats.
46314c13 2614
798ae1b7
DG
2615=item Invalid version object
2616
fa816bf3
FC
2617(F) The internal structure of the version object was invalid.
2618Perhaps the internals were modified directly in some way or
2619an arbitrary reference was blessed into the "version" class.
798ae1b7 2620
675fa9ff
FC
2621=item In '(*VERB...)', splitting the initial '(*' is deprecated in regex; marked by <-- HERE in m/%s/
2622
2623(D regexp, deprecated) The two-character sequence C<"(*"> in
2624this context in a regular expression pattern should be an
2625indivisible token, with nothing intervening between the C<"(">
f26c79ba 2626and the C<"*">, but you separated them. Due to an accident of
675fa9ff
FC
2627implementation, this prohibition was not enforced, but we do
2628plan to forbid it in a future Perl version. This message
2629serves as giving you fair warning of this pending change.
2630
a0d0e21e
LW
2631=item ioctl is not implemented
2632
2633(F) Your machine apparently doesn't implement ioctl(), which is pretty
2634strange for a machine that supports C.
2635
c289d2f7
JH
2636=item ioctl() on unopened %s
2637
2638(W unopened) You tried ioctl() on a filehandle that was never opened.
34b6fd5e 2639Check your control flow and number of arguments.
c289d2f7 2640
fe13d51d 2641=item IO layers (like '%s') unavailable
363c40c4
SB
2642
2643(F) Your Perl has not been configured to have PerlIO, and therefore
34b6fd5e 2644you cannot use IO layers. To have PerlIO, Perl must be configured
363c40c4
SB
2645with 'useperlio'.
2646
80cbd5ad
JH
2647=item IO::Socket::atmark not implemented on this architecture
2648
2649(F) Your machine doesn't implement the sockatmark() functionality,
34b6fd5e 2650neither as a system call nor an ioctl call (SIOCATMARK).
80cbd5ad 2651
4f650b80 2652=item $* is no longer supported
b4581f09 2653
4f650b80
NC
2654(D deprecated, syntax) The special variable C<$*>, deprecated in older
2655perls, has been removed as of 5.9.0 and is no longer supported. In
2656previous versions of perl the use of C<$*> enabled or disabled multi-line
2657matching within a string.
4fd19576
B
2658
2659Instead of using C<$*> you should use the C</m> (and maybe C</s>) regexp
6903afa2
FC
2660modifiers. You can enable C</m> for a lexical scope (even a whole file)
2661with C<use re '/m'>. (In older versions: when C<$*> was set to a true value
570dedd4 2662then all regular expressions behaved as if they were written using C</m>.)
b4581f09 2663
8ae1fe26
RGS
2664=item $# is no longer supported
2665
a58ac25e 2666(D deprecated, syntax) The special variable C<$#>, deprecated in older
6903afa2 2667perls, has been removed as of 5.9.3 and is no longer supported. You
a58ac25e 2668should use the printf/sprintf functions instead.
8ae1fe26 2669
ccf3535a 2670=item '%s' is not a code reference
6ad11d81 2671
6903afa2
FC
2672(W overload) The second (fourth, sixth, ...) argument of
2673overload::constant needs to be a code reference. Either
2674an anonymous subroutine, or a reference to a subroutine.
6ad11d81 2675
ccf3535a 2676=item '%s' is not an overloadable type
6ad11d81 2677
04a80ee0
RGS
2678(W overload) You tried to overload a constant type the overload package is
2679unaware of.
6ad11d81 2680
5a25739d
FC
2681=item -i used with no filenames on the command line, reading from STDIN
2682
2683(S inplace) The C<-i> option was passed on the command line, indicating
2684that the script is intended to edit files in place, but no files were
2685given. This is usually a mistake, since editing STDIN in place doesn't
2686make sense, and can be confusing because it can make perl look like
2687it is hanging when it is really just trying to read from STDIN. You
2688should either pass a filename to edit, or remove C<-i> from the command
2689line. See L<perlrun> for more details.
2690
aec0ef10 2691=item Junk on end of regexp in regex m/%s/
a0d0e21e
LW
2692
2693(P) The regular expression parser is confused.
2694
2695=item Label not found for "last %s"
2696
be771a83
GS
2697(F) You named a loop to break out of, but you're not currently in a loop
2698of that name, not even if you count where you were called from. See
2699L<perlfunc/last>.
a0d0e21e
LW
2700
2701=item Label not found for "next %s"
2702
2703(F) You named a loop to continue, but you're not currently in a loop of
2704that name, not even if you count where you were called from. See
2705L<perlfunc/last>.
2706
2707=item Label not found for "redo %s"
2708
2709(F) You named a loop to restart, but you're not currently in a loop of
2710that name, not even if you count where you were called from. See
2711L<perlfunc/last>.
2712
85ab1d1d 2713=item leaving effective %s failed
5ff3f7a4 2714
85ab1d1d 2715(F) While under the C<use filetest> pragma, switching the real and
5ff3f7a4
GS
2716effective uids or gids failed.
2717
49704364
LW
2718=item length/code after end of string in unpack
2719
d7f8936a 2720(F) While unpacking, the string buffer was already used up when an unpack
6903afa2
FC
2721length/code combination tried to obtain more data. This results in
2722an undefined value for the length. See L<perlfunc/pack>.
49704364 2723
25e26107 2724=item length() used on %s (did you mean "scalar(%s)"?)
e508c8a4 2725
0d46a4e7
FC
2726(W syntax) You used length() on either an array or a hash when you
2727probably wanted a count of the items.
e508c8a4
MH
2728
2729Array size can be obtained by doing:
2730
2731 scalar(@array);
2732
2733The number of items in a hash can be obtained by doing:
2734
2735 scalar(keys %hash);
2736
f0e67a1d
Z
2737=item Lexing code attempted to stuff non-Latin-1 character into Latin-1 input
2738
d4fe7078
RS
2739(F) An extension is attempting to insert text into the current parse
2740(using L<lex_stuff_pvn|perlapi/lex_stuff_pvn> or similar), but tried to insert a character that
2741couldn't be part of the current input. This is an inherent pitfall
2742of the stuffing mechanism, and one of the reasons to avoid it. Where
6903afa2 2743it is necessary to stuff, stuffing only plain ASCII is recommended.
f0e67a1d
Z
2744
2745=item Lexing code internal error (%s)
2746
2747(F) Lexing code supplied by an extension violated the lexer's API in a
2748detectable way.
2749
69282e91 2750=item listen() on closed socket %s
a0d0e21e 2751
be771a83
GS
2752(W closed) You tried to do a listen on a closed socket. Did you forget
2753to check the return value of your socket() call? See
2754L<perlfunc/listen>.
a0d0e21e 2755
6651ba0b
FC
2756=item List form of piped open not implemented
2757
2758(F) On some platforms, notably Windows, the three-or-more-arguments
2759form of C<open> does not support pipes, such as C<open($pipe, '|-', @args)>.
2760Use the two-argument C<open($pipe, '|prog arg1 arg2...')> form instead.
2761
bcd05b94 2762=item localtime(%f) too large
8b56d6ff 2763
e9200be3 2764(W overflow) You called C<localtime> with a number that was larger
fc003d4b 2765than it can reliably handle and C<localtime> probably returned the
6903afa2 2766wrong date. This warning is also triggered with NaN (the special
fc003d4b
MS
2767not-a-number value).
2768
bcd05b94 2769=item localtime(%f) too small
fc003d4b 2770
e9200be3 2771(W overflow) You called C<localtime> with a number that was smaller
fc003d4b 2772than it can reliably handle and C<localtime> probably returned the
e7a1a147 2773wrong date.
8b56d6ff 2774
58e23c8d 2775=item Lookbehind longer than %d not implemented in regex m/%s/
b45f050a
JF
2776
2777(F) There is currently a limit on the length of string which lookbehind can
6903afa2 2778handle. This restriction may be eased in a future release.
2e50fd82 2779
b88df990
NC
2780=item Lost precision when %s %f by 1
2781
e63e8a91
FC
2782(W imprecision) The value you attempted to increment or decrement by one
2783is too large for the underlying floating point representation to store
2784accurately, hence the target of C<++> or C<--> is unchanged. Perl issues this
2785warning because it has already switched from integers to floating point
2786when values are too large for integers, and now even floating point is
2787insufficient. You may wish to switch to using L<Math::BigInt> explicitly.
b88df990 2788
93fad930 2789=item lstat() on filehandle%s
2f7da168
RK
2790
2791(W io) You tried to do an lstat on a filehandle. What did you mean
2792by that? lstat() makes sense only on filenames. (Perl did a fstat()
2793instead on the filehandle.)
2794
345d70e3 2795=item lvalue attribute %s already-defined subroutine
bb3abb05 2796
345d70e3
FC
2797(W misc) Although L<attributes.pm|attributes> allows this, turning the lvalue
2798attribute on or off on a Perl subroutine that is already defined
2799does not always work properly. It may or may not do what you
2800want, depending on what code is inside the subroutine, with exact
2801details subject to change between Perl versions. Only do this
2802if you really know what you are doing.
bb3abb05 2803
885ef6f5
GG
2804=item lvalue attribute ignored after the subroutine has been defined
2805
345d70e3
FC
2806(W misc) Using the C<:lvalue> declarative syntax to make a Perl
2807subroutine an lvalue subroutine after it has been defined is
2808not permitted. To make the subroutine an lvalue subroutine,
2809add the lvalue attribute to the definition, or put the C<sub
2810foo :lvalue;> declaration before the definition.
2811
2812See also L<attributes.pm|attributes>.
885ef6f5 2813
6f1b3ab0
FC
2814=item Magical list constants are not supported
2815
2816(F) You assigned a magical array to a stash element, and then tried
2817to use the subroutine from the same slot. You are asking Perl to do
2818something it cannot do, details subject to change between Perl versions.
2819
2db62bbc 2820=item Malformed integer in [] in pack
49704364 2821
2db62bbc 2822(F) Between the brackets enclosing a numeric repeat count only digits
49704364
LW
2823are permitted. See L<perlfunc/pack>.
2824
2825=item Malformed integer in [] in unpack
2826
2db62bbc 2827(F) Between the brackets enclosing a numeric repeat count only digits
49704364
LW
2828are permitted. See L<perlfunc/pack>.
2829
6df41af2
GS
2830=item Malformed PERLLIB_PREFIX
2831
2832(F) An error peculiar to OS/2. PERLLIB_PREFIX should be of the form
2833
2834 prefix1;prefix2
2835
2836or
6df41af2
GS
2837 prefix1 prefix2
2838
be771a83
GS
2839with nonempty prefix1 and prefix2. If C<prefix1> is indeed a prefix of
2840a builtin library search path, prefix2 is substituted. The error may
2841appear if components are not found, or are too long. See
fecfaeb8 2842"PERLLIB_PREFIX" in L<perlos2>.
6df41af2 2843
2f758a16
ST
2844=item Malformed prototype for %s: %s
2845
d37a9538
ST
2846(F) You tried to use a function with a malformed prototype. The
2847syntax of function prototypes is given a brief compile-time check for
2848obvious errors like invalid characters. A more rigorous check is run
2849when the function is called.
2f758a16 2850
ba210ebe
JH
2851=item Malformed UTF-8 character (%s)
2852
4d6f11e5 2853(S utf8)(F) Perl detected a string that didn't comply with UTF-8
2575c402 2854encoding rules, even though it had the UTF8 flag on.
ba210ebe 2855
2575c402
JW
2856One possible cause is that you set the UTF8 flag yourself for data that
2857you thought to be in UTF-8 but it wasn't (it was for example legacy
6903afa2 28588-bit data). To guard against this, you can use Encode::decode_utf8.
2575c402
JW
2859
2860If you use the C<:encoding(UTF-8)> PerlIO layer for input, invalid byte
2861sequences are handled gracefully, but if you use C<:utf8>, the flag is
2862set without validating the data, possibly resulting in this error
2863message.
2864
2865See also L<Encode/"Handling Malformed Data">.
901b21bf 2866
107160e2
KW
2867=item Malformed UTF-8 character immediately after '%s'
2868
2869(F) You said C<use utf8>, but the program file doesn't comply with UTF-8
2870encoding rules. The message prints out the properly encoded characters
2871just before the first bad one. If C<utf8> warnings are enabled, a
2872warning is generated that gives more details about the type of
2873malformation.
2874
bde9e88d 2875=item Malformed UTF-8 returned by \N{%s} immediately after '%s'
ff3f963a
KW
2876
2877(F) The charnames handler returned malformed UTF-8.
2878
4a5d3a93
FC
2879=item Malformed UTF-8 string in '%c' format in unpack
2880
2881(F) You tried to unpack something that didn't comply with UTF-8 encoding
2882rules and perl was unable to guess how to make more progress.
2883
f337b084
TH
2884=item Malformed UTF-8 string in pack
2885
2886(F) You tried to pack something that didn't comply with UTF-8 encoding
2887rules and perl was unable to guess how to make more progress.
2888
2889=item Malformed UTF-8 string in unpack
2890
2891(F) You tried to unpack something that didn't comply with UTF-8 encoding
2892rules and perl was unable to guess how to make more progress.
2893
4a5d3a93 2894=item Malformed UTF-16 surrogate
f337b084 2895
4a5d3a93
FC
2896(F) Perl thought it was reading UTF-16 encoded character data but while
2897doing it Perl met a malformed Unicode surrogate.
2898
2899=item %s matches null string many times in regex; marked by <-- HERE in m/%s/
2900
2901(W regexp) The pattern you've specified would be an infinite loop if the
2902regular expression engine didn't specifically check for that. The <-- HERE
9e3ec65c 2903shows whereabouts in the regular expression the problem was discovered.
4a5d3a93 2904See L<perlre>.
f337b084 2905
de42a5a9 2906=item Maximal count of pending signals (%u) exceeded
2563cec5 2907
6903afa2 2908(F) Perl aborted due to too high a number of signals pending. This
2563cec5
IZ
2909usually indicates that your operating system tried to deliver signals
2910too fast (with a very high priority), starving the perl process from
2911resources it would need to reach a point where it can process signals
6903afa2 2912safely. (See L<perlipc/"Deferred Signals (Safe Signals)">.)
2563cec5 2913
25f58aea
PN
2914=item "%s" may clash with future reserved word
2915
2916(W) This warning may be due to running a perl5 script through a perl4
2917interpreter, especially if the word that is being warned about is
2918"use" or "my".
2919
0d2487cd 2920=item '%' may not be used in pack
6df41af2
GS
2921
2922(F) You can't pack a string by supplying a checksum, because the
be771a83
GS
2923checksumming process loses information, and you can't go the other way.
2924See L<perlfunc/unpack>.
6df41af2 2925
a0d0e21e
LW
2926=item Method for operation %s not found in package %s during blessing
2927
2928(F) An attempt was made to specify an entry in an overloading table that
e7ea3e70 2929doesn't resolve to a valid subroutine. See L<overload>.
a0d0e21e 2930
3cdd684c
TP
2931=item Method %s not permitted
2932
2933See Server error.
2934
a0d0e21e
LW
2935=item Might be a runaway multi-line %s string starting on line %d
2936
2937(S) An advisory indicating that the previous error may have been caused
2938by a missing delimiter on a string or pattern, because it eventually
2939ended earlier on the current line.
2940
2941=item Misplaced _ in number
2942
d4ced10d
JH
2943(W syntax) An underscore (underbar) in a numeric constant did not
2944separate two digits.
a0d0e21e 2945
7baa4690
HS
2946=item Missing argument in %s
2947
2948(W uninitialized) A printf-type format required more arguments than were
2949supplied.
2950
9e81e6a1
RGS
2951=item Missing argument to -%c
2952
2953(F) The argument to the indicated command line switch must follow
2954immediately after the switch, without intervening spaces.
2955
ff3f963a 2956=item Missing braces on \N{}
423cee85 2957
aec0ef10
FC
2958=item Missing braces on \N{} in regex; marked by <-- HERE in m/%s/
2959
4a2d328f 2960(F) Wrong syntax of character name literal C<\N{charname}> within
532cb70d
FC
2961double-quotish context. This can also happen when there is a space
2962(or comment) between the C<\N> and the C<{> in a regex with the C</x> modifier.
2963This modifier does not change the requirement that the brace immediately
2964follow the C<\N>.
423cee85 2965
f0a2b745
KW
2966=item Missing braces on \o{}
2967
2968(F) A C<\o> must be followed immediately by a C<{> in double-quotish context.
2969
a0d0e21e
LW
2970=item Missing comma after first argument to %s function
2971
2972(F) While certain functions allow you to specify a filehandle or an
2973"indirect object" before the argument list, this ain't one of them.
2974
06eaf0bc
GS
2975=item Missing command in piped open
2976
be771a83
GS
2977(W pipe) You used the C<open(FH, "| command")> or
2978C<open(FH, "command |")> construction, but the command was missing or
2979blank.
06eaf0bc 2980
961ce445
RGS
2981=item Missing control char name in \c
2982
2983(F) A double-quoted string ended with "\c", without the required control
2984character name.
2985
8767b1ab 2986=item Missing name in "%s sub"
6df41af2 2987
be771a83
GS
2988(F) The reserved syntax for lexically scoped subroutines requires that
2989they have a name with which they can be found.
6df41af2
GS
2990
2991=item Missing $ on loop variable
2992
be771a83
GS
2993(F) Apparently you've been programming in B<csh> too much. Variables
2994are always mentioned with the $ in Perl, unlike in the shells, where it
2995can vary from one line to the next.
6df41af2 2996
50278ed0
PM
2997=item Missing ']' in prototype for %s : %s
2998
2999(W illegalproto) A grouping was started with C<[> but never closed with
3000C<]>.
3001
cc507455 3002=item (Missing operator before %s?)
748a9306 3003
56da5a46
RGS
3004(S syntax) This is an educated guess made in conjunction with the message
3005"%s found where operator expected". Often the missing operator is a comma.
748a9306 3006
aec0ef10 3007=item Missing right brace on \%c{} in regex; marked by <-- HERE in m/%s/
ab13f0c7 3008
ff3f963a
KW
3009(F) Missing right brace in C<\x{...}>, C<\p{...}>, C<\P{...}>, or C<\N{...}>.
3010
4a68bf9d 3011=item Missing right brace on \N{} or unescaped left brace after \N
ff3f963a 3012
d32207c9
FC
3013(F) C<\N> has two meanings.
3014
3015The traditional one has it followed by a name enclosed in braces,
3016meaning the character (or sequence of characters) given by that
fa816bf3 3017name. Thus C<\N{ASTERISK}> is another way of writing C<*>, valid in both
d32207c9
FC
3018double-quoted strings and regular expression patterns. In patterns,
3019it doesn't have the meaning an unescaped C<*> does.
3020
3021Starting in Perl 5.12.0, C<\N> also can have an additional meaning (only)
3022in patterns, namely to match a non-newline character. (This is short
3023for C<[^\n]>, and like C<.> but is not affected by the C</s> regex modifier.)
3024
3025This can lead to some ambiguities. When C<\N> is not followed immediately
3026by a left brace, Perl assumes the C<[^\n]> meaning. Also, if the braces
3027form a valid quantifier such as C<\N{3}> or C<\N{5,}>, Perl assumes that this
3028means to match the given quantity of non-newlines (in these examples,
30293; and 5 or more, respectively). In all other case, where there is a
3030C<\N{> and a matching C<}>, Perl assumes that a character name is desired.
3031
3032However, if there is no matching C<}>, Perl doesn't know if it was
3033mistakenly omitted, or if C<[^\n]{> was desired, and raises this error.
3034If you meant the former, add the right brace; if you meant the latter,
3035escape the brace with a backslash, like so: C<\N\{>
ab13f0c7 3036
d98d5fff 3037=item Missing right curly or square bracket
a0d0e21e 3038
be771a83
GS
3039(F) The lexer counted more opening curly or square brackets than closing
3040ones. As a general rule, you'll find it's missing near the place you
3041were last editing.
a0d0e21e 3042
6df41af2
GS
3043=item (Missing semicolon on previous line?)
3044
56da5a46
RGS
3045(S syntax) This is an educated guess made in conjunction with the message
3046"%s found where operator expected". Don't automatically put a semicolon on
6df41af2
GS
3047the previous line just because you saw this message.
3048
a0d0e21e
LW
3049=item Modification of a read-only value attempted
3050
3051(F) You tried, directly or indirectly, to change the value of a
5f05dabc 3052constant. You didn't, of course, try "2 = 1", because the compiler
a0d0e21e
LW
3053catches that. But an easy way to do the same thing is:
3054
3055 sub mod { $_[0] = 1 }
3056 mod(2);
3057
3058Another way is to assign to a substr() that's off the end of the string.
3059
c5674021
PDF
3060Yet another way is to assign to a C<foreach> loop I<VAR> when I<VAR>
3061is aliased to a constant in the look I<LIST>:
3062
b7e4ecc1
FC
3063 $x = 1;
3064 foreach my $n ($x, 2) {
3065 $n *= 2; # modifies the $x, but fails on attempt to
3066 } # modify the 2
c5674021 3067
7a4340ed 3068=item Modification of non-creatable array value attempted, %s
a0d0e21e
LW
3069
3070(F) You tried to make an array value spring into existence, and the
3071subscript was probably negative, even counting from end of the array
3072backwards.
3073
7a4340ed 3074=item Modification of non-creatable hash value attempted, %s
a0d0e21e 3075
be771a83
GS
3076(P) You tried to make a hash value spring into existence, and it
3077couldn't be created for some peculiar reason.
a0d0e21e
LW
3078
3079=item Module name must be constant
3080
3081(F) Only a bare module name is allowed as the first argument to a "use".
3082
be98fb35 3083=item Module name required with -%c option
6df41af2 3084
be98fb35
GS
3085(F) The C<-M> or C<-m> options say that Perl should load some module, but
3086you omitted the name of the module. Consult L<perlrun> for full details
3087about C<-M> and C<-m>.
6df41af2 3088
fe13d51d 3089=item More than one argument to '%s' open
ed9aa3b7 3090
6903afa2 3091(F) The C<open> function has been asked to open multiple files. This
ed9aa3b7
SG
3092can happen if you are trying to open a pipe to a command that takes a
3093list of arguments, but have forgotten to specify a piped open mode.
3094See L<perlfunc/open> for details.
3095
92951bce
FC
3096=item mprotect for %p %u failed with %d
3097
3098=item mprotect RW for %p %u failed with %d
3099
3100(S) You compiled perl with B<-D>PERL_DEBUG_READONLY_OPS (see
3101L<perlhacktips>), but an op tree could not be made read-only, or a
3102read-only op tree could not be made mutable before freeing the ops.
3103
a0d0e21e
LW
3104=item msg%s not implemented
3105
3106(F) You don't have System V message IPC on your system.
3107
3108=item Multidimensional syntax %s not supported
3109
75b44862
GS
3110(W syntax) Multidimensional arrays aren't written like C<$foo[1,2,3]>.
3111They're written like C<$foo[1][2][3]>, as in C.
8b1a09fc 3112
49704364 3113=item '/' must follow a numeric type in unpack
6df41af2 3114
49704364
LW
3115(F) You had an unpack template that contained a '/', but this did not
3116follow some unpack specification producing a numeric value.
3117See L<perlfunc/pack>.
6df41af2
GS
3118
3119=item "my sub" not yet implemented
3120
be771a83
GS
3121(F) Lexically scoped subroutines are not yet implemented. Don't try
3122that yet.
6df41af2 3123
5a25739d
FC
3124=item "my %s" used in sort comparison
3125
3126(W syntax) The package variables $a and $b are used for sort comparisons.
3127You used $a or $b in as an operand to the C<< <=> >> or C<cmp> operator inside a
3128sort comparison block, and the variable had earlier been declared as a
3129lexical variable. Either qualify the sort variable with the package
3130name, or rename the lexical variable.
3131
fd1b7234 3132=item "my" variable %s can't be in a package
6df41af2 3133
be771a83
GS
3134(F) Lexically scoped variables aren't in a package, so it doesn't make
3135sense to try to declare one with a package qualifier on the front. Use
3136local() if you want to localize a package variable.
09bef843 3137
8149aa9f
FC
3138=item Name "%s::%s" used only once: possible typo
3139
3140(W once) Typographical errors often show up as unique variable names.
3141If you had a good reason for having a unique name, then just mention it
db20b640
FC
3142again somehow to suppress the message. The C<our> declaration is provided
3143for this purpose.
8149aa9f
FC
3144
3145NOTE: This warning detects symbols that have been used only once so $c, @c,
3146%c, *c, &c, sub c{}, c(), and c (the filehandle or format) are considered
3147the same; if a program uses $c only once but also uses any of the others it
9ec237a1
RS
3148will not trigger this warning. Symbols beginning with an underscore and
3149symbols using special identifiers (q.v. L<perldata>) are exempt from this
3150warning.
8149aa9f 3151
0d0b4b3b
KW
3152=item Need exactly 3 octal digits in regex; marked by <-- HERE in m/%s/
3153
3154(F) Within S<C<(?[ ])>>, all constants interpreted as octal need to be
3155exactly 3 digits long. This helps catch some ambiguities. If your
3156constant is too short, add leading zeros, like
3157
3158 (?[ [ \078 ] ]) # Syntax error!
3159 (?[ [ \0078 ] ]) # Works
3160 (?[ [ \007 8 ] ]) # Clearer
3161
3162The maximum number this construct can express is C<\777>. If you
675fa9ff
FC
3163need a larger one, you need to use L<\o{}|perlrebackslash/Octal escapes> instead. If you meant
3164two separate things, you need to separate them:
0d0b4b3b
KW
3165
3166 (?[ [ \7776 ] ]) # Syntax error!
3167 (?[ [ \o{7776} ] ]) # One meaning
3168 (?[ [ \777 6 ] ]) # Another meaning
3169 (?[ [ \777 \006 ] ]) # Still another
3170
49704364
LW
3171=item Negative '/' count in unpack
3172
3173(F) The length count obtained from a length/code unpack operation was
3174negative. See L<perlfunc/pack>.
3175
a0d0e21e
LW
3176=item Negative length
3177
be771a83
GS
3178(F) You tried to do a read/write/send/recv operation with a buffer
3179length that is less than 0. This is difficult to imagine.
a0d0e21e 3180
ed9aa3b7
SG
3181=item Negative offset to vec in lvalue context
3182
3183(F) When C<vec> is called in an lvalue context, the second argument must be
3184greater than or equal to zero.
3185
7253e4e3 3186=item Nested quantifiers in regex; marked by <-- HERE in m/%s/
a0d0e21e 3187
6903afa2 3188(F) You can't quantify a quantifier without intervening parentheses.
9e3ec65c
FC
3189So things like ** or +* or ?* are illegal. The <-- HERE shows
3190whereabouts in the regular expression the problem was discovered.
a0d0e21e 3191
7253e4e3 3192Note that the minimal matching quantifiers, C<*?>, C<+?>, and
be771a83 3193C<??> appear to be nested quantifiers, but aren't. See L<perlre>.
a0d0e21e 3194
6df41af2 3195=item %s never introduced
a0d0e21e 3196
be771a83
GS
3197(S internal) The symbol in question was declared but somehow went out of
3198scope before it could possibly have been used.
a0d0e21e 3199
2c7d6b9c
RGS
3200=item next::method/next::can/maybe::next::method cannot find enclosing method
3201
3202(F) C<next::method> needs to be called within the context of a
3203real method in a real package, and it could not find such a context.
3204See L<mro>.
3205
5a25739d
FC
3206=item \N in a character class must be a named character: \N{...} in regex;
3207marked by <-- HERE in m/%s/
3208
3209(F) The new (5.12) meaning of C<\N> as C<[^\n]> is not valid in
3210a bracketed character class, for the same reason that C<.> in
3211a character class loses its specialness: it matches almost
3212everything, which is probably not what you want.
3213
3214=item \N{NAME} must be resolved by the lexer in regex; marked by <-- HERE in m/%s/
3215
3216(F) When compiling a regex pattern, an unresolved named character or
3217sequence was encountered. This can happen in any of several ways that
3218bypass the lexer, such as using single-quotish context, or an extra
3219backslash in double-quotish:
3220
3221 $re = '\N{SPACE}'; # Wrong!
3222 $re = "\\N{SPACE}"; # Wrong!
3223 /$re/;
3224
3225Instead, use double-quotes with a single backslash:
3226
3227 $re = "\N{SPACE}"; # ok
3228 /$re/;
3229
3230The lexer can be bypassed as well by creating the pattern from smaller
3231components:
3232
3233 $re = '\N';
3234 /${re}{SPACE}/; # Wrong!
3235
3236It's not a good idea to split a construct in the middle like this, and
3237it doesn't work here. Instead use the solution above.
3238
3239Finally, the message also can happen under the C</x> regex modifier when the
3240C<\N> is separated by spaces from the C<{>, in which case, remove the spaces.
3241
3242 /\N {SPACE}/x; # Wrong!
3243 /\N{SPACE}/x; # ok
3244
a0d0e21e
LW
3245=item No %s allowed while running setuid
3246
be771a83
GS
3247(F) Certain operations are deemed to be too insecure for a setuid or
3248setgid script to even be allowed to attempt. Generally speaking there
3249will be another way to do what you want that is, if not secure, at least
3250securable. See L<perlsec>.
a0d0e21e 3251
6651ba0b
FC
3252=item No code specified for -%c
3253
3254(F) Perl's B<-e> and B<-E> command-line options require an argument. If
3255you want to run an empty program, pass the empty string as a separate
3256argument or run a program consisting of a single 0 or 1:
3257
3258 perl -e ""
3259 perl -e0
3260 perl -e1
3261
a0d0e21e
LW
3262=item No comma allowed after %s
3263
6903afa2
FC
3264(F) A list operator that has a filehandle or "indirect object" is
3265not allowed to have a comma between that and the following arguments.
a0d0e21e
LW
3266Otherwise it'd be just another one of the arguments.
3267
6903afa2
FC
3268One possible cause for this is that you expected to have imported
3269a constant to your name space with B<use> or B<import> while no such
3270importing took place, it may for example be that your operating
3271system does not support that particular constant. Hopefully you did
3272use an explicit import list for the constants you expect to see;
3273please see L<perlfunc/use> and L<perlfunc/import>. While an
3274explicit import list would probably have caught this error earlier
3275it naturally does not remedy the fact that your operating system
3276still does not support that constant. Maybe you have a typo in
3277the constants of the symbol import list of B<use> or B<import> or in the
3278constant name at the line where this error was triggered?
0a753a76 3279
748a9306
LW
3280=item No command into which to pipe on command line
3281
be771a83
GS
3282(F) An error peculiar to VMS. Perl handles its own command line
3283redirection, and found a '|' at the end of the command line, so it
3284doesn't know where you want to pipe the output from this command.
748a9306 3285
a0d0e21e
LW
3286=item No DB::DB routine defined
3287
be771a83 3288(F) The currently executing code was compiled with the B<-d> switch, but
f7af5ce1 3289for some reason the current debugger (e.g. F<perl5db.pl> or a C<Devel::>
ccafdc96
RGS
3290module) didn't define a routine to be called at the beginning of each
3291statement.
a0d0e21e
LW
3292
3293=item No dbm on this machine
3294
3295(P) This is counted as an internal error, because every machine should
5f05dabc 3296supply dbm nowadays, because Perl comes with SDBM. See L<SDBM_File>.
a0d0e21e 3297
ccafdc96 3298=item No DB::sub routine defined
a0d0e21e 3299
ccafdc96
RGS
3300(F) The currently executing code was compiled with the B<-d> switch, but
3301for some reason the current debugger (e.g. F<perl5db.pl> or a C<Devel::>
3302module) didn't define a C<DB::sub> routine to be called at the beginning
3303of each ordinary subroutine call.
a0d0e21e 3304
6651ba0b
FC
3305=item No directory specified for -I
3306
3307(F) The B<-I> command-line switch requires a directory name as part of the
3308I<same> argument. Use B<-Ilib>, for instance. B<-I lib> won't work.
3309
c47ff5f1 3310=item No error file after 2> or 2>> on command line
748a9306 3311
be771a83
GS
3312(F) An error peculiar to VMS. Perl handles its own command line