This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove obsolete comment; document test format
[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).
11 (D) A deprecation (optional).
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
23below.
24
25Optional warnings are enabled by using the C<warnings> pragma or the B<-w>
26and B<-W> switches. Warnings may be captured by setting C<$SIG{__WARN__}>
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
6df41af2 53=item Allocation too large: %lx
a0d0e21e 54
6df41af2 55(X) You can't allocate more than 64K on an MS-DOS machine.
a0d0e21e 56
1109a392 57=item '%c' allowed only after types %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
6df41af2
GS
88(W ambiguous)(S) You said something that may not be interpreted the way
89you thought. Normally it's pretty easy to disambiguate it by supplying
90a missing quote, operator, parenthesis pair or declaration.
a0d0e21e 91
6df41af2 92=item '|' and '<' may not both be specified on command line
a0d0e21e 93
be771a83
GS
94(F) An error peculiar to VMS. Perl does its own command line
95redirection, and found that STDIN was a pipe, and that you also tried to
96redirect STDIN using '<'. Only one STDIN stream to a customer, please.
c9f97d15 97
6df41af2 98=item '|' and '>' may not both be specified on command line
1028017a 99
be771a83
GS
100(F) An error peculiar to VMS. Perl does its own command line
101redirection, and thinks you tried to redirect stdout both to a file and
102into a pipe to another command. You need to choose one or the other,
103though nothing's stopping you from piping into a program or Perl script
104which 'splits' output into two streams, such as
1028017a 105
6df41af2
GS
106 open(OUT,">$ARGV[0]") or die "Can't write to $ARGV[0]: $!";
107 while (<STDIN>) {
108 print;
109 print OUT;
110 }
111 close OUT;
c9f97d15 112
6df41af2 113=item Applying %s to %s will act on scalar(%s)
eb6e2d6f 114
496a33f5
SC
115(W misc) The pattern match (C<//>), substitution (C<s///>), and
116transliteration (C<tr///>) operators work on scalar values. If you apply
be771a83
GS
117one of them to an array or a hash, it will convert the array or hash to
118a scalar value -- the length of an array, or the population info of a
119hash -- and then work on that scalar value. This is probably not what
120you meant to do. See L<perlfunc/grep> and L<perlfunc/map> for
121alternatives.
eb6e2d6f 122
6df41af2 123=item Args must match #! line
a0d0e21e 124
6df41af2
GS
125(F) The setuid emulator requires that the arguments Perl was invoked
126with match the arguments specified on the #! line. Since some systems
127impose a one-argument limit on the #! line, try combining switches;
128for example, turn C<-w -U> into C<-wU>.
a0d0e21e 129
6df41af2 130=item Arg too short for msgsnd
76cd736e 131
6df41af2 132(F) msgsnd() requires a string at least as long as sizeof(long).
76cd736e 133
b0fdf69e 134=item %s argument is not a HASH or ARRAY element or a subroutine
a0d0e21e 135
cc1c2e42
FC
136(F) The argument to exists() must be a hash or array element or a
137subroutine with an ampersand, such as:
a0d0e21e
LW
138
139 $foo{$bar}
cb4f522a 140 $ref->{"susie"}[12]
cc1c2e42 141 &do_something
a0d0e21e 142
8ea97a1e 143=item %s argument is not a HASH or ARRAY element or slice
5f05dabc 144
06e52bfa
FC
145(F) The argument to delete() must be either a hash or array element,
146such as:
5f05dabc 147
148 $foo{$bar}
cb4f522a 149 $ref->{"susie"}[12]
5f05dabc 150
8ea97a1e 151or a hash or array slice, such as:
5f05dabc 152
6df41af2
GS
153 @foo[$bar, $baz, $xyzzy]
154 @{$ref->[12]}{"susie", "queue"}
5315574d 155
6df41af2 156=item %s argument is not a subroutine name
a0d0e21e 157
6df41af2 158(F) The argument to exists() for C<exists &sub> must be a subroutine
be771a83
GS
159name, and not a subroutine call. C<exists &sub()> will generate this
160error.
a0d0e21e 161
f86702cc 162=item Argument "%s" isn't numeric%s
a0d0e21e 163
be771a83
GS
164(W numeric) The indicated string was fed as an argument to an operator
165that expected a numeric value instead. If you're fortunate the message
166will identify which operator was so unfortunate.
a0d0e21e 167
b4581f09
JH
168=item Argument list not closed for PerlIO layer "%s"
169
170(W layer) When pushing a layer with arguments onto the Perl I/O system you
171forgot the ) that closes the argument list. (Layers take care of transforming
172data between external and internal representations.) Perl stopped parsing
173the layer list at this point and did not attempt to push this layer.
174If your program didn't explicitly request the failing operation, it may be
175the result of the value of the environment variable PERLIO.
176
a0d0e21e
LW
177=item Array @%s missing the @ in argument %d of %s()
178
75b44862
GS
179(D deprecated) Really old Perl let you omit the @ on array names in some
180spots. This is now heavily deprecated.
a0d0e21e
LW
181
182=item assertion botched: %s
183
184(P) The malloc package that comes with Perl had an internal failure.
185
186=item Assertion failed: file "%s"
187
188(P) A general assertion failed. The file in question must be examined.
189
190=item Assignment to both a list and a scalar
191
192(F) If you assign to a conditional operator, the 2nd and 3rd arguments
193must either both be scalars or both be lists. Otherwise Perl won't
194know which context to supply to the right side.
195
96ebfdd7
RK
196=item A thread exited while %d threads were running
197
4447dfc1 198(W threads)(S) When using threaded Perl, a thread (not necessarily the main
96ebfdd7
RK
199thread) exited while there were still other threads running.
200Usually it's a good idea to first collect the return values of the
201created threads by joining them, and only then exit from the main
202thread. See L<threads>.
203
2393f1b9 204=item Attempt to access disallowed key '%s' in a restricted hash
1b1f1335 205
49293501 206(F) The failing code has attempted to get or set a key which is not in
2393f1b9 207the current set of allowed keys of a restricted hash.
49293501 208
81689caa
HS
209=item Attempt to bless into a reference
210
211(F) The CLASSNAME argument to the bless() operator is expected to be
212the name of the package to bless the resulting object into. You've
213supplied instead a reference to something: perhaps you wrote
214
215 bless $self, $proto;
216
217when you intended
218
219 bless $self, ref($proto) || $proto;
220
221If you actually want to bless into the stringified version
222of the reference supplied, you need to stringify it yourself, for
223example by:
224
225 bless $self, "$proto";
226
96ebfdd7
RK
227=item Attempt to delete disallowed key '%s' from a restricted hash
228
229(F) The failing code attempted to delete from a restricted hash a key
230which is not in its key set.
231
232=item Attempt to delete readonly key '%s' from a restricted hash
233
234(F) The failing code attempted to delete a key whose value has been
235declared readonly from a restricted hash.
236
a0d0e21e
LW
237=item Attempt to free non-arena SV: 0x%lx
238
be771a83
GS
239(P internal) All SV objects are supposed to be allocated from arenas
240that will be garbage collected on exit. An SV was discovered to be
241outside any of those arenas.
a0d0e21e 242
54310121 243=item Attempt to free nonexistent shared string
bbce6d69 244
be771a83
GS
245(P internal) Perl maintains a reference counted internal table of
246strings to optimize the storage and access of hash keys and other
247strings. This indicates someone tried to decrement the reference count
248of a string that can no longer be found in the table.
bbce6d69 249
a0d0e21e
LW
250=item Attempt to free temp prematurely
251
be771a83
GS
252(W debugging) Mortalized values are supposed to be freed by the
253free_tmps() routine. This indicates that something else is freeing the
254SV before the free_tmps() routine gets a chance, which means that the
255free_tmps() routine will be freeing an unreferenced scalar when it does
256try to free it.
a0d0e21e
LW
257
258=item Attempt to free unreferenced glob pointers
259
e476b1b5 260(P internal) The reference counts got screwed up on symbol aliases.
a0d0e21e
LW
261
262=item Attempt to free unreferenced scalar
263
be771a83
GS
264(W internal) Perl went to decrement the reference count of a scalar to
265see if it would go to 0, and discovered that it had already gone to 0
266earlier, and should have been freed, and in fact, probably was freed.
267This could indicate that SvREFCNT_dec() was called too many times, or
268that SvREFCNT_inc() was called too few times, or that the SV was
269mortalized when it shouldn't have been, or that memory has been
270corrupted.
a0d0e21e 271
dcdda58d
GS
272=item Attempt to join self
273
274(F) You tried to join a thread from within itself, which is an
be771a83
GS
275impossible task. You may be joining the wrong thread, or you may need
276to move the join() to some other thread.
dcdda58d 277
84902520
TB
278=item Attempt to pack pointer to temporary value
279
be771a83
GS
280(W pack) You tried to pass a temporary value (like the result of a
281function, or a computed expression) to the "p" pack() template. This
282means the result contains a pointer to a location that could become
283invalid anytime, even before the end of the current statement. Use
284literals or global values as arguments to the "p" pack() template to
285avoid this warning.
84902520 286
087b5369
RD
287=item Attempt to reload %s aborted.
288
289(F) You tried to load a file with C<use> or C<require> that failed to
290compile once already. Perl will not try to compile this file again
291unless you delete its entry from %INC. See L<perlfunc/require> and
292L<perlvar/%INC>.
293
1b20cd17
NC
294=item Attempt to set length of freed array
295
296(W) You tried to set the length of an array which has been freed. You
297can do this by storing a reference to the scalar representing the last index
298of an array and later assigning through that reference. For example
299
300 $r = do {my @a; \$#a};
301 $$r = 503
302
b7a902f4 303=item Attempt to use reference as lvalue in substr
304
be771a83
GS
305(W substr) You supplied a reference as the first argument to substr()
306used as an lvalue, which is pretty strange. Perhaps you forgot to
307dereference it first. See L<perlfunc/substr>.
b7a902f4 308
dc26df50 309=item Bad arg length for %s, is %d, should be %s
a0d0e21e 310
be771a83
GS
311(F) You passed a buffer of the wrong size to one of msgctl(), semctl()
312or shmctl(). In C parlance, the correct sizes are, respectively,
5f05dabc 313S<sizeof(struct msqid_ds *)>, S<sizeof(struct semid_ds *)>, and
a0d0e21e
LW
314S<sizeof(struct shmid_ds *)>.
315
7a95317d
GS
316=item Bad evalled substitution pattern
317
496a33f5 318(F) You've used the C</e> switch to evaluate the replacement for a
7a95317d
GS
319substitution, but perl found a syntax error in the code to evaluate,
320most likely an unexpected right brace '}'.
321
a0d0e21e
LW
322=item Bad filehandle: %s
323
be771a83
GS
324(F) A symbol was passed to something wanting a filehandle, but the
325symbol has no filehandle associated with it. Perhaps you didn't do an
326open(), or did it in another package.
a0d0e21e
LW
327
328=item Bad free() ignored
329
be771a83
GS
330(S malloc) An internal routine called free() on something that had never
331been malloc()ed in the first place. Mandatory, but can be disabled by
9ea8bc6d 332setting environment variable C<PERL_BADFREE> to 0.
33c8a3fe 333
9ea8bc6d 334This message can be seen quite often with DB_File on systems with "hard"
be771a83
GS
335dynamic linking, like C<AIX> and C<OS/2>. It is a bug of C<Berkeley DB>
336which is left unnoticed if C<DB> uses I<forgiving> system malloc().
a0d0e21e 337
aa689395 338=item Bad hash
339
340(P) One of the internal hash routines was passed a null HV pointer.
341
6df41af2
GS
342=item Badly placed ()'s
343
344(A) You've accidentally run your script through B<csh> instead
345of Perl. Check the #! line, or manually feed your script into
346Perl yourself.
347
a0d0e21e
LW
348=item Bad name after %s::
349
be771a83
GS
350(F) You started to name a symbol by using a package prefix, and then
351didn't finish the symbol. In particular, you can't interpolate outside
352of quotes, so
a0d0e21e
LW
353
354 $var = 'myvar';
355 $sym = mypack::$var;
356
357is not the same as
358
359 $var = 'myvar';
360 $sym = "mypack::$var";
361
4ad56ec9
IZ
362=item Bad realloc() ignored
363
be771a83
GS
364(S malloc) An internal routine called realloc() on something that had
365never been malloc()ed in the first place. Mandatory, but can be disabled
366by setting environment variable C<PERL_BADFREE> to 1.
4ad56ec9 367
a0d0e21e
LW
368=item Bad symbol for array
369
370(P) An internal request asked to add an array entry to something that
371wasn't a symbol table entry.
372
4df3f177
SP
373=item Bad symbol for dirhandle
374
375(P) An internal request asked to add a dirhandle entry to something
376that wasn't a symbol table entry.
377
378
a0d0e21e
LW
379=item Bad symbol for filehandle
380
be771a83
GS
381(P) An internal request asked to add a filehandle entry to something
382that wasn't a symbol table entry.
a0d0e21e
LW
383
384=item Bad symbol for hash
385
386(P) An internal request asked to add a hash entry to something that
387wasn't a symbol table entry.
388
34d09196
GS
389=item Bareword found in conditional
390
be771a83
GS
391(W bareword) The compiler found a bareword where it expected a
392conditional, which often indicates that an || or && was parsed as part
393of the last argument of the previous construct, for example:
34d09196
GS
394
395 open FOO || die;
396
be771a83
GS
397It may also indicate a misspelled constant that has been interpreted as
398a bareword:
34d09196
GS
399
400 use constant TYPO => 1;
401 if (TYOP) { print "foo" }
402
403The C<strict> pragma is useful in avoiding such errors.
404
6df41af2
GS
405=item Bareword "%s" not allowed while "strict subs" in use
406
407(F) With "strict subs" in use, a bareword is only allowed as a
be771a83
GS
408subroutine identifier, in curly brackets or to the left of the "=>"
409symbol. Perhaps you need to predeclare a subroutine?
6df41af2
GS
410
411=item Bareword "%s" refers to nonexistent package
412
be771a83
GS
413(W bareword) You used a qualified bareword of the form C<Foo::>, but the
414compiler saw no other uses of that namespace before that point. Perhaps
415you need to predeclare a package?
6df41af2 416
a0d0e21e
LW
417=item BEGIN failed--compilation aborted
418
be771a83
GS
419(F) An untrapped exception was raised while executing a BEGIN
420subroutine. Compilation stops immediately and the interpreter is
421exited.
a0d0e21e 422
68dc0745 423=item BEGIN not safe after errors--compilation aborted
424
425(F) Perl found a C<BEGIN {}> subroutine (or a C<use> directive, which
be771a83
GS
426implies a C<BEGIN {}>) after one or more compilation errors had already
427occurred. Since the intended environment for the C<BEGIN {}> could not
428be guaranteed (due to the errors), and since subsequent code likely
429depends on its correct operation, Perl just gave up.
68dc0745 430
6df41af2
GS
431=item \1 better written as $1
432
be771a83
GS
433(W syntax) Outside of patterns, backreferences live on as variables.
434The use of backslashes is grandfathered on the right-hand side of a
435substitution, but stylistically it's better to use the variable form
436because other Perl programmers will expect it, and it works better if
437there are more than 9 backreferences.
6df41af2 438
252aa082
JH
439=item Binary number > 0b11111111111111111111111111111111 non-portable
440
e476b1b5 441(W portable) The binary number you specified is larger than 2**32-1
9e24b6e2
JH
442(4294967295) and therefore non-portable between systems. See
443L<perlport> for more on portability concerns.
252aa082 444
69282e91 445=item bind() on closed socket %s
a0d0e21e 446
be771a83
GS
447(W closed) You tried to do a bind on a closed socket. Did you forget to
448check the return value of your socket() call? See L<perlfunc/bind>.
a0d0e21e 449
c289d2f7
JH
450=item binmode() on closed filehandle %s
451
452(W unopened) You tried binmode() on a filehandle that was never opened.
453Check you control flow and number of arguments.
454
c5a0f51a
JH
455=item Bit vector size > 32 non-portable
456
e476b1b5 457(W portable) Using bit vector sizes larger than 32 is non-portable.
c5a0f51a 458
4633a7c4
LW
459=item Bizarre copy of %s in %s
460
be771a83 461(P) Perl detected an attempt to copy an internal value that is not
b45f050a 462copyable.
4633a7c4 463
f675dbe5
CB
464=item Buffer overflow in prime_env_iter: %s
465
be771a83
GS
466(W internal) A warning peculiar to VMS. While Perl was preparing to
467iterate over %ENV, it encountered a logical name or symbol definition
468which was too long, so it was truncated to the string shown.
f675dbe5 469
a0d0e21e
LW
470=item Callback called exit
471
4929bf7b 472(F) A subroutine invoked from an external package via call_sv()
a0d0e21e
LW
473exited by calling exit.
474
6df41af2 475=item %s() called too early to check prototype
f675dbe5 476
be771a83
GS
477(W prototype) You've called a function that has a prototype before the
478parser saw a definition or declaration for it, and Perl could not check
479that the call conforms to the prototype. You need to either add an
480early prototype declaration for the subroutine in question, or move the
481subroutine definition ahead of the call to get proper prototype
482checking. Alternatively, if you are certain that you're calling the
483function correctly, you may put an ampersand before the name to avoid
484the warning. See L<perlsub>.
f675dbe5 485
49704364 486=item Cannot compress integer in pack
0258719b
NC
487
488(F) An argument to pack("w",...) was too large to compress. The BER
489compressed integer format can only be used with positive integers, and you
490attempted to compress Infinity or a very large number (> 1e308).
491See L<perlfunc/pack>.
492
49704364 493=item Cannot compress negative numbers in pack
0258719b
NC
494
495(F) An argument to pack("w",...) was negative. The BER compressed integer
496format can only be used with positive integers. See L<perlfunc/pack>.
497
5c1f4d79
NC
498=item Cannot convert a reference to %s to typeglob
499
500(F) You manipulated Perl's symbol table directly, stored a reference in it,
501then tried to access that symbol via conventional Perl syntax. The access
502triggers Perl to autovivify that typeglob, but it there is no legal conversion
503from that type of reference to a typeglob.
504
ba2fdce6
NC
505=item Cannot copy to %s in %s
506
507(P) Perl detected an attempt to copy a value to an internal type that cannot
508be directly assigned not.
509
96ebfdd7
RK
510=item Can only compress unsigned integers in pack
511
512(F) An argument to pack("w",...) was not an integer. The BER compressed
513integer format can only be used with positive integers, and you attempted
514to compress something else. See L<perlfunc/pack>.
515
a0d0e21e
LW
516=item Can't bless non-reference value
517
518(F) Only hard references may be blessed. This is how Perl "enforces"
519encapsulation of objects. See L<perlobj>.
520
dc57907a
RGS
521=item Can't "break" in a loop topicalizer
522
0d863452
RH
523(F) You called C<break>, but you're in a C<foreach> block rather than
524a C<given> block. You probably meant to use C<next> or C<last>.
525
526=item Can't "break" outside a given block
dc57907a 527
0d863452
RH
528(F) You called C<break>, but you're not inside a C<given> block.
529
a0d0e21e
LW
530=item Can't call method "%s" in empty package "%s"
531
532(F) You called a method correctly, and it correctly indicated a package
533functioning as a class, but that package doesn't have ANYTHING defined
534in it, let alone methods. See L<perlobj>.
535
6df41af2
GS
536=item Can't call method "%s" on an undefined value
537
538(F) You used the syntax of a method call, but the slot filled by the
be771a83
GS
539object reference or package name contains an undefined value. Something
540like this will reproduce the error:
6df41af2
GS
541
542 $BADREF = undef;
543 process $BADREF 1,2,3;
544 $BADREF->process(1,2,3);
545
a0d0e21e
LW
546=item Can't call method "%s" on unblessed reference
547
54310121 548(F) A method call must know in what package it's supposed to run. It
be771a83
GS
549ordinarily finds this out from the object reference you supply, but you
550didn't supply an object reference in this case. A reference isn't an
551object reference until it has been blessed. See L<perlobj>.
a0d0e21e
LW
552
553=item Can't call method "%s" without a package or object reference
554
555(F) You used the syntax of a method call, but the slot filled by the
be771a83
GS
556object reference or package name contains an expression that returns a
557defined value which is neither an object reference nor a package name.
72b5445b
GS
558Something like this will reproduce the error:
559
560 $BADREF = 42;
561 process $BADREF 1,2,3;
562 $BADREF->process(1,2,3);
563
a0d0e21e
LW
564=item Can't chdir to %s
565
566(F) You called C<perl -x/foo/bar>, but C</foo/bar> is not a directory
567that you can chdir to, possibly because it doesn't exist.
568
0545a864 569=item Can't check filesystem of script "%s" for nosuid
104d25b7 570
be771a83
GS
571(P) For some reason you can't check the filesystem of the script for
572nosuid.
104d25b7 573
6df41af2
GS
574=item Can't coerce array into hash
575
576(F) You used an array where a hash was expected, but the array has no
577information on how to map from keys to array indices. You can do that
578only with arrays that have a hash reference at index 0.
579
a0d0e21e
LW
580=item Can't coerce %s to integer in %s
581
582(F) Certain types of SVs, in particular real symbol table entries
55497cff 583(typeglobs), can't be forced to stop being what they are. So you can't
a0d0e21e
LW
584say things like:
585
586 *foo += 1;
587
588You CAN say
589
590 $foo = *foo;
591 $foo += 1;
592
593but then $foo no longer contains a glob.
594
595=item Can't coerce %s to number in %s
596
597(F) Certain types of SVs, in particular real symbol table entries
55497cff 598(typeglobs), can't be forced to stop being what they are.
a0d0e21e
LW
599
600=item Can't coerce %s to string in %s
601
602(F) Certain types of SVs, in particular real symbol table entries
55497cff 603(typeglobs), can't be forced to stop being what they are.
a0d0e21e 604
0d863452 605=item Can't "continue" outside a when block
dc57907a 606
0d863452
RH
607(F) You called C<continue>, but you're not inside a C<when>
608or C<default> block.
609
a0d0e21e
LW
610=item Can't create pipe mailbox
611
be771a83
GS
612(P) An error peculiar to VMS. The process is suffering from exhausted
613quotas or other plumbing problems.
a0d0e21e 614
eb64745e 615=item Can't declare class for non-scalar %s in "%s"
a0d0e21e 616
2f7e735d 617(F) Currently, only scalar variables can be declared with a specific
30c282f6 618class qualifier in a "my", "our" or "state" declaration. The semantics may be
2f7e735d 619extended for other types of variables in future.
eb64745e
GS
620
621=item Can't declare %s in "%s"
622
30c282f6
NC
623(F) Only scalar, array, and hash variables may be declared as "my", "our" or
624"state" variables. They must have ordinary identifiers as names.
a0d0e21e 625
6df41af2
GS
626=item Can't do inplace edit: %s is not a regular file
627
be771a83
GS
628(S inplace) You tried to use the B<-i> switch on a special file, such as
629a file in /dev, or a FIFO. The file was ignored.
6df41af2 630
a0d0e21e
LW
631=item Can't do inplace edit on %s: %s
632
be771a83
GS
633(S inplace) The creation of the new file failed for the indicated
634reason.
a0d0e21e 635
54310121 636=item Can't do inplace edit without backup
a0d0e21e 637
be771a83
GS
638(F) You're on a system such as MS-DOS that gets confused if you try
639reading from a deleted (but still opened) file. You have to say
640C<-i.bak>, or some such.
a0d0e21e 641
10f9c03d 642=item Can't do inplace edit: %s would not be unique
a0d0e21e 643
e476b1b5 644(S inplace) Your filesystem does not support filenames longer than 14
10f9c03d
CK
645characters and Perl was unable to create a unique filename during
646inplace editing with the B<-i> switch. The file was ignored.
a0d0e21e 647
7253e4e3 648=item Can't do {n,m} with n > m in regex; marked by <-- HERE in m/%s/
a0d0e21e 649
b45f050a 650(F) Minima must be less than or equal to maxima. If you really want your
7253e4e3 651regexp to match something 0 times, just put {0}. The <-- HERE shows in the
b45f050a 652regular expression about where the problem was discovered. See L<perlre>.
a0d0e21e 653
a0d0e21e
LW
654=item Can't do waitpid with flags
655
be771a83
GS
656(F) This machine doesn't have either waitpid() or wait4(), so only
657waitpid() without flags is emulated.
a0d0e21e 658
a0d0e21e
LW
659=item Can't emulate -%s on #! line
660
be771a83
GS
661(F) The #! line specifies a switch that doesn't make sense at this
662point. For example, it'd be kind of silly to put a B<-x> on the #!
663line.
a0d0e21e 664
1109a392
MHM
665=item Can't %s %s-endian %ss on this platform
666
667(F) Your platform's byte-order is neither big-endian nor little-endian,
668or it has a very strange pointer size. Packing and unpacking big- or
669little-endian floating point values and pointers may not be possible.
670See L<perlfunc/pack>.
671
a0d0e21e
LW
672=item Can't exec "%s": %s
673
d1be9408 674(W exec) A system(), exec(), or piped open call could not execute the
be771a83
GS
675named program for the indicated reason. Typical reasons include: the
676permissions were wrong on the file, the file wasn't found in
677C<$ENV{PATH}>, the executable in question was compiled for another
678architecture, or the #! line in a script points to an interpreter that
679can't be run for similar reasons. (Or maybe your system doesn't support
680#! at all.)
a0d0e21e
LW
681
682=item Can't exec %s
683
be771a83
GS
684(F) Perl was trying to execute the indicated program for you because
685that's what the #! line said. If that's not what you wanted, you may
686need to mention "perl" on the #! line somewhere.
a0d0e21e
LW
687
688=item Can't execute %s
689
be771a83
GS
690(F) You used the B<-S> switch, but the copies of the script to execute
691found in the PATH did not have correct permissions.
2a92aaa0 692
6df41af2 693=item Can't find an opnumber for "%s"
2a92aaa0 694
be771a83
GS
695(F) A string of a form C<CORE::word> was given to prototype(), but there
696is no builtin with the name C<word>.
6df41af2 697
56ca2fc0
JH
698=item Can't find %s character property "%s"
699
700(F) You used C<\p{}> or C<\P{}> but the character property by that name
89d60977 701could not be found. Maybe you misspelled the name of the property
56ca2fc0
JH
702(remember that the names of character properties consist only of
703alphanumeric characters), or maybe you forgot the C<Is> or C<In> prefix?
704
6df41af2
GS
705=item Can't find label %s
706
be771a83
GS
707(F) You said to goto a label that isn't mentioned anywhere that it's
708possible for us to go to. See L<perlfunc/goto>.
2a92aaa0
GS
709
710=item Can't find %s on PATH
711
be771a83
GS
712(F) You used the B<-S> switch, but the script to execute could not be
713found in the PATH.
a0d0e21e 714
6df41af2 715=item Can't find %s on PATH, '.' not in PATH
a0d0e21e 716
be771a83
GS
717(F) You used the B<-S> switch, but the script to execute could not be
718found in the PATH, or at least not with the correct permissions. The
719script exists in the current directory, but PATH prohibits running it.
a0d0e21e
LW
720
721=item Can't find string terminator %s anywhere before EOF
722
be771a83
GS
723(F) Perl strings can stretch over multiple lines. This message means
724that the closing delimiter was omitted. Because bracketed quotes count
725nesting levels, the following is missing its final parenthesis:
a0d0e21e 726
fb73857a 727 print q(The character '(' starts a side comment.);
728
be771a83
GS
729If you're getting this error from a here-document, you may have included
730unseen whitespace before or after your closing tag. A good programmer's
731editor will have a way to help you find these characters.
a0d0e21e 732
660a4616
TS
733=item Can't find Unicode property definition "%s"
734
735(F) You may have tried to use C<\p> which means a Unicode property (for
736example C<\p{Lu}> is all uppercase letters). If you did mean to use a
737Unicode property, see L<perlunicode> for the list of known properties.
738If you didn't mean to use a Unicode property, escape the C<\p>, either
739by C<\\p> (just the C<\p>) or by C<\Q\p> (the rest of the string, until
740possible C<\E>).
741
b3647a36 742=item Can't fork: %s
a0d0e21e 743
be771a83
GS
744(F) A fatal error occurred while trying to fork while opening a
745pipeline.
a0d0e21e 746
b3647a36
SR
747=item Can't fork, trying again in 5 seconds
748
c973c02e 749(W pipe) A fork in a piped open failed with EAGAIN and will be retried
b3647a36
SR
750after five seconds.
751
748a9306
LW
752=item Can't get filespec - stale stat buffer?
753
be771a83
GS
754(S) A warning peculiar to VMS. This arises because of the difference
755between access checks under VMS and under the Unix model Perl assumes.
756Under VMS, access checks are done by filename, rather than by bits in
757the stat buffer, so that ACLs and other protections can be taken into
758account. Unfortunately, Perl assumes that the stat buffer contains all
759the necessary information, and passes it, instead of the filespec, to
760the access checking routine. It will try to retrieve the filespec using
761the device name and FID present in the stat buffer, but this works only
762if you haven't made a subsequent call to the CRTL stat() routine,
763because the device name is overwritten with each call. If this warning
764appears, the name lookup failed, and the access checking routine gave up
765and returned FALSE, just to be conservative. (Note: The access checking
766routine knows about the Perl C<stat> operator and file tests, so you
767shouldn't ever see this warning in response to a Perl command; it arises
768only if some internal code takes stat buffers lightly.)
748a9306 769
a0d0e21e
LW
770=item Can't get pipe mailbox device name
771
be771a83
GS
772(P) An error peculiar to VMS. After creating a mailbox to act as a
773pipe, Perl can't retrieve its name for later use.
a0d0e21e
LW
774
775=item Can't get SYSGEN parameter value for MAXBUF
776
748a9306
LW
777(P) An error peculiar to VMS. Perl asked $GETSYI how big you want your
778mailbox buffers to be, and didn't get an answer.
a0d0e21e 779
6df41af2 780=item Can't "goto" into the middle of a foreach loop
a0d0e21e 781
be771a83
GS
782(F) A "goto" statement was executed to jump into the middle of a foreach
783loop. You can't get there from here. See L<perlfunc/goto>.
6df41af2
GS
784
785=item Can't "goto" out of a pseudo block
786
be771a83
GS
787(F) A "goto" statement was executed to jump out of what might look like
788a block, except that it isn't a proper block. This usually occurs if
789you tried to jump out of a sort() block or subroutine, which is a no-no.
790See L<perlfunc/goto>.
a0d0e21e 791
9850bf21 792=item Can't goto subroutine from a sort sub (or similar callback)
cd299c6e 793
9850bf21
RH
794(F) The "goto subroutine" call can't be used to jump out of the
795comparison sub for a sort(), or from a similar callback (such
796as the reduce() function in List::Util).
797
c74ace89 798=item Can't goto subroutine from an eval-%s
b150fb22 799
be771a83 800(F) The "goto subroutine" call can't be used to jump out of an eval
c74ace89 801"string" or block.
b150fb22 802
6df41af2
GS
803=item Can't goto subroutine outside a subroutine
804
be771a83
GS
805(F) The deeply magical "goto subroutine" call can only replace one
806subroutine call for another. It can't manufacture one out of whole
807cloth. In general you should be calling it out of only an AUTOLOAD
808routine anyway. See L<perlfunc/goto>.
6df41af2 809
0b5b802d
GS
810=item Can't ignore signal CHLD, forcing to default
811
be771a83
GS
812(W signal) Perl has detected that it is being run with the SIGCHLD
813signal (sometimes known as SIGCLD) disabled. Since disabling this
814signal will interfere with proper determination of exit status of child
815processes, Perl has reset the signal to its default value. This
816situation typically indicates that the parent program under which Perl
817may be running (e.g. cron) is being very careless.
0b5b802d 818
6df41af2 819=item Can't "last" outside a loop block
4633a7c4 820
6df41af2 821(F) A "last" statement was executed to break out of the current block,
be771a83
GS
822except that there's this itty bitty problem called there isn't a current
823block. Note that an "if" or "else" block doesn't count as a "loopish"
824block, as doesn't a block given to sort(), map() or grep(). You can
825usually double the curlies to get the same effect though, because the
826inner curlies will be considered a block that loops once. See
827L<perlfunc/last>.
4633a7c4 828
2c7d6b9c
RGS
829=item Can't linearize anonymous symbol table
830
831(F) Perl tried to calculate the method resolution order (MRO) of a
832package, but failed because the package stash has no name.
833
b8170e59
JB
834=item Can't load '%s' for module %s
835
836(F) The module you tried to load failed to load a dynamic extension. This
837may either mean that you upgraded your version of perl to one that is
838incompatible with your old dynamic extensions (which is known to happen
839between major versions of perl), or (more likely) that your dynamic
16d98ec5 840extension was built against an older version of the library that is
b8170e59
JB
841installed on your system. You may need to rebuild your old dynamic
842extensions.
843
748a9306
LW
844=item Can't localize lexical variable %s
845
2ba9eb46 846(F) You used local on a variable name that was previously declared as a
30c282f6 847lexical variable using "my" or "state". This is not allowed. If you want to
748a9306
LW
848localize a package variable of the same name, qualify it with the
849package name.
850
6df41af2 851=item Can't localize through a reference
4727527e 852
6df41af2
GS
853(F) You said something like C<local $$ref>, which Perl can't currently
854handle, because when it goes to restore the old value of whatever $ref
be771a83 855pointed to after the scope of the local() is finished, it can't be sure
64977eb6 856that $ref will still be a reference.
4727527e 857
ea071790 858=item Can't locate %s
ec889f3a
GS
859
860(F) You said to C<do> (or C<require>, or C<use>) a file that couldn't be
861found. Perl looks for the file in all the locations mentioned in @INC,
be771a83
GS
862unless the file name included the full path to the file. Perhaps you
863need to set the PERL5LIB or PERL5OPT environment variable to say where
864the extra library is, or maybe the script needs to add the library name
865to @INC. Or maybe you just misspelled the name of the file. See
866L<perlfunc/require> and L<lib>.
a0d0e21e 867
6df41af2
GS
868=item Can't locate auto/%s.al in @INC
869
be771a83
GS
870(F) A function (or method) was called in a package which allows
871autoload, but there is no function to autoload. Most probable causes
872are a misprint in a function/method name or a failure to C<AutoSplit>
873the file, say, by doing C<make install>.
6df41af2 874
b8170e59
JB
875=item Can't locate loadable object for module %s in @INC
876
877(F) The module you loaded is trying to load an external library, like
878for example, C<foo.so> or C<bar.dll>, but the L<DynaLoader> module was
879unable to locate this library. See L<DynaLoader>.
880
a0d0e21e
LW
881=item Can't locate object method "%s" via package "%s"
882
883(F) You called a method correctly, and it correctly indicated a package
884functioning as a class, but that package doesn't define that particular
2ba9eb46 885method, nor does any of its base classes. See L<perlobj>.
a0d0e21e
LW
886
887=item Can't locate package %s for @%s::ISA
888
be771a83
GS
889(W syntax) The @ISA array contained the name of another package that
890doesn't seem to exist.
a0d0e21e 891
2f7da168
RK
892=item Can't locate PerlIO%s
893
894(F) You tried to use in open() a PerlIO layer that does not exist,
895e.g. open(FH, ">:nosuchlayer", "somefile").
896
3e3baf6d
TB
897=item Can't make list assignment to \%ENV on this system
898
be771a83
GS
899(F) List assignment to %ENV is not supported on some systems, notably
900VMS.
3e3baf6d 901
a0d0e21e
LW
902=item Can't modify %s in %s
903
be771a83
GS
904(F) You aren't allowed to assign to the item indicated, or otherwise try
905to change it, such as with an auto-increment.
a0d0e21e 906
54310121 907=item Can't modify nonexistent substring
a0d0e21e
LW
908
909(P) The internal routine that does assignment to a substr() was handed
910a NULL.
911
6df41af2
GS
912=item Can't modify non-lvalue subroutine call
913
914(F) Subroutines meant to be used in lvalue context should be declared as
915such, see L<perlsub/"Lvalue subroutines">.
916
5f05dabc 917=item Can't msgrcv to read-only var
a0d0e21e 918
5f05dabc 919(F) The target of a msgrcv must be modifiable to be used as a receive
a0d0e21e
LW
920buffer.
921
6df41af2
GS
922=item Can't "next" outside a loop block
923
924(F) A "next" statement was executed to reiterate the current block, but
925there isn't a current block. Note that an "if" or "else" block doesn't
be771a83
GS
926count as a "loopish" block, as doesn't a block given to sort(), map() or
927grep(). You can usually double the curlies to get the same effect
928though, because the inner curlies will be considered a block that loops
929once. See L<perlfunc/next>.
6df41af2 930
a0d0e21e
LW
931=item Can't open %s: %s
932
c47ff5f1 933(S inplace) The implicit opening of a file through use of the C<< <> >>
08e9d68e
DD
934filehandle, either implicitly under the C<-n> or C<-p> command-line
935switches, or explicitly, failed for the indicated reason. Usually this
be771a83
GS
936is because you don't have read permission for a file which you named on
937the command line.
a0d0e21e 938
9a869a14
RGS
939=item Can't open a reference
940
941(W io) You tried to open a scalar reference for reading or writing,
942using the 3-arg open() syntax :
943
944 open FH, '>', $ref;
945
946but your version of perl is compiled without perlio, and this form of
947open is not supported.
948
a0d0e21e
LW
949=item Can't open bidirectional pipe
950
be771a83
GS
951(W pipe) You tried to say C<open(CMD, "|cmd|")>, which is not supported.
952You can try any of several modules in the Perl library to do this, such
953as IPC::Open2. Alternately, direct the pipe's output to a file using
954">", and then read it in under a different file handle.
a0d0e21e 955
748a9306
LW
956=item Can't open error file %s as stderr
957
be771a83
GS
958(F) An error peculiar to VMS. Perl does its own command line
959redirection, and couldn't open the file specified after '2>' or '2>>' on
960the command line for writing.
748a9306
LW
961
962=item Can't open input file %s as stdin
963
be771a83
GS
964(F) An error peculiar to VMS. Perl does its own command line
965redirection, and couldn't open the file specified after '<' on the
966command line for reading.
748a9306
LW
967
968=item Can't open output file %s as stdout
969
be771a83
GS
970(F) An error peculiar to VMS. Perl does its own command line
971redirection, and couldn't open the file specified after '>' or '>>' on
972the command line for writing.
748a9306
LW
973
974=item Can't open output pipe (name: %s)
975
be771a83
GS
976(P) An error peculiar to VMS. Perl does its own command line
977redirection, and couldn't open the pipe into which to send data destined
978for stdout.
748a9306 979
2b8ca739 980=item Can't open perl script%s
a0d0e21e
LW
981
982(F) The script you specified can't be opened for the indicated reason.
983
fa3aa65a
JC
984If you're debugging a script that uses #!, and normally relies on the
985shell's $PATH search, the -S option causes perl to do that search, so
986you don't have to type the path or C<`which $scriptname`>.
987
6df41af2
GS
988=item Can't read CRTL environ
989
990(S) A warning peculiar to VMS. Perl tried to read an element of %ENV
991from the CRTL's internal environment array and discovered the array was
992missing. You need to figure out where your CRTL misplaced its environ
be771a83
GS
993or define F<PERL_ENV_TABLES> (see L<perlvms>) so that environ is not
994searched.
6df41af2 995
6df41af2
GS
996=item Can't "redo" outside a loop block
997
998(F) A "redo" statement was executed to restart the current block, but
999there isn't a current block. Note that an "if" or "else" block doesn't
1000count as a "loopish" block, as doesn't a block given to sort(), map()
1001or grep(). You can usually double the curlies to get the same effect
1002though, because the inner curlies will be considered a block that
1003loops once. See L<perlfunc/redo>.
1004
64977eb6 1005=item Can't remove %s: %s, skipping file
10f9c03d 1006
be771a83
GS
1007(S inplace) You requested an inplace edit without creating a backup
1008file. Perl was unable to remove the original file to replace it with
1009the modified file. The file was left unmodified.
10f9c03d 1010
a0d0e21e
LW
1011=item Can't rename %s to %s: %s, skipping file
1012
e476b1b5 1013(S inplace) The rename done by the B<-i> switch failed for some reason,
10f9c03d 1014probably because you don't have write permission to the directory.
a0d0e21e 1015
748a9306
LW
1016=item Can't reopen input pipe (name: %s) in binary mode
1017
be771a83
GS
1018(P) An error peculiar to VMS. Perl thought stdin was a pipe, and tried
1019to reopen it to accept binary data. Alas, it failed.
748a9306 1020
6df41af2
GS
1021=item Can't resolve method `%s' overloading `%s' in package `%s'
1022
be771a83
GS
1023(F|P) Error resolving overloading specified by a method name (as opposed
1024to a subroutine reference): no such method callable via the package. If
1025method name is C<???>, this is an internal error.
6df41af2 1026
cd06dffe
GS
1027=item Can't return %s from lvalue subroutine
1028
be771a83
GS
1029(F) Perl detected an attempt to return illegal lvalues (such as
1030temporary or readonly values) from a subroutine used as an lvalue. This
1031is not allowed.
cd06dffe 1032
96ebfdd7
RK
1033=item Can't return outside a subroutine
1034
1035(F) The return statement was executed in mainline code, that is, where
1036there was no subroutine call to return out of. See L<perlsub>.
1037
78f9721b
SM
1038=item Can't return %s to lvalue scalar context
1039
1040(F) You tried to return a complete array or hash from an lvalue subroutine,
1041but you called the subroutine in a way that made Perl think you meant
1042to return only one value. You probably meant to write parentheses around
1043the call to the subroutine, which tell Perl that the call should be in
1044list context.
1045
a0d0e21e
LW
1046=item Can't stat script "%s"
1047
be771a83
GS
1048(P) For some reason you can't fstat() the script even though you have it
1049open already. Bizarre.
a0d0e21e 1050
a0d0e21e
LW
1051=item Can't take log of %g
1052
fb73857a 1053(F) For ordinary real numbers, you can't take the logarithm of a
1054negative number or zero. There's a Math::Complex package that comes
be771a83
GS
1055standard with Perl, though, if you really want to do that for the
1056negative numbers.
a0d0e21e
LW
1057
1058=item Can't take sqrt of %g
1059
1060(F) For ordinary real numbers, you can't take the square root of a
fb73857a 1061negative number. There's a Math::Complex package that comes standard
1062with Perl, though, if you really want to do that.
a0d0e21e
LW
1063
1064=item Can't undef active subroutine
1065
1066(F) You can't undefine a routine that's currently running. You can,
1067however, redefine it while it's running, and you can even undef the
1068redefined subroutine while the old routine is running. Go figure.
1069
1070=item Can't unshift
1071
1072(F) You tried to unshift an "unreal" array that can't be unshifted, such
1073as the main Perl stack.
1074
c81225bc 1075=item Can't upgrade %s (%d) to %d
a0d0e21e 1076
be771a83
GS
1077(P) The internal sv_upgrade routine adds "members" to an SV, making it
1078into a more specialized kind of SV. The top several SV types are so
1079specialized, however, that they cannot be interconverted. This message
1080indicates that such a conversion was attempted.
a0d0e21e 1081
1db89ea5
BS
1082=item Can't use anonymous symbol table for method lookup
1083
e27ad1f2 1084(F) The internal routine that does method lookup was handed a symbol
1db89ea5
BS
1085table that doesn't have a name. Symbol tables can become anonymous
1086for example by undefining stashes: C<undef %Some::Package::>.
1087
96ebfdd7
RK
1088=item Can't use an undefined value as %s reference
1089
1090(F) A value used as either a hard reference or a symbolic reference must
1091be a defined value. This helps to delurk some insidious errors.
1092
6df41af2
GS
1093=item Can't use bareword ("%s") as %s ref while "strict refs" in use
1094
be771a83
GS
1095(F) Only hard references are allowed by "strict refs". Symbolic
1096references are disallowed. See L<perlref>.
6df41af2 1097
90b75b61 1098=item Can't use %! because Errno.pm is not available
1d2dff63
GS
1099
1100(F) The first time the %! hash is used, perl automatically loads the
1101Errno.pm module. The Errno module is expected to tie the %! hash to
1102provide symbolic names for C<$!> errno values.
1103
1109a392
MHM
1104=item Can't use both '<' and '>' after type '%c' in %s
1105
1106(F) A type cannot be forced to have both big-endian and little-endian
1107byte-order at the same time, so this combination of modifiers is not
1108allowed. See L<perlfunc/pack>.
1109
6df41af2
GS
1110=item Can't use %s for loop variable
1111
be771a83
GS
1112(F) Only a simple scalar variable may be used as a loop variable on a
1113foreach.
6df41af2 1114
aab6a793 1115=item Can't use global %s in "%s"
6df41af2 1116
be771a83
GS
1117(F) You tried to declare a magical variable as a lexical variable. This
1118is not allowed, because the magic can be tied to only one location
1119(namely the global variable) and it would be incredibly confusing to
1120have variables in your program that looked like magical variables but
6df41af2
GS
1121weren't.
1122
6d3b25aa
RGS
1123=item Can't use '%c' in a group with different byte-order in %s
1124
1125(F) You attempted to force a different byte-order on a type
1126that is already inside a group with a byte-order modifier.
1127For example you cannot force little-endianness on a type that
1128is inside a big-endian group.
1129
c07a80fd 1130=item Can't use "my %s" in sort comparison
1131
1132(F) The global variables $a and $b are reserved for sort comparisons.
c47ff5f1 1133You mentioned $a or $b in the same line as the <=> or cmp operator,
c07a80fd 1134and the variable had earlier been declared as a lexical variable.
1135Either qualify the sort variable with the package name, or rename the
1136lexical variable.
1137
a0d0e21e
LW
1138=item Can't use %s ref as %s ref
1139
1140(F) You've mixed up your reference types. You have to dereference a
1141reference of the type needed. You can use the ref() function to
1142test the type of the reference, if need be.
1143
748a9306 1144=item Can't use string ("%s") as %s ref while "strict refs" in use
a0d0e21e 1145
be771a83
GS
1146(F) Only hard references are allowed by "strict refs". Symbolic
1147references are disallowed. See L<perlref>.
a0d0e21e 1148
748a9306
LW
1149=item Can't use subscript on %s
1150
1151(F) The compiler tried to interpret a bracketed expression as a
1152subscript. But to the left of the brackets was an expression that
209e7cf1 1153didn't look like a hash or array reference, or anything else subscriptable.
748a9306 1154
6df41af2
GS
1155=item Can't use \%c to mean $%c in expression
1156
75b44862
GS
1157(W syntax) In an ordinary expression, backslash is a unary operator that
1158creates a reference to its argument. The use of backslash to indicate a
1159backreference to a matched substring is valid only as part of a regular
be771a83
GS
1160expression pattern. Trying to do this in ordinary Perl code produces a
1161value that prints out looking like SCALAR(0xdecaf). Use the $1 form
1162instead.
6df41af2 1163
0d863452 1164=item Can't use "when" outside a topicalizer
dc57907a 1165
0d863452
RH
1166(F) You have used a when() block that is neither inside a C<foreach>
1167loop nor a C<given> block. (Note that this error is issued on exit
1168from the C<when> block, so you won't get the error if the match fails,
1169or if you use an explicit C<continue>.)
1170
810b8aa5
GS
1171=item Can't weaken a nonreference
1172
1173(F) You attempted to weaken something that was not a reference. Only
1174references can be weakened.
1175
5f05dabc 1176=item Can't x= to read-only value
a0d0e21e 1177
be771a83
GS
1178(F) You tried to repeat a constant value (often the undefined value)
1179with an assignment operator, which implies modifying the value itself.
a0d0e21e
LW
1180Perhaps you need to copy the value to a temporary, and repeat that.
1181
f337b084 1182=item Character in 'C' format wrapped in pack
ac7cd81a
SC
1183
1184(W pack) You said
1185
1186 pack("C", $x)
1187
1188where $x is either less than 0 or more than 255; the C<"C"> format is
1189only for encoding native operating system characters (ASCII, EBCDIC,
1190and so on) and not for Unicode characters, so Perl behaved as if you meant
1191
1192 pack("C", $x & 255)
1193
1194If you actually want to pack Unicode codepoints, use the C<"U"> format
1195instead.
1196
f337b084
TH
1197=item Character in 'W' format wrapped in pack
1198
1199(W pack) You said
1200
1201 pack("U0W", $x)
1202
1203where $x is either less than 0 or more than 255. However, C<U0>-mode expects
1204all values to fall in the interval [0, 255], so Perl behaved as if you
1205meant:
1206
1207 pack("U0W", $x & 255)
1208
1209=item Character in 'c' format wrapped in pack
ac7cd81a
SC
1210
1211(W pack) You said
1212
1213 pack("c", $x)
1214
1215where $x is either less than -128 or more than 127; the C<"c"> format
1216is only for encoding native operating system characters (ASCII, EBCDIC,
1217and so on) and not for Unicode characters, so Perl behaved as if you meant
1218
1219 pack("c", $x & 255);
1220
1221If you actually want to pack Unicode codepoints, use the C<"U"> format
1222instead.
1223
f337b084
TH
1224=item Character in '%c' format wrapped in unpack
1225
1226(W unpack) You tried something like
1227
1228 unpack("H", "\x{2a1}")
1229
1a147d38 1230where the format expects to process a byte (a character with a value
f337b084
TH
1231below 256), but a higher value was provided instead. Perl uses the value
1232modulus 256 instead, as if you had provided:
1233
1234 unpack("H", "\x{a1}")
1235
1236=item Character(s) in '%c' format wrapped in pack
1237
1238(W pack) You tried something like
1239
1240 pack("u", "\x{1f3}b")
1241
1a147d38
YO
1242where the format expects to process a sequence of bytes (character with a
1243value below 256), but some of the characters had a higher value. Perl
f337b084
TH
1244uses the character values modulus 256 instead, as if you had provided:
1245
1246 pack("u", "\x{f3}b")
1247
1248=item Character(s) in '%c' format wrapped in unpack
1249
1250(W unpack) You tried something like
1251
1252 unpack("s", "\x{1f3}b")
1253
1a147d38
YO
1254where the format expects to process a sequence of bytes (character with a
1255value below 256), but some of the characters had a higher value. Perl
f337b084
TH
1256uses the character values modulus 256 instead, as if you had provided:
1257
1258 unpack("s", "\x{f3}b")
1259
96ebfdd7
RK
1260=item close() on unopened filehandle %s
1261
1262(W unopened) You tried to close a filehandle that was never opened.
1263
abc7ecad
SP
1264=item closedir() attempted on invalid dirhandle %s
1265
1266(W io) The dirhandle you tried to close is either closed or not really
1267a dirhandle. Check your control flow.
1268
49704364
WL
1269=item Code missing after '/'
1270
1271(F) You had a (sub-)template that ends with a '/'. There must be another
1272template code following the slash. See L<perlfunc/pack>.
1273
6df41af2
GS
1274=item %s: Command not found
1275
be771a83
GS
1276(A) You've accidentally run your script through B<csh> instead of Perl.
1277Check the #! line, or manually feed your script into Perl yourself.
6df41af2 1278
7a2e2cd6 1279=item Compilation failed in require
1280
1281(F) Perl could not compile a file specified in a C<require> statement.
be771a83
GS
1282Perl uses this generic message when none of the errors that it
1283encountered were severe enough to halt compilation immediately.
7a2e2cd6 1284
c3464db5
DD
1285=item Complex regular subexpression recursion limit (%d) exceeded
1286
be771a83
GS
1287(W regexp) The regular expression engine uses recursion in complex
1288situations where back-tracking is required. Recursion depth is limited
1289to 32766, or perhaps less in architectures where the stack cannot grow
1290arbitrarily. ("Simple" and "medium" situations are handled without
1291recursion and are not subject to a limit.) Try shortening the string
1292under examination; looping in Perl code (e.g. with C<while>) rather than
1293in the regular expression engine; or rewriting the regular expression so
c2e66d9e 1294that it is simpler or backtracks less. (See L<perlfaq2> for information
be771a83 1295on I<Mastering Regular Expressions>.)
c3464db5 1296
38875929
DM
1297=item cond_broadcast() called on unlocked variable
1298
1299(W threads) Within a thread-enabled program, you tried to call
1300cond_broadcast() on a variable which wasn't locked. The cond_broadcast()
1301function is used to wake up another thread that is waiting in a
1302cond_wait(). To ensure that the signal isn't sent before the other thread
1303has a chance to enter the wait, it is usual for the signaling thread to
1304first wait for a lock on variable. This lock attempt will only succeed
1305after the other thread has entered cond_wait() and thus relinquished the
1306lock.
1307
38875929
DM
1308=item cond_signal() called on unlocked variable
1309
1310(W threads) Within a thread-enabled program, you tried to call
1311cond_signal() on a variable which wasn't locked. The cond_signal()
1312function is used to wake up another thread that is waiting in a
1313cond_wait(). To ensure that the signal isn't sent before the other thread
1314has a chance to enter the wait, it is usual for the signaling thread to
1315first wait for a lock on variable. This lock attempt will only succeed
1316after the other thread has entered cond_wait() and thus relinquished the
1317lock.
1318
69282e91 1319=item connect() on closed socket %s
a0d0e21e 1320
be771a83
GS
1321(W closed) You tried to do a connect on a closed socket. Did you forget
1322to check the return value of your socket() call? See
1323L<perlfunc/connect>.
a0d0e21e 1324
41ab332f 1325=item Constant(%s)%s: %s
6df41af2 1326
be771a83
GS
1327(F) The parser found inconsistencies either while attempting to define
1328an overloaded constant, or when trying to find the character name
1329specified in the C<\N{...}> escape. Perhaps you forgot to load the
1330corresponding C<overload> or C<charnames> pragma? See L<charnames> and
1331L<overload>.
6df41af2 1332
fc8cd66c
YO
1333=item Constant(%s)%s: %s in regex; marked by <-- HERE in m/%s/
1334
1a147d38
YO
1335(F) The parser found inconsistencies while attempting to find
1336the character name specified in the C<\N{...}> escape. Perhaps you
1337forgot to load the corresponding C<charnames> pragma?
fc8cd66c
YO
1338See L<charnames>.
1339
1340
779c5bc9
GS
1341=item Constant is not %s reference
1342
1343(F) A constant value (perhaps declared using the C<use constant> pragma)
be771a83
GS
1344is being dereferenced, but it amounts to the wrong type of reference.
1345The message indicates the type of reference that was expected. This
1346usually indicates a syntax error in dereferencing the constant value.
779c5bc9
GS
1347See L<perlsub/"Constant Functions"> and L<constant>.
1348
4cee8e80
CS
1349=item Constant subroutine %s redefined
1350
bb028877 1351(S) You redefined a subroutine which had previously been
be771a83
GS
1352eligible for inlining. See L<perlsub/"Constant Functions"> for
1353commentary and workarounds.
4cee8e80 1354
9607fc9c 1355=item Constant subroutine %s undefined
1356
be771a83
GS
1357(W misc) You undefined a subroutine which had previously been eligible
1358for inlining. See L<perlsub/"Constant Functions"> for commentary and
1359workarounds.
9607fc9c 1360
e7ea3e70
IZ
1361=item Copy method did not return a reference
1362
64977eb6 1363(F) The method which overloads "=" is buggy. See
13a2d996 1364L<overload/Copy Constructor>.
e7ea3e70 1365
6798c92b
GS
1366=item CORE::%s is not a keyword
1367
1368(F) The CORE:: namespace is reserved for Perl keywords.
1369
a0d0e21e
LW
1370=item corrupted regexp pointers
1371
1372(P) The regular expression engine got confused by what the regular
1373expression compiler gave it.
1374
1375=item corrupted regexp program
1376
be771a83
GS
1377(P) The regular expression engine got passed a regexp program without a
1378valid magic number.
a0d0e21e 1379
6df41af2
GS
1380=item Corrupt malloc ptr 0x%lx at 0x%lx
1381
1382(P) The malloc package that comes with Perl had an internal failure.
1383
49704364
WL
1384=item Count after length/code in unpack
1385
1386(F) You had an unpack template indicating a counted-length string, but
1387you have also specified an explicit size for the string. See
1388L<perlfunc/pack>.
1389
a0d0e21e
LW
1390=item Deep recursion on subroutine "%s"
1391
be771a83
GS
1392(W recursion) This subroutine has called itself (directly or indirectly)
1393100 times more than it has returned. This probably indicates an
1394infinite recursion, unless you're writing strange benchmark programs, in
1395which case it indicates something else.
a0d0e21e 1396
f10b0346 1397=item defined(@array) is deprecated
69794302 1398
be771a83
GS
1399(D deprecated) defined() is not usually useful on arrays because it
1400checks for an undefined I<scalar> value. If you want to see if the
64977eb6 1401array is empty, just use C<if (@array) { # not empty }> for example.
69794302 1402
f10b0346 1403=item defined(%hash) is deprecated
69794302 1404
be771a83
GS
1405(D deprecated) defined() is not usually useful on hashes because it
1406checks for an undefined I<scalar> value. If you want to see if the hash
64977eb6 1407is empty, just use C<if (%hash) { # not empty }> for example.
69794302 1408
62658f4d
PM
1409=item %s defines neither package nor VERSION--version check failed
1410
1411(F) You said something like "use Module 42" but in the Module file
1412there are neither package declarations nor a C<$VERSION>.
1413
fc36a67e 1414=item Delimiter for here document is too long
1415
be771a83
GS
1416(F) In a here document construct like C<<<FOO>, the label C<FOO> is too
1417long for Perl to handle. You have to be seriously twisted to write code
1418that triggers this error.
fc36a67e 1419
6d3b25aa
RGS
1420=item Deprecated use of my() in false conditional
1421
1422(D deprecated) You used a declaration similar to C<my $x if 0>.
1423There has been a long-standing bug in Perl that causes a lexical variable
1424not to be cleared at scope exit when its declaration includes a false
1425conditional. Some people have exploited this bug to achieve a kind of
1426static variable. Since we intend to fix this bug, we don't want people
1427relying on this behavior. You can achieve a similar static effect by
1428declaring the variable in a separate block outside the function, eg
36fb85f3 1429
6d3b25aa
RGS
1430 sub f { my $x if 0; return $x++ }
1431
1432becomes
1433
1434 { my $x; sub f { return $x++ } }
1435
36fb85f3
RGS
1436Beginning with perl 5.9.4, you can also use C<state> variables to
1437have lexicals that are initialized only once (see L<feature>):
1438
1439 sub f { state $x; return $x++ }
1440
500ab966
RGS
1441=item DESTROY created new reference to dead object '%s'
1442
1443(F) A DESTROY() method created a new reference to the object which is
1444just being DESTROYed. Perl is confused, and prefers to abort rather than
1445to create a dangling reference.
1446
3cdd684c
TP
1447=item Did not produce a valid header
1448
1449See Server error.
1450
6df41af2
GS
1451=item %s did not return a true value
1452
1453(F) A required (or used) file must return a true value to indicate that
1454it compiled correctly and ran its initialization code correctly. It's
1455traditional to end such a file with a "1;", though any true value would
1456do. See L<perlfunc/require>.
1457
cc507455 1458=item (Did you mean &%s instead?)
4633a7c4 1459
be771a83
GS
1460(W) You probably referred to an imported subroutine &FOO as $FOO or some
1461such.
4633a7c4 1462
cc507455 1463=item (Did you mean "local" instead of "our"?)
33633739 1464
be771a83
GS
1465(W misc) Remember that "our" does not localize the declared global
1466variable. You have declared it again in the same lexical scope, which
1467seems superfluous.
33633739 1468
cc507455 1469=item (Did you mean $ or @ instead of %?)
a0d0e21e 1470
be771a83
GS
1471(W) You probably said %hash{$key} when you meant $hash{$key} or
1472@hash{@keys}. On the other hand, maybe you just meant %hash and got
1473carried away.
748a9306 1474
7e1af8bc 1475=item Died
5f05dabc 1476
1477(F) You passed die() an empty string (the equivalent of C<die "">) or
1478you called it with no args and both C<$@> and C<$_> were empty.
1479
3cdd684c
TP
1480=item Document contains no data
1481
1482See Server error.
1483
62658f4d
PM
1484=item %s does not define %s::VERSION--version check failed
1485
1486(F) You said something like "use Module 42" but the Module did not
1487define a C<$VERSION.>
1488
49704364
WL
1489=item '/' does not take a repeat count
1490
1491(F) You cannot put a repeat count of any kind right after the '/' code.
1492See L<perlfunc/pack>.
1493
a0d0e21e
LW
1494=item Don't know how to handle magic of type '%s'
1495
1496(P) The internal handling of magical variables has been cursed.
1497
1498=item do_study: out of memory
1499
1500(P) This should have been caught by safemalloc() instead.
1501
6df41af2
GS
1502=item (Do you need to predeclare %s?)
1503
56da5a46
RGS
1504(S syntax) This is an educated guess made in conjunction with the message
1505"%s found where operator expected". It often means a subroutine or module
6df41af2
GS
1506name is being referenced that hasn't been declared yet. This may be
1507because of ordering problems in your file, or because of a missing
be771a83
GS
1508"sub", "package", "require", or "use" statement. If you're referencing
1509something that isn't defined yet, you don't actually have to define the
1510subroutine or package before the current location. You can use an empty
1511"sub foo;" or "package FOO;" to enter a "forward" declaration.
6df41af2 1512
ac206dc8
RGS
1513=item dump() better written as CORE::dump()
1514
1515(W misc) You used the obsolescent C<dump()> built-in function, without fully
1516qualifying it as C<CORE::dump()>. Maybe it's a typo. See L<perlfunc/dump>.
1517
84d78eb7
YO
1518=item dump is not supported
1519
1520(F) Your machine doesn't support dump/undump.
1521
a0d0e21e
LW
1522=item Duplicate free() ignored
1523
be771a83
GS
1524(S malloc) An internal routine called free() on something that had
1525already been freed.
a0d0e21e 1526
1109a392
MHM
1527=item Duplicate modifier '%c' after '%c' in %s
1528
1529(W) You have applied the same modifier more than once after a type
1530in a pack template. See L<perlfunc/pack>.
1531
4633a7c4
LW
1532=item elseif should be elsif
1533
56da5a46
RGS
1534(S syntax) There is no keyword "elseif" in Perl because Larry thinks it's
1535ugly. Your code will be interpreted as an attempt to call a method named
be771a83 1536"elseif" for the class returned by the following block. This is
4633a7c4
LW
1537unlikely to be what you want.
1538
ab13f0c7
JH
1539=item Empty %s
1540
af6f566e
HS
1541(F) C<\p> and C<\P> are used to introduce a named Unicode property, as
1542described in L<perlunicode> and L<perlre>. You used C<\p> or C<\P> in
1543a regular expression without specifying the property name.
ab13f0c7 1544
85ab1d1d 1545=item entering effective %s failed
5ff3f7a4 1546
85ab1d1d 1547(F) While under the C<use filetest> pragma, switching the real and
5ff3f7a4
GS
1548effective uids or gids failed.
1549
c038024b
RGS
1550=item %ENV is aliased to %s
1551
1552(F) You're running under taint mode, and the C<%ENV> variable has been
1553aliased to another hash, so it doesn't reflect anymore the state of the
1554program's environment. This is potentially insecure.
1555
748a9306
LW
1556=item Error converting file specification %s
1557
5f05dabc 1558(F) An error peculiar to VMS. Because Perl may have to deal with file
748a9306 1559specifications in either VMS or Unix syntax, it converts them to a
be771a83
GS
1560single form when it must operate on them directly. Either you've passed
1561an invalid file specification to Perl, or you've found a case the
1562conversion routines don't handle. Drat.
748a9306 1563
e4d48cc9
GS
1564=item %s: Eval-group in insecure regular expression
1565
be771a83
GS
1566(F) Perl detected tainted data when trying to compile a regular
1567expression that contains the C<(?{ ... })> zero-width assertion, which
1568is unsafe. See L<perlre/(?{ code })>, and L<perlsec>.
e4d48cc9 1569
fc8f615e 1570=item %s: Eval-group not allowed at runtime, use re 'eval'
e4d48cc9 1571
be771a83
GS
1572(F) Perl tried to compile a regular expression containing the
1573C<(?{ ... })> zero-width assertion at run time, as it would when the
1574pattern contains interpolated values. Since that is a security risk, it
1575is not allowed. If you insist, you may still do this by explicitly
1576building the pattern from an interpolated string at run time and using
1577that in an eval(). See L<perlre/(?{ code })>.
e4d48cc9 1578
6df41af2
GS
1579=item %s: Eval-group not allowed, use re 'eval'
1580
be771a83
GS
1581(F) A regular expression contained the C<(?{ ... })> zero-width
1582assertion, but that construct is only allowed when the C<use re 'eval'>
1583pragma is in effect. See L<perlre/(?{ code })>.
6df41af2 1584
1a147d38
YO
1585=item EVAL without pos change exceeded limit in regex; marked by <-- HERE in m/%s/
1586
1587(F) You used a pattern that nested too many EVAL calls without consuming
1588any text. Restructure the pattern so that text is consumed.
1589
1590The <-- HERE shows in the regular expression about where the problem was
1591discovered.
1592
fc36a67e 1593=item Excessively long <> operator
1594
1595(F) The contents of a <> operator may not exceed the maximum size of a
1596Perl identifier. If you're just trying to glob a long list of
1597filenames, try using the glob() operator, or put the filenames into a
1598variable and glob that.
1599
ed9aa3b7
SG
1600=item exec? I'm not *that* kind of operating system
1601
1602(F) The C<exec> function is not implemented in MacPerl. See L<perlport>.
1603
f86702cc 1604=item Execution of %s aborted due to compilation errors
a0d0e21e
LW
1605
1606(F) The final summary message when a Perl compilation fails.
1607
1608=item Exiting eval via %s
1609
be771a83
GS
1610(W exiting) You are exiting an eval by unconventional means, such as a
1611goto, or a loop control statement.
e476b1b5
GS
1612
1613=item Exiting format via %s
1614
9a2ff54b 1615(W exiting) You are exiting a format by unconventional means, such as a
be771a83 1616goto, or a loop control statement.
a0d0e21e 1617
0a753a76 1618=item Exiting pseudo-block via %s
1619
be771a83
GS
1620(W exiting) You are exiting a rather special block construct (like a
1621sort block or subroutine) by unconventional means, such as a goto, or a
1622loop control statement. See L<perlfunc/sort>.
0a753a76 1623
a0d0e21e
LW
1624=item Exiting subroutine via %s
1625
be771a83
GS
1626(W exiting) You are exiting a subroutine by unconventional means, such
1627as a goto, or a loop control statement.
a0d0e21e
LW
1628
1629=item Exiting substitution via %s
1630
be771a83
GS
1631(W exiting) You are exiting a substitution by unconventional means, such
1632as a return, a goto, or a loop control statement.
a0d0e21e 1633
7b8d334a
GS
1634=item Explicit blessing to '' (assuming package main)
1635
be771a83
GS
1636(W misc) You are blessing a reference to a zero length string. This has
1637the effect of blessing the reference into the package main. This is
1638usually not what you want. Consider providing a default target package,
1639e.g. bless($ref, $p || 'MyPackage');
7b8d334a 1640
6df41af2
GS
1641=item %s: Expression syntax
1642
be771a83
GS
1643(A) You've accidentally run your script through B<csh> instead of Perl.
1644Check the #! line, or manually feed your script into Perl yourself.
6df41af2
GS
1645
1646=item %s failed--call queue aborted
1647
3c10abe3
AG
1648(F) An untrapped exception was raised while executing a UNITCHECK,
1649CHECK, INIT, or END subroutine. Processing of the remainder of the
1650queue of such routines has been prematurely ended.
6df41af2 1651
7253e4e3 1652=item False [] range "%s" in regex; marked by <-- HERE in m/%s/
73b437c8 1653
be771a83 1654(W regexp) A character class range must start and end at a literal
7253e4e3
RK
1655character, not another character class like C<\d> or C<[:alpha:]>. The "-"
1656in your false range is interpreted as a literal "-". Consider quoting the
1657"-", "\-". The <-- HERE shows in the regular expression about where the
1658problem was discovered. See L<perlre>.
73b437c8 1659
748a9306 1660=item Fatal VMS error at %s, line %d
a0d0e21e 1661
be771a83
GS
1662(P) An error peculiar to VMS. Something untoward happened in a VMS
1663system service or RTL routine; Perl's exit status should provide more
1664details. The filename in "at %s" and the line number in "line %d" tell
1665you which section of the Perl source code is distressed.
a0d0e21e
LW
1666
1667=item fcntl is not implemented
1668
1669(F) Your machine apparently doesn't implement fcntl(). What is this, a
1670PDP-11 or something?
1671
22846ab4
AB
1672=item FETCHSIZE returned a negative value
1673
1674(F) A tied array claimed to have a negative number of elements, which
1675is not possible.
1676
f337b084
TH
1677=item Field too wide in 'u' format in pack
1678
1679(W pack) Each line in an uuencoded string start with a length indicator
1680which can't encode values above 63. So there is no point in asking for
1681a line length bigger than that. Perl will behave as if you specified
1682C<u63> as format.
1683
af8c498a 1684=item Filehandle %s opened only for input
a0d0e21e 1685
6c8d78fb
HS
1686(W io) You tried to write on a read-only filehandle. If you intended
1687it to be a read-write filehandle, you needed to open it with "+<" or
1688"+>" or "+>>" instead of with "<" or nothing. If you intended only to
1689write the file, use ">" or ">>". See L<perlfunc/open>.
a0d0e21e 1690
af8c498a 1691=item Filehandle %s opened only for output
a0d0e21e 1692
6c8d78fb
HS
1693(W io) You tried to read from a filehandle opened only for writing, If
1694you intended it to be a read/write filehandle, you needed to open it
be771a83
GS
1695with "+<" or "+>" or "+>>" instead of with "<" or nothing. If you
1696intended only to read from the file, use "<". See L<perlfunc/open>.
6c8d78fb
HS
1697Another possibility is that you attempted to open filedescriptor 0
1698(also known as STDIN) for output (maybe you closed STDIN earlier?).
97828cef
RGS
1699
1700=item Filehandle %s reopened as %s only for input
1701
1702(W io) You opened for reading a filehandle that got the same filehandle id
d7f8936a 1703as STDOUT or STDERR. This occurred because you closed STDOUT or STDERR
97828cef
RGS
1704previously.
1705
1706=item Filehandle STDIN reopened as %s only for output
1707
1708(W io) You opened for writing a filehandle that got the same filehandle id
d7f8936a 1709as STDIN. This occurred because you closed STDIN previously.
a0d0e21e
LW
1710
1711=item Final $ should be \$ or $name
1712
1713(F) You must now decide whether the final $ in a string was meant to be
be771a83
GS
1714a literal dollar sign, or was meant to introduce a variable name that
1715happens to be missing. So you have to put either the backslash or the
1716name.
a0d0e21e 1717
56e90b21
GS
1718=item flock() on closed filehandle %s
1719
be771a83 1720(W closed) The filehandle you're attempting to flock() got itself closed
c289d2f7 1721some time before now. Check your control flow. flock() operates on
be771a83
GS
1722filehandles. Are you attempting to call flock() on a dirhandle by the
1723same name?
56e90b21 1724
6df41af2
GS
1725=item Format not terminated
1726
1727(F) A format must be terminated by a line with a solitary dot. Perl got
1728to the end of your file without finding such a line.
1729
a0d0e21e
LW
1730=item Format %s redefined
1731
e476b1b5 1732(W redefine) You redefined a format. To suppress this warning, say
a0d0e21e
LW
1733
1734 {
271595cc 1735 no warnings 'redefine';
a0d0e21e
LW
1736 eval "format NAME =...";
1737 }
1738
a0d0e21e
LW
1739=item Found = in conditional, should be ==
1740
e476b1b5 1741(W syntax) You said
a0d0e21e
LW
1742
1743 if ($foo = 123)
1744
1745when you meant
1746
1747 if ($foo == 123)
1748
1749(or something like that).
1750
6df41af2
GS
1751=item %s found where operator expected
1752
56da5a46
RGS
1753(S syntax) The Perl lexer knows whether to expect a term or an operator.
1754If it sees what it knows to be a term when it was expecting to see an
be771a83
GS
1755operator, it gives you this warning. Usually it indicates that an
1756operator or delimiter was omitted, such as a semicolon.
6df41af2 1757
a0d0e21e
LW
1758=item gdbm store returned %d, errno %d, key "%s"
1759
1760(S) A warning from the GDBM_File extension that a store failed.
1761
1762=item gethostent not implemented
1763
1764(F) Your C library apparently doesn't implement gethostent(), probably
1765because if it did, it'd feel morally obligated to return every hostname
1766on the Internet.
1767
69282e91 1768=item get%sname() on closed socket %s
a0d0e21e 1769
be771a83
GS
1770(W closed) You tried to get a socket or peer socket name on a closed
1771socket. Did you forget to check the return value of your socket() call?
a0d0e21e 1772
748a9306
LW
1773=item getpwnam returned invalid UIC %#o for user "%s"
1774
1775(S) A warning peculiar to VMS. The call to C<sys$getuai> underlying the
1776C<getpwnam> operator returned an invalid UIC.
1777
6df41af2
GS
1778=item getsockopt() on closed socket %s
1779
be771a83
GS
1780(W closed) You tried to get a socket option on a closed socket. Did you
1781forget to check the return value of your socket() call? See
6df41af2
GS
1782L<perlfunc/getsockopt>.
1783
1784=item Global symbol "%s" requires explicit package name
1785
a4edf47d 1786(F) You've said "use strict" or "use strict vars", which indicates
30c282f6 1787that all variables must either be lexically scoped (using "my" or "state"),
a4edf47d
GS
1788declared beforehand using "our", or explicitly qualified to say
1789which package the global variable is in (using "::").
6df41af2 1790
e476b1b5
GS
1791=item glob failed (%s)
1792
be771a83
GS
1793(W glob) Something went wrong with the external program(s) used for
1794C<glob> and C<< <*.c> >>. Usually, this means that you supplied a
1795C<glob> pattern that caused the external program to fail and exit with a
1796nonzero status. If the message indicates that the abnormal exit
1797resulted in a coredump, this may also mean that your csh (C shell) is
1798broken. If so, you should change all of the csh-related variables in
1799config.sh: If you have tcsh, make the variables refer to it as if it
1800were csh (e.g. C<full_csh='/usr/bin/tcsh'>); otherwise, make them all
1801empty (except that C<d_csh> should be C<'undef'>) so that Perl will
1802think csh is missing. In either case, after editing config.sh, run
75b44862 1803C<./Configure -S> and rebuild Perl.
e476b1b5 1804
a0d0e21e
LW
1805=item Glob not terminated
1806
1807(F) The lexer saw a left angle bracket in a place where it was expecting
be771a83
GS
1808a term, so it's looking for the corresponding right angle bracket, and
1809not finding it. Chances are you left some needed parentheses out
1810earlier in the line, and you really meant a "less than".
a0d0e21e 1811
6df41af2 1812=item Got an error from DosAllocMem
a0d0e21e 1813
6df41af2
GS
1814(P) An error peculiar to OS/2. Most probably you're using an obsolete
1815version of Perl, and this should not happen anyway.
a0d0e21e
LW
1816
1817=item goto must have label
1818
1819(F) Unlike with "next" or "last", you're not allowed to goto an
1820unspecified destination. See L<perlfunc/goto>.
1821
49704364 1822=item ()-group starts with a count
18529408 1823
49704364 1824(F) A ()-group started with a count. A count is
18529408 1825supposed to follow something: a template character or a ()-group.
49704364 1826 See L<perlfunc/pack>.
18529408 1827
6df41af2
GS
1828=item %s had compilation errors
1829
1830(F) The final summary message when a C<perl -c> fails.
1831
a0d0e21e
LW
1832=item Had to create %s unexpectedly
1833
be771a83
GS
1834(S internal) A routine asked for a symbol from a symbol table that ought
1835to have existed already, but for some reason it didn't, and had to be
1836created on an emergency basis to prevent a core dump.
a0d0e21e
LW
1837
1838=item Hash %%s missing the % in argument %d of %s()
1839
be771a83
GS
1840(D deprecated) Really old Perl let you omit the % on hash names in some
1841spots. This is now heavily deprecated.
a0d0e21e 1842
6df41af2
GS
1843=item %s has too many errors
1844
1845(F) The parser has given up trying to parse the program after 10 errors.
1846Further error messages would likely be uninformative.
1847
252aa082
JH
1848=item Hexadecimal number > 0xffffffff non-portable
1849
e476b1b5 1850(W portable) The hexadecimal number you specified is larger than 2**32-1
9e24b6e2
JH
1851(4294967295) and therefore non-portable between systems. See
1852L<perlport> for more on portability concerns.
252aa082 1853
8903cb82 1854=item Identifier too long
1855
1856(F) Perl limits identifiers (names for variables, functions, etc.) to
fc36a67e 1857about 250 characters for simple names, and somewhat more for compound
be771a83
GS
1858names (like C<$A::B>). You've exceeded Perl's limits. Future versions
1859of Perl are likely to eliminate these arbitrary limitations.
8903cb82 1860
fc8cd66c
YO
1861=item Ignoring %s in character class in regex; marked by <-- HERE in m/%s/
1862
38a44b82 1863(W) Named Unicode character escapes (\N{...}) may return multi-char
fc8cd66c 1864or zero length sequences. When such an escape is used in a character class
1a147d38 1865its behaviour is not well defined. Check that the correct escape has
fc8cd66c
YO
1866been used, and the correct charname handler is in scope.
1867
6df41af2 1868=item Illegal binary digit %s
f675dbe5 1869
6df41af2 1870(F) You used a digit other than 0 or 1 in a binary number.
f675dbe5 1871
6df41af2 1872=item Illegal binary digit %s ignored
a0d0e21e 1873
be771a83
GS
1874(W digit) You may have tried to use a digit other than 0 or 1 in a
1875binary number. Interpretation of the binary number stopped before the
1876offending digit.
a0d0e21e 1877
4fdae800 1878=item Illegal character %s (carriage return)
1879
d5898338 1880(F) Perl normally treats carriage returns in the program text as it
be771a83
GS
1881would any other whitespace, which means you should never see this error
1882when Perl was built using standard options. For some reason, your
1883version of Perl appears to have been built without this support. Talk
1884to your Perl administrator.
4fdae800 1885
d37a9538
ST
1886=item Illegal character in prototype for %s : %s
1887
420cdfc1 1888(W syntax) An illegal character was found in a prototype declaration. Legal
d37a9538
ST
1889characters in prototypes are $, @, %, *, ;, [, ], &, and \.
1890
904d85c5
RGS
1891=item Illegal declaration of anonymous subroutine
1892
1893(F) When using the C<sub> keyword to construct an anonymous subroutine,
1894you must always specify a block of code. See L<perlsub>.
1895
8e742a20
MHM
1896=item Illegal declaration of subroutine %s
1897
1898(F) A subroutine was not declared correctly. See L<perlsub>.
1899
a0d0e21e
LW
1900=item Illegal division by zero
1901
be771a83
GS
1902(F) You tried to divide a number by 0. Either something was wrong in
1903your logic, or you need to put a conditional in to guard against
1904meaningless input.
a0d0e21e 1905
6df41af2
GS
1906=item Illegal hexadecimal digit %s ignored
1907
be771a83
GS
1908(W digit) You may have tried to use a character other than 0 - 9 or
1909A - F, a - f in a hexadecimal number. Interpretation of the hexadecimal
1910number stopped before the illegal character.
6df41af2 1911
a0d0e21e
LW
1912=item Illegal modulus zero
1913
be771a83
GS
1914(F) You tried to divide a number by 0 to get the remainder. Most
1915numbers don't take to this kindly.
a0d0e21e 1916
6df41af2 1917=item Illegal number of bits in vec
399388f4 1918
6df41af2
GS
1919(F) The number of bits in vec() (the third argument) must be a power of
1920two from 1 to 32 (or 64, if your platform supports that).
399388f4
GS
1921
1922=item Illegal octal digit %s
a0d0e21e 1923
d1be9408 1924(F) You used an 8 or 9 in an octal number.
a0d0e21e 1925
399388f4 1926=item Illegal octal digit %s ignored
748a9306 1927
d1be9408 1928(W digit) You may have tried to use an 8 or 9 in an octal number.
75b44862 1929Interpretation of the octal number stopped before the 8 or 9.
748a9306 1930
6df41af2 1931=item Illegal switch in PERL5OPT: %s
6ff81951 1932
6df41af2 1933(X) The PERL5OPT environment variable may only be used to set the
646ca9b2 1934following switches: B<-[CDIMUdmtw]>.
6ff81951 1935
6df41af2 1936=item Ill-formed CRTL environ value "%s"
81e118e0 1937
75b44862 1938(W internal) A warning peculiar to VMS. Perl tried to read the CRTL's
be771a83
GS
1939internal environ array, and encountered an element without the C<=>
1940delimiter used to separate keys from values. The element is ignored.
09bef843 1941
6df41af2 1942=item Ill-formed message in prime_env_iter: |%s|
54310121 1943
be771a83
GS
1944(W internal) A warning peculiar to VMS. Perl tried to read a logical
1945name or CLI symbol definition when preparing to iterate over %ENV, and
1946didn't see the expected delimiter between key and value, so the line was
1947ignored.
54310121 1948
6df41af2 1949=item (in cleanup) %s
9607fc9c 1950
be771a83
GS
1951(W misc) This prefix usually indicates that a DESTROY() method raised
1952the indicated exception. Since destructors are usually called by the
1953system at arbitrary points during execution, and often a vast number of
1954times, the warning is issued only once for any number of failures that
1955would otherwise result in the same message being repeated.
6df41af2 1956
be771a83
GS
1957Failure of user callbacks dispatched using the C<G_KEEPERR> flag could
1958also result in this warning. See L<perlcall/G_KEEPERR>.
9607fc9c 1959
2c7d6b9c
RGS
1960=item Inconsistent hierarchy during C3 merge of class '%s': merging failed on parent '%s'
1961
1962(F) The method resolution order (MRO) of the given class is not
1963C3-consistent, and you have enabled the C3 MRO for this class. See the C3
1964documentation in L<mro> for more information.
1965
979699d9
JH
1966=item In EBCDIC the v-string components cannot exceed 2147483647
1967
1968(F) An error peculiar to EBCDIC. Internally, v-strings are stored as
1969Unicode code points, and encoded in EBCDIC as UTF-EBCDIC. The UTF-EBCDIC
1970encoding is limited to code points no larger than 2147483647 (0x7FFFFFFF).
1971
1a147d38
YO
1972=item Infinite recursion in regex; marked by <-- HERE in m/%s/
1973
1974(F) You used a pattern that references itself without consuming any input
1975text. You should check the pattern to ensure that recursive patterns
1976either consume text or fail.
1977
1978The <-- HERE shows in the regular expression about where the problem was
1979discovered.
1980
6dbe9451
NC
1981=item Initialization of state variables in list context currently forbidden
1982
1983(F) Currently the implementation of "state" only permits the initialization
1984of scalar variables in scalar context. Re-write C<state ($a) = 42> as
1985C<state $a = 42> to change from list to scalar context. Constructions such
1986as C<state (@a) = foo()> will be supported in a future perl release.
1987
a0d0e21e
LW
1988=item Insecure dependency in %s
1989
8b1a09fc 1990(F) You tried to do something that the tainting mechanism didn't like.
be771a83
GS
1991The tainting mechanism is turned on when you're running setuid or
1992setgid, or when you specify B<-T> to turn it on explicitly. The
1993tainting mechanism labels all data that's derived directly or indirectly
1994from the user, who is considered to be unworthy of your trust. If any
1995such data is used in a "dangerous" operation, you get this error. See
1996L<perlsec> for more information.
a0d0e21e
LW
1997
1998=item Insecure directory in %s
1999
be771a83
GS
2000(F) You can't use system(), exec(), or a piped open in a setuid or
2001setgid script if C<$ENV{PATH}> contains a directory that is writable by
df98f984
RGS
2002the world. Also, the PATH must not contain any relative directory.
2003See L<perlsec>.
a0d0e21e 2004
62f468fc 2005=item Insecure $ENV{%s} while running %s
a0d0e21e
LW
2006
2007(F) You can't use system(), exec(), or a piped open in a setuid or
62f468fc 2008setgid script if any of C<$ENV{PATH}>, C<$ENV{IFS}>, C<$ENV{CDPATH}>,
332d5f78
SR
2009C<$ENV{ENV}>, C<$ENV{BASH_ENV}> or C<$ENV{TERM}> are derived from data
2010supplied (or potentially supplied) by the user. The script must set
2011the path to a known value, using trustworthy data. See L<perlsec>.
a0d0e21e 2012
a7ae9550
GS
2013=item Integer overflow in %s number
2014
75b44862 2015(W overflow) The hexadecimal, octal or binary number you have specified
be771a83
GS
2016either as a literal or as an argument to hex() or oct() is too big for
2017your architecture, and has been converted to a floating point number.
2018On a 32-bit architecture the largest hexadecimal, octal or binary number
9e24b6e2
JH
2019representable without overflow is 0xFFFFFFFF, 037777777777, or
20200b11111111111111111111111111111111 respectively. Note that Perl
2021transparently promotes all numbers to a floating point representation
2022internally--subject to loss of precision errors in subsequent
2023operations.
bbce6d69 2024
2fba7546
GA
2025=item Integer overflow in format string for %s
2026
0be96356
AL
2027(F) The indexes and widths specified in the format string of C<printf()>
2028or C<sprintf()> are too large. The numbers must not overflow the size of
2fba7546
GA
2029integers for your architecture.
2030
46314c13
JP
2031=item Integer overflow in version
2032
2033(F) Some portion of a version initialization is too large for the
2034size of integers for your architecture. This is not a warning
2035because there is no rational reason for a version to try and use a
2036element larger than typically 2**32. This is usually caused by
2037trying to use some odd mathematical operation as a version, like
2038100/9.
2039
7253e4e3 2040=item Internal disaster in regex; marked by <-- HERE in m/%s/
6df41af2
GS
2041
2042(P) Something went badly wrong in the regular expression parser.
7253e4e3 2043The <-- HERE shows in the regular expression about where the problem was
b45f050a
JF
2044discovered.
2045
748a9306
LW
2046=item Internal inconsistency in tracking vforks
2047
be771a83
GS
2048(S) A warning peculiar to VMS. Perl keeps track of the number of times
2049you've called C<fork> and C<exec>, to determine whether the current call
2050to C<exec> should affect the current script or a subprocess (see
2051L<perlvms/"exec LIST">). Somehow, this count has become scrambled, so
2052Perl is making a guess and treating this C<exec> as a request to
2053terminate the Perl script and execute the specified command.
748a9306 2054
7253e4e3 2055=item Internal urp in regex; marked by <-- HERE in m/%s/
b45f050a 2056
7253e4e3
RK
2057(P) Something went badly awry in the regular expression parser. The
2058<-- HERE shows in the regular expression about where the problem was
2059discovered.
a0d0e21e 2060
6df41af2
GS
2061=item %s (...) interpreted as function
2062
75b44862 2063(W syntax) You've run afoul of the rule that says that any list operator
be771a83 2064followed by parentheses turns into a function, with all the list
64977eb6 2065operators arguments found inside the parentheses. See
13a2d996 2066L<perlop/Terms and List Operators (Leftward)>.
6df41af2 2067
09bef843
SB
2068=item Invalid %s attribute: %s
2069
2070The indicated attribute for a subroutine or variable was not recognized
2071by Perl or by a user-supplied handler. See L<attributes>.
2072
2073=item Invalid %s attributes: %s
2074
be771a83
GS
2075The indicated attributes for a subroutine or variable were not
2076recognized by Perl or by a user-supplied handler. See L<attributes>.
09bef843 2077
c635e13b 2078=item Invalid conversion in %s: "%s"
2079
be771a83
GS
2080(W printf) Perl does not understand the given format conversion. See
2081L<perlfunc/sprintf>.
c635e13b 2082
9e08bc66
TS
2083=item Invalid escape in the specified encoding in regex; marked by <-- HERE in m/%s/
2084
2085(W regexp) The numeric escape (for example C<\xHH>) of value < 256
2086didn't correspond to a single character through the conversion
2087from the encoding specified by the encoding pragma.
2088The escape was replaced with REPLACEMENT CHARACTER (U+FFFD) instead.
2089The <-- HERE shows in the regular expression about where the
2090escape was discovered.
2091
2c7d6b9c
RGS
2092=item Invalid mro name: '%s'
2093
2094(F) You tried to C<mro::set_mro("classname", "foo")>
2095or C<use mro 'foo'>, where C<foo> is not a valid method resolution order (MRO).
2096(Currently, the only valid ones are C<dfs> and C<c3>). See L<mro>.
2097
7253e4e3 2098=item Invalid [] range "%s" in regex; marked by <-- HERE in m/%s/
6df41af2
GS
2099
2100(F) The range specified in a character class had a minimum character
7253e4e3
RK
2101greater than the maximum character. One possibility is that you forgot the
2102C<{}> from your ending C<\x{}> - C<\x> without the curly braces can go only
2103up to C<ff>. The <-- HERE shows in the regular expression about where the
2104problem was discovered. See L<perlre>.
6df41af2 2105
d1573ac7 2106=item Invalid range "%s" in transliteration operator
c2e66d9e
GS
2107
2108(F) The range specified in the tr/// or y/// operator had a minimum
2109character greater than the maximum character. See L<perlop>.
2110
09bef843
SB
2111=item Invalid separator character %s in attribute list
2112
0120eecf 2113(F) Something other than a colon or whitespace was seen between the
be771a83
GS
2114elements of an attribute list. If the previous attribute had a
2115parenthesised parameter list, perhaps that list was terminated too soon.
2116See L<attributes>.
09bef843 2117
b4581f09
JH
2118=item Invalid separator character %s in PerlIO layer specification %s
2119
2120(W layer) When pushing layers onto the Perl I/O system, something other than a
2121colon or whitespace was seen between the elements of a layer list.
2122If the previous attribute had a parenthesised parameter list, perhaps that
2123list was terminated too soon.
2124
49704364 2125=item Invalid type '%s' in %s
96e4d5b1 2126
49704364
WL
2127(F) The given character is not a valid pack or unpack type.
2128See L<perlfunc/pack>.
2129(W) The given character is not a valid pack or unpack type but used to be
75b44862 2130silently ignored.
96e4d5b1 2131
46314c13
JP
2132=item Invalid version format (multiple underscores)
2133
2134(F) Versions may contain at most a single underscore, which signals
2135that the version is a beta release. See L<version> for the allowed
2136version formats.
2137
2138=item Invalid version format (underscores before decimal)
2139
2140(F) Versions may not contain decimals after the optional underscore.
2141See L<version> for the allowed version formats.
2142
a0d0e21e
LW
2143=item ioctl is not implemented
2144
2145(F) Your machine apparently doesn't implement ioctl(), which is pretty
2146strange for a machine that supports C.
2147
c289d2f7
JH
2148=item ioctl() on unopened %s
2149
2150(W unopened) You tried ioctl() on a filehandle that was never opened.
2151Check you control flow and number of arguments.
2152
363c40c4
SB
2153=item IO layers (like "%s") unavailable
2154
2155(F) Your Perl has not been configured to have PerlIO, and therefore
2156you cannot use IO layers. To have PerlIO Perl must be configured
2157with 'useperlio'.
2158
80cbd5ad
JH
2159=item IO::Socket::atmark not implemented on this architecture
2160
2161(F) Your machine doesn't implement the sockatmark() functionality,
2162neither as a system call or an ioctl call (SIOCATMARK).
2163
b4581f09
JH
2164=item $* is no longer supported
2165
fafcdf9e 2166(S deprecated, syntax) The special variable C<$*>, deprecated in older perls, has
b4581f09
JH
2167been removed as of 5.9.0 and is no longer supported. You should use the
2168C<//m> and C<//s> regexp modifiers instead.
2169
8ae1fe26
RGS
2170=item $# is no longer supported
2171
fafcdf9e 2172(S deprecated, syntax) The special variable C<$#>, deprecated in older perls, has
8ae1fe26
RGS
2173been removed as of 5.9.3 and is no longer supported. You should use the
2174printf/sprintf functions instead.
2175
6ad11d81
JH
2176=item `%s' is not a code reference
2177
04a80ee0
RGS
2178(W overload) The second (fourth, sixth, ...) argument of overload::constant
2179needs to be a code reference. Either an anonymous subroutine, or a reference
6ad11d81
JH
2180to a subroutine.
2181
2182=item `%s' is not an overloadable type
2183
04a80ee0
RGS
2184(W overload) You tried to overload a constant type the overload package is
2185unaware of.
6ad11d81 2186
a0d0e21e
LW
2187=item junk on end of regexp
2188
2189(P) The regular expression parser is confused.
2190
2191=item Label not found for "last %s"
2192
be771a83
GS
2193(F) You named a loop to break out of, but you're not currently in a loop
2194of that name, not even if you count where you were called from. See
2195L<perlfunc/last>.
a0d0e21e
LW
2196
2197=item Label not found for "next %s"
2198
2199(F) You named a loop to continue, but you're not currently in a loop of
2200that name, not even if you count where you were called from. See
2201L<perlfunc/last>.
2202
2203=item Label not found for "redo %s"
2204
2205(F) You named a loop to restart, but you're not currently in a loop of
2206that name, not even if you count where you were called from. See
2207L<perlfunc/last>.
2208
85ab1d1d 2209=item leaving effective %s failed
5ff3f7a4 2210
85ab1d1d 2211(F) While under the C<use filetest> pragma, switching the real and
5ff3f7a4
GS
2212effective uids or gids failed.
2213
49704364
WL
2214=item length/code after end of string in unpack
2215
d7f8936a 2216(F) While unpacking, the string buffer was already used up when an unpack
49704364
WL
2217length/code combination tried to obtain more data. This results in
2218an undefined value for the length. See L<perlfunc/pack>.
2219
69282e91 2220=item listen() on closed socket %s
a0d0e21e 2221
be771a83
GS
2222(W closed) You tried to do a listen on a closed socket. Did you forget
2223to check the return value of your socket() call? See
2224L<perlfunc/listen>.
a0d0e21e 2225
58e23c8d 2226=item Lookbehind longer than %d not implemented in regex m/%s/
b45f050a
JF
2227
2228(F) There is currently a limit on the length of string which lookbehind can
58e23c8d 2229handle. This restriction may be eased in a future release.
2e50fd82 2230
b88df990
NC
2231=item Lost precision when %s %f by 1
2232
2233(W) The value you attempted to increment or decrement by one is too large
2234for the underlying floating point representation to store accurately,
2235hence the target of C<++> or C<--> is unchanged. Perl issues this warning
2236because it has already switched from integers to floating point when values
2237are too large for integers, and now even floating point is insufficient.
2238You may wish to switch to using L<Math::BigInt> explicitly.
2239
2f7da168
RK
2240=item lstat() on filehandle %s
2241
2242(W io) You tried to do an lstat on a filehandle. What did you mean
2243by that? lstat() makes sense only on filenames. (Perl did a fstat()
2244instead on the filehandle.)
2245
96ebfdd7
RK
2246=item Lvalue subs returning %s not implemented yet
2247
2248(F) Due to limitations in the current implementation, array and hash
2249values cannot be returned in subroutines used in lvalue context. See
2250L<perlsub/"Lvalue subroutines">.
2251
49704364
WL
2252=item Malformed integer in [] in pack
2253
2254(F) Between the brackets enclosing a numeric repeat count only digits
2255are permitted. See L<perlfunc/pack>.
2256
2257=item Malformed integer in [] in unpack
2258
2259(F) Between the brackets enclosing a numeric repeat count only digits
2260are permitted. See L<perlfunc/pack>.
2261
6df41af2
GS
2262=item Malformed PERLLIB_PREFIX
2263
2264(F) An error peculiar to OS/2. PERLLIB_PREFIX should be of the form
2265
2266 prefix1;prefix2
2267
2268or
6df41af2
GS
2269 prefix1 prefix2
2270
be771a83
GS
2271with nonempty prefix1 and prefix2. If C<prefix1> is indeed a prefix of
2272a builtin library search path, prefix2 is substituted. The error may
2273appear if components are not found, or are too long. See
fecfaeb8 2274"PERLLIB_PREFIX" in L<perlos2>.
6df41af2 2275
2f758a16
ST
2276=item Malformed prototype for %s: %s
2277
d37a9538
ST
2278(F) You tried to use a function with a malformed prototype. The
2279syntax of function prototypes is given a brief compile-time check for
2280obvious errors like invalid characters. A more rigorous check is run
2281when the function is called.
2f758a16 2282
ba210ebe
JH
2283=item Malformed UTF-8 character (%s)
2284
2575c402
JW
2285(S utf8) (F) Perl detected a string that didn't comply with UTF-8
2286encoding rules, even though it had the UTF8 flag on.
ba210ebe 2287
2575c402
JW
2288One possible cause is that you set the UTF8 flag yourself for data that
2289you thought to be in UTF-8 but it wasn't (it was for example legacy
22908-bit data). To guard against this, you can use Encode::decode_utf8.
2291
2292If you use the C<:encoding(UTF-8)> PerlIO layer for input, invalid byte
2293sequences are handled gracefully, but if you use C<:utf8>, the flag is
2294set without validating the data, possibly resulting in this error
2295message.
2296
2297See also L<Encode/"Handling Malformed Data">.
901b21bf 2298
dea0fc0b
JH
2299=item Malformed UTF-16 surrogate
2300
2301Perl thought it was reading UTF-16 encoded character data but while
2302doing it Perl met a malformed Unicode surrogate.
2303
f337b084
TH
2304=item Malformed UTF-8 string in pack
2305
2306(F) You tried to pack something that didn't comply with UTF-8 encoding
2307rules and perl was unable to guess how to make more progress.
2308
2309=item Malformed UTF-8 string in unpack
2310
2311(F) You tried to unpack something that didn't comply with UTF-8 encoding
2312rules and perl was unable to guess how to make more progress.
2313
2314=item Malformed UTF-8 string in '%c' format in unpack
2315
2316(F) You tried to unpack something that didn't comply with UTF-8 encoding
2317rules and perl was unable to guess how to make more progress.
2318
2563cec5
IZ
2319=item Maximal count of pending signals (%s) exceeded
2320
2321(F) Perl aborted due to a too important number of signals pending. This
2322usually indicates that your operating system tried to deliver signals
2323too fast (with a very high priority), starving the perl process from
2324resources it would need to reach a point where it can process signals
2325safely. (See L<perlipc/"Deferred Signals (Safe Signals)">.)
2326
49704364 2327=item %s matches null string many times in regex; marked by <-- HERE in m/%s/
6df41af2
GS
2328
2329(W regexp) The pattern you've specified would be an infinite loop if the
7253e4e3
RK
2330regular expression engine didn't specifically check for that. The <-- HERE
2331shows in the regular expression about where the problem was discovered.
2332See L<perlre>.
6df41af2 2333
25f58aea
PN
2334=item "%s" may clash with future reserved word
2335
2336(W) This warning may be due to running a perl5 script through a perl4
2337interpreter, especially if the word that is being warned about is
2338"use" or "my".
2339
49704364 2340=item % may not be used in pack
6df41af2
GS
2341
2342(F) You can't pack a string by supplying a checksum, because the
be771a83
GS
2343checksumming process loses information, and you can't go the other way.
2344See L<perlfunc/unpack>.
6df41af2 2345
a0d0e21e
LW
2346=item Method for operation %s not found in package %s during blessing
2347
2348(F) An attempt was made to specify an entry in an overloading table that
e7ea3e70 2349doesn't resolve to a valid subroutine. See L<overload>.
a0d0e21e 2350
3cdd684c
TP
2351=item Method %s not permitted
2352
2353See Server error.
2354
a0d0e21e
LW
2355=item Might be a runaway multi-line %s string starting on line %d
2356
2357(S) An advisory indicating that the previous error may have been caused
2358by a missing delimiter on a string or pattern, because it eventually
2359ended earlier on the current line.
2360
2361=item Misplaced _ in number
2362
d4ced10d
JH
2363(W syntax) An underscore (underbar) in a numeric constant did not
2364separate two digits.
a0d0e21e 2365
9e81e6a1
RGS
2366=item Missing argument to -%c
2367
2368(F) The argument to the indicated command line switch must follow
2369immediately after the switch, without intervening spaces.
2370
4a2d328f 2371=item Missing %sbrace%s on \N{}
423cee85 2372
4a2d328f 2373(F) Wrong syntax of character name literal C<\N{charname}> within
423cee85
JH
2374double-quotish context.
2375
a0d0e21e
LW
2376=item Missing comma after first argument to %s function
2377
2378(F) While certain functions allow you to specify a filehandle or an
2379"indirect object" before the argument list, this ain't one of them.
2380
06eaf0bc
GS
2381=item Missing command in piped open
2382
be771a83
GS
2383(W pipe) You used the C<open(FH, "| command")> or
2384C<open(FH, "command |")> construction, but the command was missing or
2385blank.
06eaf0bc 2386
961ce445
RGS
2387=item Missing control char name in \c
2388
2389(F) A double-quoted string ended with "\c", without the required control
2390character name.
2391
6df41af2
GS
2392=item Missing name in "my sub"
2393
be771a83
GS
2394(F) The reserved syntax for lexically scoped subroutines requires that
2395they have a name with which they can be found.
6df41af2
GS
2396
2397=item Missing $ on loop variable
2398
be771a83
GS
2399(F) Apparently you've been programming in B<csh> too much. Variables
2400are always mentioned with the $ in Perl, unlike in the shells, where it
2401can vary from one line to the next.
6df41af2 2402
cc507455 2403=item (Missing operator before %s?)
748a9306 2404
56da5a46
RGS
2405(S syntax) This is an educated guess made in conjunction with the message
2406"%s found where operator expected". Often the missing operator is a comma.
748a9306 2407
ab13f0c7
JH
2408=item Missing right brace on %s
2409
2410(F) Missing right brace in C<\p{...}> or C<\P{...}>.
2411
d98d5fff 2412=item Missing right curly or square bracket
a0d0e21e 2413
be771a83
GS
2414(F) The lexer counted more opening curly or square brackets than closing
2415ones. As a general rule, you'll find it's missing near the place you
2416were last editing.
a0d0e21e 2417
6df41af2
GS
2418=item (Missing semicolon on previous line?)
2419
56da5a46
RGS
2420(S syntax) This is an educated guess made in conjunction with the message
2421"%s found where operator expected". Don't automatically put a semicolon on
6df41af2
GS
2422the previous line just because you saw this message.
2423
a0d0e21e
LW
2424=item Modification of a read-only value attempted
2425
2426(F) You tried, directly or indirectly, to change the value of a
5f05dabc 2427constant. You didn't, of course, try "2 = 1", because the compiler
a0d0e21e
LW
2428catches that. But an easy way to do the same thing is:
2429
2430 sub mod { $_[0] = 1 }
2431 mod(2);
2432
2433Another way is to assign to a substr() that's off the end of the string.
2434
c5674021
PDF
2435Yet another way is to assign to a C<foreach> loop I<VAR> when I<VAR>
2436is aliased to a constant in the look I<LIST>:
2437
2438 $x = 1;
2439 foreach my $n ($x, 2) {
2440 $n *= 2; # modifies the $x, but fails on attempt to modify the 2
64977eb6 2441 }
c5674021 2442
7a4340ed 2443=item Modification of non-creatable array value attempted, %s
a0d0e21e
LW
2444
2445(F) You tried to make an array value spring into existence, and the
2446subscript was probably negative, even counting from end of the array
2447backwards.
2448
7a4340ed 2449=item Modification of non-creatable hash value attempted, %s
a0d0e21e 2450
be771a83
GS
2451(P) You tried to make a hash value spring into existence, and it
2452couldn't be created for some peculiar reason.
a0d0e21e
LW
2453
2454=item Module name must be constant
2455
2456(F) Only a bare module name is allowed as the first argument to a "use".
2457
be98fb35 2458=item Module name required with -%c option
6df41af2 2459
be98fb35
GS
2460(F) The C<-M> or C<-m> options say that Perl should load some module, but
2461you omitted the name of the module. Consult L<perlrun> for full details
2462about C<-M> and C<-m>.
6df41af2 2463
ed9aa3b7
SG
2464=item More than one argument to open
2465
2466(F) The C<open> function has been asked to open multiple files. This
2467can happen if you are trying to open a pipe to a command that takes a
2468list of arguments, but have forgotten to specify a piped open mode.
2469See L<perlfunc/open> for details.
2470
a0d0e21e
LW
2471=item msg%s not implemented
2472
2473(F) You don't have System V message IPC on your system.
2474
2475=item Multidimensional syntax %s not supported
2476
75b44862
GS
2477(W syntax) Multidimensional arrays aren't written like C<$foo[1,2,3]>.
2478They're written like C<$foo[1][2][3]>, as in C.
8b1a09fc 2479
49704364 2480=item '/' must follow a numeric type in unpack
6df41af2 2481
49704364
WL
2482(F) You had an unpack template that contained a '/', but this did not
2483follow some unpack specification producing a numeric value.
2484See L<perlfunc/pack>.
6df41af2
GS
2485
2486=item "my sub" not yet implemented
2487
be771a83
GS
2488(F) Lexically scoped subroutines are not yet implemented. Don't try
2489that yet.
6df41af2 2490
30c282f6 2491=item "%s" variable %s can't be in a package
6df41af2 2492
be771a83
GS
2493(F) Lexically scoped variables aren't in a package, so it doesn't make
2494sense to try to declare one with a package qualifier on the front. Use
2495local() if you want to localize a package variable.
09bef843 2496
8b1a09fc 2497=item Name "%s::%s" used only once: possible typo
2498
e476b1b5 2499(W once) Typographical errors often show up as unique variable names.
be771a83
GS
2500If you had a good reason for having a unique name, then just mention it
2501again somehow to suppress the message. The C<our> declaration is
77ca0c92 2502provided for this purpose.
a0d0e21e 2503
64b374f4
FD
2504NOTE: This warning detects symbols that have been used only once so $c, @c,
2505%c, *c, &c, sub c{}, c(), and c (the filehandle or format) are considered
2506the same; if a program uses $c only once but also uses any of the others it
2507will not trigger this warning.
2508
49704364
WL
2509=item Negative '/' count in unpack
2510
2511(F) The length count obtained from a length/code unpack operation was
2512negative. See L<perlfunc/pack>.
2513
a0d0e21e
LW
2514=item Negative length
2515
be771a83
GS
2516(F) You tried to do a read/write/send/recv operation with a buffer
2517length that is less than 0. This is difficult to imagine.
a0d0e21e 2518
ed9aa3b7
SG
2519=item Negative offset to vec in lvalue context
2520
2521(F) When C<vec> is called in an lvalue context, the second argument must be
2522greater than or equal to zero.
2523
7253e4e3 2524=item Nested quantifiers in regex; marked by <-- HERE in m/%s/
a0d0e21e 2525
b45f050a 2526(F) You can't quantify a quantifier without intervening parentheses. So
7253e4e3 2527things like ** or +* or ?* are illegal. The <-- HERE shows in the regular
b45f050a 2528expression about where the problem was discovered.
a0d0e21e 2529
7253e4e3 2530Note that the minimal matching quantifiers, C<*?>, C<+?>, and
be771a83 2531C<??> appear to be nested quantifiers, but aren't. See L<perlre>.
a0d0e21e 2532
6df41af2 2533=item %s never introduced
a0d0e21e 2534
be771a83
GS
2535(S internal) The symbol in question was declared but somehow went out of
2536scope before it could possibly have been used.
a0d0e21e 2537
2c7d6b9c
RGS
2538=item next::method/next::can/maybe::next::method cannot find enclosing method
2539
2540(F) C<next::method> needs to be called within the context of a
2541real method in a real package, and it could not find such a context.
2542See L<mro>.
2543
a0d0e21e
LW
2544=item No %s allowed while running setuid
2545
be771a83
GS
2546(F) Certain operations are deemed to be too insecure for a setuid or
2547setgid script to even be allowed to attempt. Generally speaking there
2548will be another way to do what you want that is, if not secure, at least
2549securable. See L<perlsec>.
a0d0e21e 2550
a0d0e21e
LW
2551=item No comma allowed after %s
2552
2553(F) A list operator that has a filehandle or "indirect object" is not
2554allowed to have a comma between that and the following arguments.
2555Otherwise it'd be just another one of the arguments.
2556
0a753a76 2557One possible cause for this is that you expected to have imported a
2558constant to your name space with B<use> or B<import> while no such
2559importing took place, it may for example be that your operating system
2560does not support that particular constant. Hopefully you did use an
2561explicit import list for the constants you expect to see, please see
2562L<perlfunc/use> and L<perlfunc/import>. While an explicit import list
2563would probably have caught this error earlier it naturally does not
2564remedy the fact that your operating system still does not support that
2565constant. Maybe you have a typo in the constants of the symbol import
2566list of B<use> or B<import> or in the constant name at the line where
2567this error was triggered?
2568
748a9306
LW
2569=item No command into which to pipe on command line
2570
be771a83
GS
2571(F) An error peculiar to VMS. Perl handles its own command line
2572redirection, and found a '|' at the end of the command line, so it
2573doesn't know where you want to pipe the output from this command.
748a9306 2574
a0d0e21e
LW
2575=item No DB::DB routine defined
2576
be771a83 2577(F) The currently executing code was compiled with the B<-d> switch, but
ccafdc96
RGS
2578for some reason the current debugger (e.g. F<perl5db.pl> or a C<Devel::>
2579module) didn't define a routine to be called at the beginning of each
2580statement.
a0d0e21e
LW
2581
2582=item No dbm on this machine
2583
2584(P) This is counted as an internal error, because every machine should
5f05dabc 2585supply dbm nowadays, because Perl comes with SDBM. See L<SDBM_File>.
a0d0e21e 2586
ccafdc96 2587=item No DB::sub routine defined
a0d0e21e 2588
ccafdc96
RGS
2589(F) The currently executing code was compiled with the B<-d> switch, but
2590for some reason the current debugger (e.g. F<perl5db.pl> or a C<Devel::>
2591module) didn't define a C<DB::sub> routine to be called at the beginning
2592of each ordinary subroutine call.
a0d0e21e 2593
96ebfdd7
RK
2594=item No B<-e> allowed in setuid scripts
2595
2596(F) A setuid script can't be specified by the user.
2597
c47ff5f1 2598=item No error file after 2> or 2>> on command line
748a9306 2599
be771a83
GS
2600(F) An error peculiar to VMS. Perl handles its own command line
2601redirection, and found a '2>' or a '2>>' on the command line, but can't
2602find the name of the file to which to write data destined for stderr.
748a9306 2603
49704364
WL
2604=item No group ending character '%c' found in template
2605
2606(F) A pack or unpack template has an opening '(' or '[' without its
2607matching counterpart. See L<perlfunc/pack>.
2608
c47ff5f1 2609=item No input file after < on command line
748a9306 2610
be771a83
GS
2611(F) An error peculiar to VMS. Perl handles its own command line
2612redirection, and found a '<' on the command line, but can't find the
2613name of the file from which to read data for stdin.
748a9306 2614
6df41af2
GS
2615=item No #! line
2616
2617(F) The setuid emulator requires that scripts have a well-formed #! line
2618even on machines that don't support the #! construct.
2619
2c7d6b9c
RGS
2620=item No next::method '%s' found for %s
2621
2622(F) C<next::method> found no further instances of this method name
2623in the remaining packages of the MRO of this class. If you don't want
2624it throwing an exception, use C<maybe::next::method>
2625or C<next::can>. See L<mro>.
2626
6df41af2
GS
2627=item "no" not allowed in expression
2628
be771a83
GS
2629(F) The "no" keyword is recognized and executed at compile time, and
2630returns no useful value. See L<perlmod>.
6df41af2 2631
c47ff5f1 2632=item No output file after > on command line
748a9306 2633
be771a83
GS
2634(F) An error peculiar to VMS. Perl handles its own command line
2635redirection, and found a lone '>' at the end of the command line, so it
2636doesn't know where you wanted to redirect stdout.
748a9306 2637
c47ff5f1 2638=item No output file after > or >> on command line
748a9306 2639
be771a83
GS
2640(F) An error peculiar to VMS. Perl handles its own command line
2641redirection, and found a '>' or a '>>' on the command line, but can't
2642find the name of the file to which to write data destined for stdout.
748a9306 2643
1ec3e8de
GS
2644=item No package name allowed for variable %s in "our"
2645
be771a83
GS
2646(F) Fully qualified variable names are not allowed in "our"
2647declarations, because that doesn't make much sense under existing
2648semantics. Such syntax is reserved for future extensions.
1ec3e8de 2649
a0d0e21e
LW
2650=item No Perl script found in input
2651
2652(F) You called C<perl -x>, but no line was found in the file beginning
2653with #! and containing the word "perl".
2654
2655=item No setregid available
2656
2657(F) Configure didn't find anything resembling the setregid() call for
2658your system.
2659
2660=item No setreuid available
2661
2662(F) Configure didn't find anything resembling the setreuid() call for
2663your system.
2664
6df41af2
GS
2665=item No %s specified for -%c
2666
2667(F) The indicated command line switch needs a mandatory argument, but
2668you haven't specified one.
2669
e75d1f10
RD
2670=item No such class field "%s" in variable %s of type %s
2671
2672(F) You tried to access a key from a hash through the indicated typed variable
2673but that key is not allowed by the package of the same type. The indicated
2674package has restricted the set of allowed keys using the L<fields> pragma.
2675
2c692339
RGS
2676=item No such class %s
2677
30c282f6 2678(F) You provided a class qualifier in a "my", "our" or "state" declaration, but
2c692339
RGS
2679this class doesn't exist at this point in your program.
2680
3c20a832
SP
2681=item No such hook: %s
2682
2683(F) You specified a signal hook that was not recognized by Perl. Currently, Perl
2684accepts C<__DIE__> and C<__WARN__> as valid signal hooks
2685
6df41af2
GS
2686=item No such pipe open
2687
2688(P) An error peculiar to VMS. The internal routine my_pclose() tried to
be771a83
GS
2689close a pipe which hadn't been opened. This should have been caught
2690earlier as an attempt to close an unopened filehandle.
6df41af2 2691
a0d0e21e
LW
2692=item No such signal: SIG%s
2693
be771a83
GS
2694(W signal) You specified a signal name as a subscript to %SIG that was
2695not recognized. Say C<kill -l> in your shell to see the valid signal
2696names on your system.
a0d0e21e
LW
2697
2698=item Not a CODE reference
2699
2700(F) Perl was trying to evaluate a reference to a code value (that is, a
2701subroutine), but found a reference to something else instead. You can
be771a83
GS
2702use the ref() function to find out what kind of ref it really was. See
2703also L<perlref>.
a0d0e21e
LW
2704
2705=item Not a format reference
2706
2707(F) I'm not sure how you managed to generate a reference to an anonymous
2708format, but this indicates you did, and that it didn't exist.
2709
2710=item Not a GLOB reference
2711
be771a83
GS
2712(F) Perl was trying to evaluate a reference to a "typeglob" (that is, a
2713symbol table entry that looks like C<*foo>), but found a reference to
2714something else instead. You can use the ref() function to find out what
2715kind of ref it really was. See L<perlref>.
a0d0e21e
LW
2716
2717=item Not a HASH reference
2718
be771a83
GS
2719(F) Perl was trying to evaluate a reference to a hash value, but found a
2720reference to something else instead. You can use the ref() function to
2721find out what kind of ref it really was. See L<perlref>.
a0d0e21e 2722
6df41af2
GS
2723=item Not an ARRAY reference
2724
be771a83
GS
2725(F) Perl was trying to evaluate a reference to an array value, but found
2726a reference to something else instead. You can use the ref() function
2727to find out what kind of ref it really was. See L<perlref>.
6df41af2 2728
a0d0e21e
LW
2729=item Not a perl script
2730
2731(F) The setuid emulator requires that scripts have a well-formed #! line
2732even on machines that don't support the #! construct. The line must
2733mention perl.
2734
2735=item Not a SCALAR reference
2736
be771a83
GS
2737(F) Perl was trying to evaluate a reference to a scalar value, but found
2738a reference to something else instead. You can use the ref() function
2739to find out what kind of ref it really was. See L<perlref>.
a0d0e21e
LW
2740
2741=item Not a subroutine reference
2742
2743(F) Perl was trying to evaluate a reference to a code value (that is, a
2744subroutine), but found a reference to something else instead. You can
be771a83
GS
2745use the ref() function to find out what kind of ref it really was. See
2746also L<perlref>.
a0d0e21e 2747
e7ea3e70 2748=item Not a subroutine reference in overload table
a0d0e21e
LW
2749
2750(F) An attempt was made to specify an entry in an overloading table that
8b1a09fc 2751doesn't somehow point to a valid subroutine. See L<overload>.
a0d0e21e 2752
a0d0e21e
LW
2753=item Not enough arguments for %s
2754
2755(F) The function requires more arguments than you specified.
2756
6df41af2
GS
2757=item Not enough format arguments
2758
be771a83
GS
2759(W syntax) A format specified more picture fields than the next line
2760supplied. See L<perlform>.
6df41af2
GS
2761
2762=item %s: not found
2763
be771a83
GS
2764(A) You've accidentally run your script through the Bourne shell instead
2765of Perl. Check the #! line, or manually feed your script into Perl
2766yourself.
6df41af2
GS
2767
2768=item no UTC offset information; assuming local time is UTC
a0d0e21e 2769
6df41af2
GS
2770(S) A warning peculiar to VMS. Perl was unable to find the local
2771timezone offset, so it's assuming that local system time is equivalent
be771a83
GS
2772to UTC. If it's not, define the logical name
2773F<SYS$TIMEZONE_DIFFERENTIAL> to translate to the number of seconds which
2774need to be added to UTC to get local time.
a0d0e21e 2775
4ef2275c
GA
2776=item Non-string passed as bitmask
2777
2778(W misc) A number has been passed as a bitmask argument to select().
2779Use the vec() function to construct the file descriptor bitmasks for
2780select. See L<perlfunc/select>
2781
a0d0e21e
LW
2782=item Null filename used
2783
be771a83
GS
2784(F) You can't require the null filename, especially because on many
2785machines that means the current directory! See L<perlfunc/require>.
a0d0e21e 2786
6df41af2
GS
2787=item NULL OP IN RUN
2788
be771a83
GS
2789(P debugging) Some internal routine called run() with a null opcode
2790pointer.
6df41af2 2791
55497cff 2792=item Null picture in formline
2793
2794(F) The first argument to formline must be a valid format picture
2795specification. It was found to be empty, which probably means you
2796supplied it an uninitialized value. See L<perlform>.
2797
a0d0e21e
LW
2798=item Null realloc
2799
2800(P) An attempt was made to realloc NULL.
2801
2802=item NULL regexp argument
2803
5f05dabc 2804(P) The internal pattern matching routines blew it big time.
a0d0e21e
LW
2805
2806=item NULL regexp parameter
2807
2808(P) The internal pattern matching routines are out of their gourd.
2809
fc36a67e 2810=item Number too long
2811
be771a83 2812(F) Perl limits the representation of decimal numbers in programs to
da75cd15 2813about 250 characters. You've exceeded that length. Future
be771a83
GS
2814versions of Perl are likely to eliminate this arbitrary limitation. In
2815the meantime, try using scientific notation (e.g. "1e6" instead of
2816"1_000_000").
fc36a67e 2817
6df41af2
GS
2818=item Octal number in vector unsupported
2819
be771a83
GS
2820(F) Numbers with a leading C<0> are not currently allowed in vectors.
2821The octal number interpretation of such numbers may be supported in a
2822future version.
6df41af2 2823
252aa082
JH
2824=item Octal number > 037777777777 non-portable
2825
75b44862 2826(W portable) The octal number you specified is larger than 2**32-1
be771a83
GS
2827(4294967295) and therefore non-portable between systems. See
2828L<perlport> for more on portability concerns.
252aa082
JH
2829
2830See also L<perlport> for writing portable code.
2831
6ad11d81
JH
2832=item Odd number of arguments for overload::constant
2833
04a80ee0
RGS
2834(W overload) The call to overload::constant contained an odd number of
2835arguments. The arguments should come in pairs.
6ad11d81 2836
b21befc1
MG
2837=item Odd number of elements in anonymous hash
2838
2839(W misc) You specified an odd number of elements to initialize a hash,
2840which is odd, because hashes come in key/value pairs.
2841
1930e939 2842=item Odd number of elements in hash assignment
a0d0e21e 2843
be771a83
GS
2844(W misc) You specified an odd number of elements to initialize a hash,
2845which is odd, because hashes come in key/value pairs.
a0d0e21e 2846
bbce6d69 2847=item Offset outside string
2848
42bc49da
JH
2849(F, W layer) You tried to do a read/write/send/recv/seek operation
2850with an offset pointing outside the buffer. This is difficult to
f5a7294f
JH
2851imagine. The sole exceptions to this are that zero padding will
2852take place when going past the end of the string when either
2853C<sysread()>ing a file, or when seeking past the end of a scalar opened
1a7a2554
MB
2854for I/O (in anticipation of future reads and to imitate the behaviour
2855with real files).
bbce6d69 2856
c289d2f7 2857=item %s() on unopened %s
2dd78f96
JH
2858
2859(W unopened) An I/O operation was attempted on a filehandle that was
2860never initialized. You need to do an open(), a sysopen(), or a socket()
2861call, or call a constructor from the FileHandle package.
2862
96ebfdd7
RK
2863=item -%s on unopened filehandle %s
2864
2865(W unopened) You tried to invoke a file test operator on a filehandle
2866that isn't open. Check your control flow. See also L<perlfunc/-X>.
2867
a0d0e21e
LW
2868=item oops: oopsAV
2869
e476b1b5 2870(S internal) An internal warning that the grammar is screwed up.
a0d0e21e
LW
2871
2872=item oops: oopsHV
2873
e476b1b5 2874(S internal) An internal warning that the grammar is screwed up.
a0d0e21e 2875
abc718f2
RGS
2876=item Opening dirhandle %s also as a file
2877
2878(W io deprecated) You used open() to associate a filehandle to
2879a symbol (glob or scalar) that already holds a dirhandle.
2880Although legal, this idiom might render your code confusing
2881and is deprecated.
2882
2883=item Opening filehandle %s also as a directory
2884
2885(W io deprecated) You used opendir() to associate a dirhandle to
2886a symbol (glob or scalar) that already holds a filehandle.
2887Although legal, this idiom might render your code confusing
2888and is deprecated.
2889
a0288114 2890=item Operation "%s": no method found, %s
44a8e56a 2891
be771a83
GS
2892(F) An attempt was made to perform an overloaded operation for which no
2893handler was defined. While some handlers can be autogenerated in terms
2894of other handlers, there is no default handler for any operation, unless
2895C<fallback> overloading key is specified to be true. See L<overload>.
44a8e56a 2896
748a9306
LW
2897=item Operator or semicolon missing before %s
2898
be771a83
GS
2899(S ambiguous) You used a variable or subroutine call where the parser
2900was expecting an operator. The parser has assumed you really meant to
2901use an operator, but this is highly likely to be incorrect. For
2902example, if you say "*foo *foo" it will be interpreted as if you said
2903"*foo * 'foo'".
748a9306 2904
6df41af2
GS
2905=item "our" variable %s redeclared
2906
be771a83
GS
2907(W misc) You seem to have already declared the same global once before
2908in the current lexical scope.
6df41af2 2909
a80b8354
GS
2910=item Out of memory!
2911
2912(X) The malloc() function returned 0, indicating there was insufficient
be771a83
GS
2913remaining memory (or virtual memory) to satisfy the request. Perl has
2914no option but to exit immediately.
a80b8354 2915
19a52907
JH
2916At least in Unix you may be able to get past this by increasing your
2917process datasize limits: in csh/tcsh use C<limit> and
2918C<limit datasize n> (where C<n> is the number of kilobytes) to check
2919the current limits and change them, and in ksh/bash/zsh use C<ulimit -a>
2920and C<ulimit -d n>, respectively.
2921
6d3b25aa
RGS
2922=item Out of memory during %s extend
2923
2924(X) An attempt was made to extend an array, a list, or a string beyond
2925the largest possible memory allocation.
2926
6df41af2 2927=item Out of memory during "large" request for %s
a0d0e21e 2928
6df41af2
GS
2929(F) The malloc() function returned 0, indicating there was insufficient
2930remaining memory (or virtual memory) to satisfy the request. However,
be771a83
GS
2931the request was judged large enough (compile-time default is 64K), so a
2932possibility to shut down by trapping this error is granted.
a0d0e21e 2933
1b979e0a 2934=item Out of memory during request for %s
a0d0e21e 2935
be771a83
GS
2936(X|F) The malloc() function returned 0, indicating there was
2937insufficient remaining memory (or virtual memory) to satisfy the
2938request.
eff9c6e2
CS
2939
2940The request was judged to be small, so the possibility to trap it
2941depends on the way perl was compiled. By default it is not trappable.
be771a83
GS
2942However, if compiled for this, Perl may use the contents of C<$^M> as an
2943emergency pool after die()ing with this message. In this case the error
b022d2d2
IZ
2944is trappable I<once>, and the error message will include the line and file
2945where the failed request happened.
55497cff 2946
1b979e0a
IZ
2947=item Out of memory during ridiculously large request
2948
2949(F) You can't allocate more than 2^31+"small amount" bytes. This error
be771a83
GS
2950is most likely to be caused by a typo in the Perl program. e.g.,
2951C<$arr[time]> instead of C<$arr[$time]>.
1b979e0a 2952
6df41af2
GS
2953=item Out of memory for yacc stack
2954
be771a83
GS
2955(F) The yacc parser wanted to grow its stack so it could continue
2956parsing, but realloc() wouldn't give it more memory, virtual or
2957otherwise.
6df41af2 2958
28be1210
TH
2959=item '.' outside of string in pack
2960
2961(F) The argument to a '.' in your template tried to move the working
2962position to before the start of the packed string being built.
2963
49704364 2964=item '@' outside of string in unpack
6df41af2 2965
49704364 2966(F) You had a template that specified an absolute position outside
6df41af2
GS
2967the string being unpacked. See L<perlfunc/pack>.
2968
f337b084
TH
2969=item '@' outside of string with malformed UTF-8 in unpack
2970
2971(F) You had a template that specified an absolute position outside
2972the string being unpacked. The string being unpacked was also invalid
2973UTF-8. See L<perlfunc/pack>.
2974
6df41af2
GS
2975=item %s package attribute may clash with future reserved word: %s
2976
be771a83
GS
2977(W reserved) A lowercase attribute name was used that had a
2978package-specific handler. That name might have a meaning to Perl itself
2979some day, even though it doesn't yet. Perhaps you should use a
2980mixed-case attribute name, instead. See L<attributes>.
6df41af2 2981
96ebfdd7
RK
2982=item pack/unpack repeat count overflow
2983
2984(F) You can't specify a repeat count so large that it overflows your
2985signed integers. See L<perlfunc/pack>.
2986
a0d0e21e
LW
2987=item page overflow
2988
be771a83
GS
2989(W io) A single call to write() produced more lines than can fit on a
2990page. See L<perlform>.
a0d0e21e 2991
6df41af2
GS
2992=item panic: %s
2993
2994(P) An internal error.
2995
c99a1475
NC
2996=item panic: attempt to call %s in %s
2997
2998(P) One of the file test operators entered a code branch that calls
2999an ACL related-function, but that function is not available on this
3000platform. Earlier checks mean that it should not be possible to
3001enter this branch on this platform.
3002
a0d0e21e
LW
3003=item panic: ck_grep
3004
3005(P) Failed an internal consistency check trying to compile a grep.
3006
3007=item panic: ck_split
3008
3009(P) Failed an internal consistency check trying to compile a split.
3010
3011=item panic: corrupt saved stack index
3012
be771a83
GS
3013(P) The savestack was requested to restore more localized values than
3014there are in the savestack.
a0d0e21e 3015
810b8aa5
GS
3016=item panic: del_backref
3017
3018(P) Failed an internal consistency check while trying to reset a weak
3019reference.
3020
7619c85e
RG
3021=item panic: Devel::DProf inconsistent subroutine return
3022
3023(P) Devel::DProf called a subroutine that exited using goto(LABEL),
3024last(LABEL) or next(LABEL). Leaving that way a subroutine called from
3025an XSUB will lead very probably to a crash of the interpreter. This is
3026a bug that will hopefully one day get fixed.
3027
a0d0e21e
LW
3028=item panic: die %s
3029
3030(P) We popped the context stack to an eval context, and then discovered
3031it wasn't an eval context.
3032
a0d0e21e
LW
3033=item panic: do_subst
3034
be771a83
GS
3035(P) The internal pp_subst() routine was called with invalid operational
3036data.
a0d0e21e 3037
2269b42e 3038=item panic: do_trans_%s
a0d0e21e 3039
2269b42e 3040(P) The internal do_trans routines were called with invalid operational
be771a83 3041data.
a0d0e21e 3042
b7f7fd0b
NC
3043=item panic: fold_constants JMPENV_PUSH returned %d
3044
10203f38 3045(P) While attempting folding constants an exception other than an C<eval>
b7f7fd0b
NC
3046failure was caught.
3047
c635e13b 3048=item panic: frexp
3049
3050(P) The library function frexp() failed, making printf("%f") impossible.
3051
a0d0e21e
LW
3052=item panic: goto
3053
3054(P) We popped the context stack to a context with the specified label,
3055and then discovered it wasn't a context we know how to do a goto in.
3056
23976bdd
NC
3057=item panic: hfreeentries failed to free hash
3058
3059(P) The internal routine used to clear a hashes entries tried repeatedly,
3060but each time something added more entries to the hash. Most likely the hash
3061contains an object with a reference back to the hash and a destructor that
3062adds a new object to the hash.
3063
a0d0e21e
LW
3064=item panic: INTERPCASEMOD
3065
3066(P) The lexer got into a bad state at a case modifier.
3067
3068=item panic: INTERPCONCAT
3069
3070(P) The lexer got into a bad state parsing a string with brackets.
3071
e446cec8
IZ
3072=item panic: kid popen errno read
3073
3074(F) forked child returned an incomprehensible message about its errno.
3075
a0d0e21e
LW
3076=item panic: last
3077
3078(P) We popped the context stack to a block context, and then discovered
3079it wasn't a block context.
3080
3081=item panic: leave_scope clearsv
3082
be771a83
GS
3083(P) A writable lexical variable became read-only somehow within the
3084scope.
a0d0e21e
LW
3085
3086=item panic: leave_scope inconsistency
3087
3088(P) The savestack probably got out of sync. At least, there was an
3089invalid enum on the top of it.
3090
810b8aa5
GS
3091=item panic: magic_killbackrefs
3092
3093(P) Failed an internal consistency check while trying to reset all weak
3094references to an object.
3095
6df41af2
GS
3096=item panic: malloc
3097
3098(P) Something requested a negative number of bytes of malloc.
3099
27d5b266
JH
3100=item panic: memory wrap
3101
3102(P) Something tried to allocate more memory than possible.
3103
a0d0e21e
LW
3104=item panic: pad_alloc
3105
3106(P) The compiler got confused about which scratch pad it was allocating
3107and freeing temporaries and lexicals from.
3108
3109=item panic: pad_free curpad
3110
3111(P) The compiler got confused about which scratch pad it was allocating
3112and freeing temporaries and lexicals from.
3113
3114=item panic: pad_free po
3115
3116(P) An invalid scratch pad offset was detected internally.
3117
3118=item panic: pad_reset curpad
3119
3120(P) The compiler got confused about which scratch pad it was allocating
3121and freeing temporaries and lexicals from.
3122
3123=item panic: pad_sv po
3124
3125(P) An invalid scratch pad offset was detected internally.
3126
3127=item panic: pad_swipe curpad
3128
3129(P) The compiler got confused about which scratch pad it was allocating
3130and freeing temporaries and lexicals from.
3131
3132=item panic: pad_swipe po
3133
3134(P) An invalid scratch pad offset was detected internally.
3135
3136=item panic: pp_iter
3137
3138(P) The foreach iterator got called in a non-loop context frame.
3139
96ebfdd7
RK
3140=item panic: pp_match%s
3141
3142(P) The internal pp_match() routine was called with invalid operational
3143data.
3144
2269b42e
JH
3145=item panic: pp_split
3146
3147(P) Something terrible went wrong in setting up for the split.
3148
a0d0e21e
LW
3149=item panic: realloc
3150
3151(P) Something requested a negative number of bytes of realloc.
3152
3153=item panic: restartop
3154
3155(P) Some internal routine requested a goto (or something like it), and
3156didn't supply the destination.
3157
3158=item panic: return
3159
3160(P) We popped the context stack to a subroutine or eval context, and
3161then discovered it wasn't a subroutine or eval context.
3162
3163=item panic: scan_num
3164
3165(P) scan_num() got called on something that wasn't a number.
3166
6c65d5f9
NC
3167=item panic: sv_chop %s
3168
3169(P) The sv_chop() routine was passed a position that is not within the
3170scalar's string buffer.
3171
a0d0e21e
LW
3172=item panic: sv_insert
3173
3174(P) The sv_insert() routine was told to remove more string than there
3175was string.
3176
3177=item panic: top_env
3178
6224f72b 3179(P) The compiler attempted to do a goto, or something weird like that.
a0d0e21e 3180
65bca31a
NC
3181=item panic: unimplemented op %s (#%d) called
3182
3183(P) The compiler is screwed up and attempted to use an op that isn't permitted
3184at run time.
3185
dea0fc0b
JH
3186=item panic: utf16_to_utf8: odd bytelen
3187
3188(P) Something tried to call utf16_to_utf8 with an odd (as opposed
64977eb6 3189to even) byte length.
dea0fc0b 3190
2f7da168
RK
3191=item panic: yylex
3192
3193(P) The lexer got into a bad state while processing a case modifier.
3194
1a147d38
YO
3195=item Pattern subroutine nesting without pos change exceeded limit in regex; marked by <-- HERE in m/%s/
3196
3197(F) You used a pattern that uses too many nested subpattern calls without
3198consuming any text. Restructure the pattern so text is consumed before the
3199nesting limit is exceeded.
3200
3201The <-- HERE shows in the regular expression about where the problem was
3202discovered.
3203
7b8d334a 3204=item Parentheses missing around "%s" list
a0d0e21e 3205
e476b1b5 3206(W parenthesis) You said something like
a0d0e21e
LW
3207
3208 my $foo, $bar = @_;
3209
3210when you meant
3211
3212 my ($foo, $bar) = @_;
3213
30c282f6 3214Remember that "my", "our", "local" and "state" bind tighter than comma.
a0d0e21e 3215
96ebfdd7
RK
3216=item C<-p> destination: %s
3217
3218(F) An error occurred during the implicit output invoked by the C<-p>
3219command-line switch. (This output goes to STDOUT unless you've
3220redirected it with select().)
3221
3222=item (perhaps you forgot to load "%s"?)
3223
3224(F) This is an educated guess made in conjunction with the message
3225"Can't locate object method \"%s\" via package \"%s\"". It often means
3226that a method requires a package that has not been loaded.
3227
1109a392
MHM
3228=item Perl_my_%s() not available
3229
3230(F) Your platform has very uncommon byte-order and integer size,
3231so it was not possible to set up some or all fixed-width byte-order
3232conversion functions. This is only a problem when you're using the
3233'<' or '>' modifiers in (un)pack templates. See L<perlfunc/pack>.
3234
6d3b25aa
RGS
3235=item Perl %s required--this is only version %s, stopped
3236
3237(F) The module in question uses features of a version of Perl more
3238recent than the currently running version. How long has it been since
3239you upgraded, anyway? See L<perlfunc/require>.
3240
6df41af2
GS
3241=item PERL_SH_DIR too long
3242
3243(F) An error peculiar to OS/2. PERL_SH_DIR is the directory to find the
fecfaeb8 3244C<sh>-shell in. See "PERL_SH_DIR" in L<perlos2>.
6df41af2 3245
96ebfdd7
RK
3246=item PERL_SIGNALS illegal: "%s"
3247
3248See L<perlrun/PERL_SIGNALS> for legal values.
3249
6df41af2
GS
3250=item perl: warning: Setting locale failed.
3251
3252(S) The whole warning message will look something like:
3253
3254 perl: warning: Setting locale failed.
3255 perl: warning: Please check that your locale settings:
3256 LC_ALL = "En_US",
3257 LANG = (unset)
3258 are supported and installed on your system.
3259 perl: warning: Falling back to the standard locale ("C").
3260
3261Exactly what were the failed locale settings varies. In the above the
3262settings were that the LC_ALL was "En_US" and the LANG had no value.
0ea6b70f
JH
3263This error means that Perl detected that you and/or your operating
3264system supplier and/or system administrator have set up the so-called
3265locale system but Perl could not use those settings. This was not
3266dead serious, fortunately: there is a "default locale" called "C" that
3267Perl can and will use, the script will be run. Before you really fix
3268the problem, however, you will get the same error message each time
3269you run Perl. How to really fix the problem can be found in
3270L<perllocale> section B<LOCALE PROBLEMS>.
6df41af2 3271
bd3fa61c 3272=item pid %x not a child
748a9306 3273
be771a83
GS
3274(W exec) A warning peculiar to VMS. Waitpid() was asked to wait for a
3275process which isn't a subprocess of the current process. While this is
3276fine from VMS' perspective, it's probably not what you intended.
748a9306 3277
49704364 3278=item 'P' must have an explicit size in unpack
3bf38418
WL
3279
3280(F) The unpack format P must have an explicit size, not "*".
3281
96ebfdd7
RK
3282=item POSIX class [:%s:] unknown in regex; marked by <-- HERE in m/%s/
3283
3284(F) The class in the character class [: :] syntax is unknown. The <-- HERE
3285shows in the regular expression about where the problem was discovered.
3286Note that the POSIX character classes do B<not> have the C<is> prefix
3287the corresponding C interfaces have: in other words, it's C<[[:print:]]>,
3288not C<isprint>. See L<perlre>.
3289
3290=item POSIX getpgrp can't take an argument
3291
3292(F) Your system has POSIX getpgrp(), which takes no argument, unlike
3293the BSD version, which takes a pid.
3294
49704364 3295=item POSIX syntax [%s] belongs inside character classes in regex; marked by <-- HERE in m/%s/
b45f050a 3296
9a0b3859 3297(W regexp) The character class constructs [: :], [= =], and [. .] go
7253e4e3
RK
3298I<inside> character classes, the [] are part of the construct, for example:
3299/[012[:alpha:]345]/. Note that [= =] and [. .] are not currently
3300implemented; they are simply placeholders for future extensions and will
3301cause fatal errors. The <-- HERE shows in the regular expression about
3302where the problem was discovered. See L<perlre>.
b45f050a 3303
49704364 3304=item POSIX syntax [. .] is reserved for future extensions in regex; marked by <-- HERE in m/%s/
b45f050a
JF
3305
3306(F regexp) Within regular expression character classes ([]) the syntax
7253e4e3
RK
3307beginning with "[." and ending with ".]" is reserved for future extensions.
3308If you need to represent those character sequences inside a regular
3309expression character class, just quote the square brackets with the
3310backslash: "\[." and ".\]". The <-- HERE shows in the regular expression
3311about where the problem was discovered. See L<perlre>.
b45f050a 3312
49704364 3313=item POSIX syntax [= =] is reserved for future extensions in regex; marked by <-- HERE in m/%s/
b45f050a 3314
7253e4e3
RK
3315(F) Within regular expression character classes ([]) the syntax beginning
3316with "[=" and ending with "=]" is reserved for future extensions. If you
3317need to represent those character sequences inside a regular expression
3318character class, just quote the square brackets with the backslash: "\[="
3319and "=\]". The <-- HERE shows in the regular expression about where the
3320problem was discovered. See L<perlre>.
b45f050a 3321
bbce6d69 3322=item Possible attempt to put comments in qw() list
3323
e476b1b5 3324(W qw) qw() lists contain items separated by whitespace; as with literal
75b44862 3325strings, comment characters are not ignored, but are instead treated as
be771a83
GS
3326literal data. (You may have used different delimiters than the
3327parentheses shown here; braces are also frequently used.)
bbce6d69 3328
774d564b 3329You probably wrote something like this:
3330
54310121 3331 @list = qw(
774d564b 3332 a # a comment
bbce6d69 3333 b # another comment
774d564b 3334 );
bbce6d69 3335
3336when you should have written this:
3337
774d564b 3338 @list = qw(
54310121 3339 a
3340 b
774d564b 3341 );
3342
3343If you really want comments, build your list the
3344old-fashioned way, with quotes and commas:
3345
3346 @list = (
3347 'a', # a comment
3348 'b', # another comment
3349 );
bbce6d69 3350
3351=item Possible attempt to separate words with commas
3352
be771a83
GS
3353(W qw) qw() lists contain items separated by whitespace; therefore
3354commas aren't needed to separate the items. (You may have used
3355different delimiters than the parentheses shown here; braces are also
3356frequently used.)
bbce6d69 3357
54310121 3358You probably wrote something like this:
bbce6d69 3359
774d564b 3360 qw! a, b, c !;
3361
3362which puts literal commas into some of the list items. Write it without
3363commas if you don't want them to appear in your data:
bbce6d69 3364
774d564b 3365 qw! a b c !;
bbce6d69 3366
a0d0e21e
LW
3367=item Possible memory corruption: %s overflowed 3rd argument
3368
3369(F) An ioctl() or fcntl() returned more than Perl was bargaining for.
3370Perl guesses a reasonable buffer size, but puts a sentinel byte at the
3371end of the buffer just in case. This sentinel byte got clobbered, and
3372Perl assumes that memory is now corrupted. See L<perlfunc/ioctl>.
3373
276b2a0c
RGS
3374=item Possible precedence problem on bitwise %c operator
3375
3376(W precedence) Your program uses a bitwise logical operator in conjunction
3377with a numeric comparison operator, like this :
3378
3379 if ($x & $y == 0) { ... }
3380
3381This expression is actually equivalent to C<$x & ($y == 0)>, due to the
3382higher precedence of C<==>. This is probably not what you want. (If you
96a925ab
YST
3383really meant to write this, disable the warning, or, better, put the
3384parentheses explicitly and write C<$x & ($y == 0)>).
276b2a0c 3385
18623440
PS
3386=item Possible unintended interpolation of %s in string
3387
3388(W ambiguous) You said something like `@foo' in a double-quoted string
32b0a12e
AMS
3389but there was no array C<@foo> in scope at the time. If you wanted a
3390literal @foo, then write it as \@foo; otherwise find out what happened
3391to the array you apparently lost track of.
18623440 3392
77772344
B
3393=item Possible unintended interpolation of $\ in regex
3394
3395(W ambiguous) You said something like C<m/$\/> in a regex.
3396The regex C<m/foo$\s+bar/m> translates to: match the word 'foo', the output
8ddb446c 3397record separator (see L<perlvar/$\>) and the letter 's' (one time or more)
77772344
B
3398followed by the word 'bar'.
3399
3400If this is what you intended then you can silence the warning by using
3401C<m/${\}/> (for example: C<m/foo${\}s+bar/>).
3402
3403If instead you intended to match the word 'foo' at the end of the line
3404followed by whitespace and the word 'bar' on the next line then you can use
3405C<m/$(?)\/> (for example: C<m/foo$(?)\s+bar/>).
3406
8cd79558
GS
3407=item pragma "attrs" is deprecated, use "sub NAME : ATTRS" instead
3408
a1063b2d 3409(D deprecated) You have written something like this:
8cd79558
GS
3410
3411 sub doit
3412 {
3413 use attrs qw(locked);
3414 }
3415
3416You should use the new declaration syntax instead.
3417
3418 sub doit : locked
3419 {
3420 ...
3421
3422The C<use attrs> pragma is now obsolete, and is only provided for
3423backward-compatibility. See L<perlsub/"Subroutine Attributes">.
3424
a0d0e21e
LW
3425=item Precedence problem: open %s should be open(%s)
3426
e476b1b5 3427(S precedence) The old irregular construct
cb1a09d0 3428
a0d0e21e
LW
3429 open FOO || die;
3430
3431is now misinterpreted as
3432
3433 open(FOO || die);
3434
be771a83
GS
3435because of the strict regularization of Perl 5's grammar into unary and
3436list operators. (The old open was a little of both.) You must put
3437parentheses around the filehandle, or use the new "or" operator instead
3438of "||".
a0d0e21e 3439
3cdd684c
TP
3440=item Premature end of script headers
3441
3442See Server error.
3443
6df41af2
GS
3444=item printf() on closed filehandle %s
3445
be771a83 3446(W closed) The filehandle you're writing to got itself closed sometime
c289d2f7 3447before now. Check your control flow.
6df41af2 3448
9a7dcd9c 3449=item print() on closed filehandle %s
a0d0e21e 3450
be771a83 3451(W closed) The filehandle you're printing on got itself closed sometime
c289d2f7 3452before now. Check your control flow.
a0d0e21e 3453
6df41af2 3454=item Process terminated by SIG%s
a0d0e21e 3455
6df41af2
GS
3456(W) This is a standard message issued by OS/2 applications, while *nix
3457applications die in silence. It is considered a feature of the OS/2
3458port. One can easily disable this by appropriate sighandlers, see
3459L<perlipc/"Signals">. See also "Process terminated by SIGTERM/SIGINT"
fecfaeb8 3460in L<perlos2>.
a0d0e21e 3461
327323c1
RGS
3462=item Prototype after '%c' for %s : %s
3463
3464(W syntax) A character follows % or @ in a prototype. This is useless,
3465since % and @ gobble the rest of the subroutine arguments.
3466
3fe9a6f1 3467=item Prototype mismatch: %s vs %s
4633a7c4 3468
9a0b3859 3469(S prototype) The subroutine being declared or defined had previously been
be771a83 3470declared or defined with a different function prototype.
4633a7c4 3471
ed9aa3b7
SG
3472=item Prototype not terminated
3473
2a6fd447 3474(F) You've omitted the closing parenthesis in a function prototype
ed9aa3b7
SG
3475definition.
3476
96ebfdd7
RK
3477=item Quantifier follows nothing in regex; marked by <-- HERE in m/%s/
3478
3479(F) You started a regular expression with a quantifier. Backslash it if you
3480meant it literally. The <-- HERE shows in the regular expression about
3481where the problem was discovered. See L<perlre>.
3482
49704364 3483=item Quantifier in {,} bigger than %d in regex; marked by <-- HERE in m/%s/
9baa0206 3484
b45f050a 3485(F) There is currently a limit to the size of the min and max values of the
7253e4e3 3486{min,max} construct. The <-- HERE shows in the regular expression about where
b45f050a 3487the problem was discovered. See L<perlre>.
9baa0206 3488
49704364 3489=item Quantifier unexpected on zero-length expression; marked by <-- HERE in m/%s/
9baa0206 3490
b45f050a
JF
3491(W regexp) You applied a regular expression quantifier in a place where
3492it makes no sense, such as on a zero-width assertion. Try putting the
3493quantifier inside the assertion instead. For example, the way to match
3494"abc" provided that it is followed by three repetitions of "xyz" is
3495C</abc(?=(?:xyz){3})/>, not C</abc(?=xyz){3}/>.
9baa0206 3496
7253e4e3
RK
3497The <-- HERE shows in the regular expression about where the problem was
3498discovered.
3499
89ea2908
GA
3500=item Range iterator outside integer range
3501
3502(F) One (or both) of the numeric arguments to the range operator ".."
3503are outside the range which can be represented by integers internally.
be771a83
GS
3504One possible workaround is to force Perl to use magical string increment
3505by prepending "0" to your numbers.
89ea2908 3506
3b7fbd4a
SP
3507=item readdir() attempted on invalid dirhandle %s
3508
1a147d38 3509(W io) The dirhandle you're reading from is either closed or not really
3b7fbd4a
SP
3510a dirhandle. Check your control flow.
3511
96ebfdd7
RK
3512=item readline() on closed filehandle %s
3513
3514(W closed) The filehandle you're reading from got itself closed sometime
3515before now. Check your control flow.
3516
b5fe5ca2
SR
3517=item read() on closed filehandle %s
3518
3519(W closed) You tried to read from a closed filehandle.
3520
3521=item read() on unopened filehandle %s
3522
3523(W unopened) You tried to read from a filehandle that was never opened.
3524
6df41af2
GS
3525=item Reallocation too large: %lx
3526
3527(F) You can't allocate more than 64K on an MS-DOS machine.
3528
4ad56ec9
IZ
3529=item realloc() of freed memory ignored
3530
be771a83
GS
3531(S malloc) An internal routine called realloc() on something that had
3532already been freed.
4ad56ec9 3533
a0d0e21e
LW
3534=item Recompile perl with B<-D>DEBUGGING to use B<-D> switch
3535
be771a83
GS
3536(F debugging) You can't use the B<-D> option unless the code to produce
3537the desired output is compiled into Perl, which entails some overhead,
a0d0e21e
LW
3538which is why it's currently left out of your copy.
3539
3e0ccd42 3540=item Recursive inheritance detected in package '%s'
a0d0e21e 3541
2c7d6b9c
RGS
3542(F) While calculating the method resolution order (MRO) of a package, Perl
3543believes it found an infinite loop in the C<@ISA> hierarchy. This is a
3544crude check that bails out after 100 levels of C<@ISA> depth.
a0d0e21e 3545
7a4340ed 3546=item Recursive inheritance detected while looking for method %s
3e0ccd42 3547
be771a83
GS
3548(F) More than 100 levels of inheritance were encountered while invoking
3549a method. Probably indicates an unintended loop in your inheritance
3550hierarchy.
3e0ccd42 3551
1930e939
TP
3552=item Reference found where even-sized list expected
3553
be771a83
GS
3554(W misc) You gave a single reference where Perl was expecting a list
3555with an even number of elements (for assignment to a hash). This usually
3556means that you used the anon hash constructor when you meant to use
3557parens. In any case, a hash requires key/value B<pairs>.
7b8d334a
GS
3558
3559 %hash = { one => 1, two => 2, }; # WRONG
3560 %hash = [ qw/ an anon array / ]; # WRONG
3561 %hash = ( one => 1, two => 2, ); # right
3562 %hash = qw( one 1 two 2 ); # also fine
3563
810b8aa5
GS
3564=item Reference is already weak
3565
e476b1b5 3566(W misc) You have attempted to weaken a reference that is already weak.
810b8aa5
GS
3567Doing so has no effect.
3568
a0d0e21e
LW
3569=item Reference miscount in sv_replace()
3570
be771a83
GS
3571(W internal) The internal sv_replace() function was handed a new SV with
3572a reference count of other than 1.
a0d0e21e 3573
b72d83b2
RGS
3574=item Reference to invalid group 0
3575
3576(F) You used C<\g0> or similar in a regular expression. You may refer to
3577capturing parentheses only with strictly positive integers (normal
353c6505 3578backreferences) or with strictly negative integers (relative
b72d83b2
RGS
3579backreferences), but using 0 does not make sense.
3580
49704364 3581=item Reference to nonexistent group in regex; marked by <-- HERE in m/%s/
b45f050a
JF
3582
3583(F) You used something like C<\7> in your regular expression, but there are
3584not at least seven sets of capturing parentheses in the expression. If you
3585wanted to have the character with value 7 inserted into the regular expression,
3586prepend a zero to make the number at least two digits: C<\07>
9baa0206 3587
7253e4e3 3588The <-- HERE shows in the regular expression about where the problem was
b45f050a 3589discovered.
9baa0206 3590
c74340f9
YO
3591=item Reference to nonexistent or unclosed group in regex; marked by <-- HERE in m/%s/
3592
2bf803e2 3593(F) You used something like C<\g{-7}> in your regular expression, but there are
c74340f9 3594not at least seven sets of closed capturing parentheses in the expression before
2bf803e2 3595where the C<\g{-7}> was located.
c74340f9
YO
3596
3597The <-- HERE shows in the regular expression about where the problem was
3598discovered.
3599
1a147d38
YO
3600=item Reference to nonexistent named group in regex; marked by <-- HERE in m/%s/
3601
3602(F) You used something like C<\k'NAME'> or C<< \k<NAME> >> in your regular
3603expression, but there is no corresponding named capturing parentheses such
3604as C<(?'NAME'...)> or C<(?<NAME>...). Check if the name has been spelled
3605correctly both in the backreference and the declaration.
3606
3607The <-- HERE shows in the regular expression about where the problem was
3608discovered.
3609
3610=item (?(DEFINE)....) does not allow branches in regex; marked by <-- HERE in m/%s/
3611
3612(F) You used something like C<(?(DEFINE)...|..)> which is illegal. The
3613most likely cause of this error is that you left out a parenthesis inside
3614of the C<....> part.
3615
3616The <-- HERE shows in the regular expression about where the problem was
3617discovered.
3618
a0d0e21e
LW
3619=item regexp memory corruption
3620
3621(P) The regular expression engine got confused by what the regular
3622expression compiler gave it.
3623
b45f050a 3624=item Regexp out of space
a0d0e21e 3625
be771a83
GS
3626(P) A "can't happen" error, because safemalloc() should have caught it
3627earlier.
a0d0e21e 3628
a1b95068
WL
3629=item Repeated format line will never terminate (~~ and @# incompatible)
3630
d7f8936a 3631(F) Your format contains the ~~ repeat-until-blank sequence and a
a1b95068
WL
3632numeric field that will never go blank so that the repetition never
3633terminates. You might use ^# instead. See L<perlform>.
3634
b08e453b
RB
3635=item Replacement list is longer than search list
3636
3637(W misc) You have used a replacement list that is longer than the
3638search list. So the additional elements in the replacement list
3639are meaningless.
3640
a0d0e21e
LW
3641=item Reversed %s= operator
3642
be771a83
GS
3643(W syntax) You wrote your assignment operator backwards. The = must
3644always comes last, to avoid ambiguity with subsequent unary operators.
a0d0e21e 3645
abc7ecad
SP
3646=item rewinddir() attempted on invalid dirhandle %s
3647
3648(W io) The dirhandle you tried to do a rewinddir() on is either closed or not
3649really a dirhandle. Check your control flow.
3650
a0d0e21e
LW
3651=item Runaway format
3652
3653(F) Your format contained the ~~ repeat-until-blank sequence, but it
3654produced 200 lines at once, and the 200th line looked exactly like the
3655199th line. Apparently you didn't arrange for the arguments to exhaust
3656themselves, either by using ^ instead of @ (for scalar variables), or by
3657shifting or popping (for array variables). See L<perlform>.
3658
96ebfdd7
RK
3659=item Scalars leaked: %d
3660
3661(P) Something went wrong in Perl's internal bookkeeping of scalars:
3662not all scalar variables were deallocated by the time Perl exited.
3663What this usually indicates is a memory leak, which is of course bad,
3664especially if the Perl program is intended to be long-running.
3665
a0d0e21e
LW
3666=item Scalar value @%s[%s] better written as $%s[%s]
3667
be771a83
GS
3668(W syntax) You've used an array slice (indicated by @) to select a
3669single element of an array. Generally it's better to ask for a scalar
3670value (indicated by $). The difference is that C<$foo[&bar]> always
3671behaves like a scalar, both when assigning to it and when evaluating its
3672argument, while C<@foo[&bar]> behaves like a list when you assign to it,
3673and provides a list context to its subscript, which can do weird things
3674if you're expecting only one subscript.
a0d0e21e 3675
748a9306 3676On the other hand, if you were actually hoping to treat the array
5f05dabc 3677element as a list, you need to look into how references work, because
748a9306
LW
3678Perl will not magically convert between scalars and lists for you. See
3679L<perlref>.
3680
a6006777 3681=item Scalar value @%s{%s} better written as $%s{%s}
3682
75b44862 3683(W syntax) You've used a hash slice (indicated by @) to select a single
be771a83
GS
3684element of a hash. Generally it's better to ask for a scalar value
3685(indicated by $). The difference is that C<$foo{&bar}> always behaves
3686like a scalar, both when assigning to it and when evaluating its
3687argument, while C<@foo{&bar}> behaves like a list when you assign to it,
3688and provides a list context to its subscript, which can do weird things
3689if you're expecting only one subscript.
3690
3691On the other hand, if you were actually hoping to treat the hash element
3692as a list, you need to look into how references work, because Perl will
3693not magically convert between scalars and lists for you. See
a6006777 3694L<perlref>.
3695
a0d0e21e
LW
3696=item Search pattern not terminated
3697
3698(F) The lexer couldn't find the final delimiter of a // or m{}
3699construct. Remember that bracketing delimiters count nesting level.
fb73857a 3700Missing the leading C<$> from a variable C<$m> may cause this error.
a0d0e21e 3701
0cb1bcd7 3702Note that since Perl 5.9.0 a // can also be the I<defined-or>
5d9c98cd
JH
3703construct, not just the empty search pattern. Therefore code written
3704in Perl 5.9.0 or later that uses the // as the I<defined-or> can be
3705misparsed by pre-5.9.0 Perls as a non-terminated search pattern.
3706
25c09cbf
SF
3707=item Search pattern not terminated or ternary operator parsed as search pattern
3708
3709(F) The lexer couldn't find the final delimiter of a C<?PATTERN?>
3710construct.
3711
3712The question mark is also used as part of the ternary operator (as in
3713C<foo ? 0 : 1>) leading to some ambiguous constructions being wrongly
3714parsed. One way to disambiguate the parsing is to put parentheses around
3715the conditional expression, i.e. C<(foo) ? 0 : 1>.
3716
9ddeeac9 3717=item %sseek() on unopened filehandle
a0d0e21e 3718
be771a83
GS
3719(W unopened) You tried to use the seek() or sysseek() function on a
3720filehandle that was either never opened or has since been closed.
a0d0e21e 3721
abc7ecad
SP
3722=item seekdir() attempted on invalid dirhandle %s
3723
3724(W io) The dirhandle you are doing a seekdir() on is either closed or not
3725really a dirhandle. Check your control flow.
3726
a0d0e21e
LW
3727=item select not implemented
3728
3729(F) This machine doesn't implement the select() system call.
3730
ae21d580 3731=item Self-ties of arrays and hashes are not supported
68a4a7e4 3732
ae21d580
JH
3733(F) Self-ties are of arrays and hashes are not supported in
3734the current implementation.
68a4a7e4 3735
6df41af2 3736=item Semicolon seems to be missing
a0d0e21e 3737
75b44862
GS
3738(W semicolon) A nearby syntax error was probably caused by a missing
3739semicolon, or possibly some other missing operator, such as a comma.
a0d0e21e
LW
3740
3741=item semi-panic: attempt to dup freed string
3742
be771a83
GS
3743(S internal) The internal newSVsv() routine was called to duplicate a
3744scalar that had previously been marked as free.
a0d0e21e 3745
6df41af2 3746=item sem%s not implemented
a0d0e21e 3747
6df41af2 3748(F) You don't have System V semaphore IPC on your system.
a0d0e21e 3749
69282e91 3750=item send() on closed socket %s
a0d0e21e 3751
be771a83 3752(W closed) The socket you're sending to got itself closed sometime
c289d2f7 3753before now. Check your control flow.
a0d0e21e 3754
7253e4e3 3755=item Sequence (? incomplete in regex; marked by <-- HERE in m/%s/
7b8d334a 3756
7253e4e3 3757(F) A regular expression ended with an incomplete extension (?. The <-- HERE
b45f050a 3758shows in the regular expression about where the problem was discovered. See
be771a83 3759L<perlre>.
1b1626e4 3760
49704364 3761=item Sequence (?%s...) not implemented in regex; marked by <-- HERE in m/%s/
a0d0e21e 3762
b45f050a 3763(F) A proposed regular expression extension has the character reserved but
7253e4e3 3764has not yet been written. The <-- HERE shows in the regular expression about
b45f050a
JF
3765where the problem was discovered. See L<perlre>.
3766
49704364 3767=item Sequence (?%s...) not recognized in regex; marked by <-- HERE in m/%s/
a0d0e21e 3768
7253e4e3
RK
3769(F) You used a regular expression extension that doesn't make sense. The
3770<-- HERE shows in the regular expression about where the problem was
3771discovered. See L<perlre>.
a0d0e21e 3772
1f1031fe
YO
3773=item Sequence \\%s... not terminated in regex; marked by <-- HERE in m/%s/
3774
3775(F) The regular expression expects a mandatory argument following the escape
3776sequence and this has been omitted or incorrectly written.
3777
49704364 3778=item Sequence (?#... not terminated in regex; marked by <-- HERE in m/%s/
6df41af2
GS
3779
3780(F) A regular expression comment must be terminated by a closing
7253e4e3
RK
3781parenthesis. Embedded parentheses aren't allowed. The <-- HERE shows in
3782the regular expression about where the problem was discovered. See
3783L<perlre>.
6df41af2 3784
96ebfdd7
RK
3785=item Sequence (?{...}) not terminated or not {}-balanced in regex; marked by <-- HERE in m/%s/
3786
3787(F) If the contents of a (?{...}) clause contains braces, they must balance
3788for Perl to properly detect the end of the clause. The <-- HERE shows in
3789the regular expression about where the problem was discovered. See
3790L<perlre>.
3791
6df41af2
GS
3792=item 500 Server error
3793
3794See Server error.
3795
a5f75d66
AD
3796=item Server error
3797
3cdd684c 3798This is the error message generally seen in a browser window when trying
be771a83
GS
3799to run a CGI program (including SSI) over the web. The actual error text
3800varies widely from server to server. The most frequently-seen variants
3801are "500 Server error", "Method (something) not permitted", "Document
3802contains no data", "Premature end of script headers", and "Did not
3803produce a valid header".
9607fc9c 3804
3805B<This is a CGI error, not a Perl error>.
3806
be771a83
GS
3807You need to make sure your script is executable, is accessible by the
3808user CGI is running the script under (which is probably not the user
3809account you tested it under), does not rely on any environment variables
3810(like PATH) from the user it isn't running under, and isn't in a
3811location where the CGI server can't find it, basically, more or less.
3812Please see the following for more information:
9607fc9c 3813
06a5f41f
JH
3814 http://www.perl.org/CGI_MetaFAQ.html
3815 http://www.htmlhelp.org/faq/cgifaq.html
3816 http://www.w3.org/Security/Faq/
a5f75d66 3817
be94a901
GS
3818You should also look at L<perlfaq9>.
3819
a0d0e21e
LW
3820=item setegid() not implemented
3821
be771a83
GS
3822(F) You tried to assign to C<$)>, and your operating system doesn't
3823support the setegid() system call (or equivalent), or at least Configure
3824didn't think so.
a0d0e21e
LW
3825
3826=item seteuid() not implemented
3827
be771a83
GS
3828(F) You tried to assign to C<< $> >>, and your operating system doesn't
3829support the seteuid() system call (or equivalent), or at least Configure
3830didn't think so.
a0d0e21e 3831
81777298
GS
3832=item setpgrp can't take arguments
3833
be771a83
GS
3834(F) Your system has the setpgrp() from BSD 4.2, which takes no
3835arguments, unlike POSIX setpgid(), which takes a process ID and process
3836group ID.
81777298 3837
a0d0e21e
LW
3838=item setrgid() not implemented
3839
be771a83
GS
3840(F) You tried to assign to C<$(>, and your operating system doesn't
3841support the setrgid() system call (or equivalent), or at least Configure
3842didn't think so.
a0d0e21e
LW
3843
3844=item setruid() not implemented
3845
be771a83
GS
3846(F) You tried to assign to C<$<>, and your operating system doesn't
3847support the setruid() system call (or equivalent), or at least Configure
3848didn't think so.
a0d0e21e 3849
6df41af2
GS
3850=item setsockopt() on closed socket %s
3851
be771a83
GS
3852(W closed) You tried to set a socket option on a closed socket. Did you
3853forget to check the return value of your socket() call? See
6df41af2
GS
3854L<perlfunc/setsockopt>.
3855
a0d0e21e
LW
3856=item Setuid/gid script is writable by world
3857
be771a83
GS
3858(F) The setuid emulator won't run a script that is writable by the
3859world, because the world might have written on it already.
a0d0e21e 3860
d504a7a1
RGS
3861=item Setuid script not plain file
3862
3863(F) The setuid emulator won't run a script that isn't read from a file,
3864but from a socket, a pipe or another device.
3865
a0d0e21e
LW
3866=item shm%s not implemented
3867
3868(F) You don't have System V shared memory IPC on your system.
3869
984200d0
YST
3870=item !=~ should be !~
3871
3872(W syntax) The non-matching operator is !~, not !=~. !=~ will be
3873interpreted as the != (numeric not equal) and ~ (1's complement)
3874operators: probably not what you intended.
3875
6df41af2
GS
3876=item <> should be quotes
3877
3878(F) You wrote C<< require <file> >> when you should have written
3879C<require 'file'>.
3880
3881=item /%s/ should probably be written as "%s"
3882
3883(W syntax) You have used a pattern where Perl expected to find a string,
be771a83
GS
3884as in the first argument to C<join>. Perl will treat the true or false
3885result of matching the pattern against $_ as the string, which is
3886probably not what you had in mind.
6df41af2 3887
69282e91 3888=item shutdown() on closed socket %s
a0d0e21e 3889
75b44862
GS
3890(W closed) You tried to do a shutdown on a closed socket. Seems a bit
3891superfluous.
a0d0e21e 3892
f86702cc 3893=item SIG%s handler "%s" not defined
a0d0e21e 3894
be771a83
GS
3895(W signal) The signal handler named in %SIG doesn't, in fact, exist.
3896Perhaps you put it into the wrong package?
a0d0e21e
LW
3897
3898=item sort is now a reserved word
3899
3900(F) An ancient error message that almost nobody ever runs into anymore.
3901But before sort was a keyword, people sometimes used it as a filehandle.
3902
3903=item Sort subroutine didn't return a numeric value
3904
3905(F) A sort comparison routine must return a number. You probably blew
c47ff5f1 3906it by not using C<< <=> >> or C<cmp>, or by not using them correctly.
a0d0e21e
LW
3907See L<perlfunc/sort>.
3908
3909=item Sort subroutine didn't return single value
3910
3911(F) A sort comparison subroutine may not return a list value with more
3912or less than one element. See L<perlfunc/sort>.
3913
8cbc2e3b
JH
3914=item splice() offset past end of array
3915
3916(W misc) You attempted to specify an offset that was past the end of
3917the array passed to splice(). Splicing will instead commence at the end
3918of the array, rather than past it. If this isn't what you want, try
3919explicitly pre-extending the array by assigning $#array = $offset. See
3920L<perlfunc/splice>.
3921
a0d0e21e
LW
3922=item Split loop
3923
be771a83
GS
3924(P) The split was looping infinitely. (Obviously, a split shouldn't
3925iterate more times than there are characters of input, which is what
3926happened.) See L<perlfunc/split>.
a0d0e21e 3927
a0d0e21e
LW
3928=item Statement unlikely to be reached
3929
be771a83
GS
3930(W exec) You did an exec() with some statement after it other than a
3931die(). This is almost always an error, because exec() never returns
3932unless there was a failure. You probably wanted to use system()
3933instead, which does return. To suppress this warning, put the exec() in
3934a block by itself.
a0d0e21e 3935
9ddeeac9 3936=item stat() on unopened filehandle %s
6df41af2 3937
355b1299
JH
3938(W unopened) You tried to use the stat() function on a filehandle that
3939was either never opened or has since been closed.
6df41af2 3940
f46d83d8 3941=item Stub found while resolving method "%s" overloading "%s"
e7ea3e70 3942
be771a83
GS
3943(P) Overloading resolution over @ISA tree may be broken by importation
3944stubs. Stubs should never be implicitly created, but explicit calls to
3945C<can> may break this.
e7ea3e70 3946
a0d0e21e
LW
3947=item Subroutine %s redefined
3948
e476b1b5 3949(W redefine) You redefined a subroutine. To suppress this warning, say
a0d0e21e
LW
3950
3951 {
271595cc 3952 no warnings 'redefine';
a0d0e21e
LW
3953 eval "sub name { ... }";
3954 }
3955
3956=item Substitution loop
3957
be771a83
GS
3958(P) The substitution was looping infinitely. (Obviously, a substitution
3959shouldn't iterate more times than there are characters of input, which
3960is what happened.) See the discussion of substitution in
5d44bfff 3961L<perlop/"Regexp Quote-Like Operators">.
a0d0e21e
LW
3962
3963=item Substitution pattern not terminated
3964
d1be9408 3965(F) The lexer couldn't find the interior delimiter of an s/// or s{}{}
a0d0e21e 3966construct. Remember that bracketing delimiters count nesting level.
fb73857a 3967Missing the leading C<$> from variable C<$s> may cause this error.
a0d0e21e
LW
3968
3969=item Substitution replacement not terminated
3970
d1be9408 3971(F) The lexer couldn't find the final delimiter of an s/// or s{}{}
a0d0e21e 3972construct. Remember that bracketing delimiters count nesting level.
fb73857a 3973Missing the leading C<$> from variable C<$s> may cause this error.
a0d0e21e
LW
3974
3975=item substr outside of string
3976
be771a83
GS
3977(W substr),(F) You tried to reference a substr() that pointed outside of
3978a string. That is, the absolute value of the offset was larger than the
3979length of the string. See L<perlfunc/substr>. This warning is fatal if
3980substr is used in an lvalue context (as the left hand side of an
3981assignment or as a subroutine argument for example).
a0d0e21e 3982
bf1320bf
RGS
3983=item sv_upgrade from type %d down to type %d
3984
3985(P) Perl tried to force the upgrade an SV to a type which was actually
3986inferior to its current type.
3987
49704364 3988=item Switch (?(condition)... contains too many branches in regex; marked by <-- HERE in m/%s/
b45f050a
JF
3989
3990(F) A (?(condition)if-clause|else-clause) construct can have at most two
3991branches (the if-clause and the else-clause). If you want one or both to
3992contain alternation, such as using C<this|that|other>, enclose it in
3993clustering parentheses:
3994
3995 (?(condition)(?:this|that|other)|else-clause)
3996
7253e4e3 3997The <-- HERE shows in the regular expression about where the problem was
b45f050a
JF
3998discovered. See L<perlre>.
3999
49704364 4000=item Switch condition not recognized in regex; marked by <-- HERE in m/%s/
b45f050a
JF
4001
4002(F) If the argument to the (?(...)if-clause|else-clause) construct is a
7253e4e3 4003number, it can be only a number. The <-- HERE shows in the regular expression
b45f050a
JF
4004about where the problem was discovered. See L<perlre>.
4005
85ab1d1d
JH
4006=item switching effective %s is not implemented
4007
be771a83
GS
4008(F) While under the C<use filetest> pragma, we cannot switch the real
4009and effective uids or gids.
85ab1d1d 4010
2f7da168
RK
4011=item %s syntax
4012
4013(F) The final summary message when a C<perl -c> succeeds.
4014
a0d0e21e
LW
4015=item syntax error
4016
4017(F) Probably means you had a syntax error. Common reasons include:
4018
4019 A keyword is misspelled.
4020 A semicolon is missing.
4021 A comma is missing.
4022 An opening or closing parenthesis is missing.
4023 An opening or closing brace is missing.
4024 A closing quote is missing.
4025
4026Often there will be another error message associated with the syntax
4027error giving more information. (Sometimes it helps to turn on B<-w>.)
4028The error message itself often tells you where it was in the line when
4029it decided to give up. Sometimes the actual error is several tokens
5f05dabc 4030before this, because Perl is good at understanding random input.
a0d0e21e
LW
4031Occasionally the line number may be misleading, and once in a blue moon
4032the only way to figure out what's triggering the error is to call
4033C<perl -c> repeatedly, chopping away half the program each time to see
be771a83
GS
4034if the error went away. Sort of the cybernetic version of S<20
4035questions>.
a0d0e21e 4036
cb1a09d0
AD
4037=item syntax error at line %d: `%s' unexpected
4038
be771a83
GS
4039(A) You've accidentally run your script through the Bourne shell instead
4040of Perl. Check the #! line, or manually feed your script into Perl
4041yourself.
cb1a09d0 4042
25f58aea
PN
4043=item syntax error in file %s at line %d, next 2 tokens "%s"
4044
4045(F) This error is likely to occur if you run a perl5 script through
4046a perl4 interpreter, especially if the next 2 tokens are "use strict"
4047or "my $var" or "our $var".
4048
b5fe5ca2
SR
4049=item sysread() on closed filehandle %s
4050
4051(W closed) You tried to read from a closed filehandle.
4052
4053=item sysread() on unopened filehandle %s
4054
4055(W unopened) You tried to read from a filehandle that was never opened.
4056
6087ac44 4057=item System V %s is not implemented on this machine
a0d0e21e 4058
6087ac44
JH
4059(F) You tried to do something with a function beginning with "sem",
4060"shm", or "msg" but that System V IPC is not implemented in your
4061machine. In some machines the functionality can exist but be
4062unconfigured. Consult your system support.
a0d0e21e 4063
69282e91 4064=item syswrite() on closed filehandle %s
a0d0e21e 4065
be771a83 4066(W closed) The filehandle you're writing to got itself closed sometime
c289d2f7 4067before now. Check your control flow.
a0d0e21e 4068
96ebfdd7
RK
4069=item C<-T> and C<-B> not implemented on filehandles
4070
4071(F) Perl can't peek at the stdio buffer of filehandles when it doesn't
4072know about your kind of stdio. You'll have to use a filename instead.
4073
fc36a67e 4074=item Target of goto is too deeply nested
4075
be771a83
GS
4076(F) You tried to use C<goto> to reach a label that was too deeply nested
4077for Perl to reach. Perl is doing you a favor by refusing.
fc36a67e 4078
9ddeeac9 4079=item tell() on unopened filehandle
a0d0e21e 4080
be771a83
GS
4081(W unopened) You tried to use the tell() function on a filehandle that
4082was either never opened or has since been closed.
a0d0e21e 4083
abc7ecad
SP
4084=item telldir() attempted on invalid dirhandle %s
4085
4086(W io) The dirhandle you tried to telldir() is either closed or not really
4087a dirhandle. Check your control flow.
4088
a0d0e21e
LW
4089=item That use of $[ is unsupported
4090
be771a83
GS
4091(F) Assignment to C<$[> is now strictly circumscribed, and interpreted
4092as a compiler directive. You may say only one of
a0d0e21e
LW
4093
4094 $[ = 0;
4095 $[ = 1;
4096 ...
4097 local $[ = 0;
4098 local $[ = 1;
4099 ...
4100
be771a83
GS
4101This is to prevent the problem of one module changing the array base out
4102from under another module inadvertently. See L<perlvar/$[>.
a0d0e21e 4103
f86702cc 4104=item The crypt() function is unimplemented due to excessive paranoia
a0d0e21e
LW
4105
4106(F) Configure couldn't find the crypt() function on your machine,
4107probably because your vendor didn't supply it, probably because they
8b1a09fc 4108think the U.S. Government thinks it's a secret, or at least that they
a0d0e21e
LW
4109will continue to pretend that it is. And if you quote me on that, I
4110will deny it.
4111
6df41af2
GS
4112=item The %s function is unimplemented
4113
4114The function indicated isn't implemented on this architecture, according
4115to the probings of Configure.
4116
5e1c7ca2 4117=item The stat preceding %s wasn't an lstat
a0d0e21e 4118
be771a83
GS
4119(F) It makes no sense to test the current stat buffer for symbolic
4120linkhood if the last stat that wrote to the stat buffer already went
4121past the symlink to get to the real file. Use an actual filename
4122instead.
a0d0e21e 4123
371fce9b
DM
4124=item The 'unique' attribute may only be applied to 'our' variables
4125
1108974d 4126(F) This attribute was never supported on C<my> or C<sub> declarations.
371fce9b 4127
437784d6 4128=item This Perl can't reset CRTL environ elements (%s)
f675dbe5
CB
4129
4130=item This Perl can't set CRTL environ elements (%s=%s)
4131
75b44862 4132(W internal) Warnings peculiar to VMS. You tried to change or delete an
be771a83
GS
4133element of the CRTL's internal environ array, but your copy of Perl
4134wasn't built with a CRTL that contained the setenv() function. You'll
4135need to rebuild Perl with a CRTL that does, or redefine
4136F<PERL_ENV_TABLES> (see L<perlvms>) so that the environ array isn't the
4137target of the change to
f675dbe5
CB
4138%ENV which produced the warning.
4139
6b3c7930
JH
4140=item thread failed to start: %s
4141
4447dfc1 4142(W threads)(S) The entry point function of threads->create() failed for some reason.
6b3c7930 4143
a0d0e21e
LW
4144=item times not implemented
4145
be771a83
GS
4146(F) Your version of the C library apparently doesn't do times(). I
4147suspect you're not running on Unix.
a0d0e21e 4148
6d3b25aa
RGS
4149=item "-T" is on the #! line, it must also be used on the command line
4150
4151(X) The #! line (or local equivalent) in a Perl script contains the
4152B<-T> option, but Perl was not invoked with B<-T> in its command line.
4153This is an error because, by the time Perl discovers a B<-T> in a
4154script, it's too late to properly taint everything from the environment.
4155So Perl gives up.
4156
4157If the Perl script is being executed as a command using the #!
4158mechanism (or its local equivalent), this error can usually be fixed by
4159editing the #! line so that the B<-T> option is a part of Perl's first
4160argument: e.g. change C<perl -n -T> to C<perl -T -n>.
4161
4162If the Perl script is being executed as C<perl scriptname>, then the
4163B<-T> option must appear on the command line: C<perl -T scriptname>.
4164
3a2263fe
RGS
4165=item To%s: illegal mapping '%s'
4166
4167(F) You tried to define a customized To-mapping for lc(), lcfirst,
4168uc(), or ucfirst() (or their string-inlined versions), but you
4169specified an illegal mapping.
4170See L<perlunicode/"User-Defined Character Properties">.
4171
49704364
WL
4172=item Too deeply nested ()-groups
4173
1a147d38 4174(F) Your template contains ()-groups with a ridiculously deep nesting level.
49704364 4175
a0d0e21e
LW
4176=item Too few args to syscall
4177
4178(F) There has to be at least one argument to syscall() to specify the
4179system call to call, silly dilly.
4180
96ebfdd7
RK
4181=item Too late for "-%s" option
4182
4183(X) The #! line (or local equivalent) in a Perl script contains the
3ffe3ee4 4184B<-M>, B<-m> or B<-C> option. This is an error because those options
96ebfdd7
RK
4185are not intended for use inside scripts. Use the C<use> pragma instead.
4186
ddda08b7
GS
4187=item Too late to run %s block
4188
4189(W void) A CHECK or INIT block is being defined during run time proper,
4190when the opportunity to run them has already passed. Perhaps you are
be771a83
GS
4191loading a file with C<require> or C<do> when you should be using C<use>
4192instead. Or perhaps you should put the C<require> or C<do> inside a
4193BEGIN block.
ddda08b7 4194
a0d0e21e
LW
4195=item Too many args to syscall
4196
5f05dabc 4197(F) Perl supports a maximum of only 14 args to syscall().
a0d0e21e
LW
4198
4199=item Too many arguments for %s
4200
4201(F) The function requires fewer arguments than you specified.
4202
6df41af2
GS
4203=item Too many )'s
4204
49704364
WL
4205(A) You've accidentally run your script through B<csh> instead of Perl.
4206Check the #! line, or manually feed your script into Perl yourself.
4207
8c40cb74
NC
4208=item Too many ('s
4209
be771a83
GS
4210(A) You've accidentally run your script through B<csh> instead of Perl.
4211Check the #! line, or manually feed your script into Perl yourself.
6df41af2 4212
7253e4e3 4213=item Trailing \ in regex m/%s/
a0d0e21e 4214
be771a83
GS
4215(F) The regular expression ends with an unbackslashed backslash.
4216Backslash it. See L<perlre>.
a0d0e21e 4217
2c268ad5 4218=item Transliteration pattern not terminated
a0d0e21e
LW
4219
4220(F) The lexer couldn't find the interior delimiter of a tr/// or tr[][]
fb73857a 4221or y/// or y[][] construct. Missing the leading C<$> from variables
4222C<$tr> or C<$y> may cause this error.
a0d0e21e 4223
2c268ad5 4224=item Transliteration replacement not terminated
a0d0e21e 4225
6a36df5d
YST
4226(F) The lexer couldn't find the final delimiter of a tr///, tr[][],
4227y/// or y[][] construct.
a0d0e21e 4228
96ebfdd7
RK
4229=item '%s' trapped by operation mask
4230
4231(F) You tried to use an operator from a Safe compartment in which it's
4232disallowed. See L<Safe>.
4233
a0d0e21e
LW
4234=item truncate not implemented
4235
4236(F) Your machine doesn't implement a file truncation mechanism that
4237Configure knows about.
4238
4239=item Type of arg %d to %s must be %s (not %s)
4240
4241(F) This function requires the argument in that position to be of a
8b1a09fc 4242certain type. Arrays must be @NAME or C<@{EXPR}>. Hashes must be
4243%NAME or C<%{EXPR}>. No implicit dereferencing is allowed--use the
a0d0e21e
LW
4244{EXPR} forms as an explicit dereference. See L<perlref>.
4245
eec2d3df
GS
4246=item umask not implemented
4247
be771a83
GS
4248(F) Your machine doesn't implement the umask function and you tried to
4249use it to restrict permissions for yourself (EXPR & 0700).
a0d0e21e 4250
4633a7c4
LW
4251=item Unable to create sub named "%s"
4252
4253(F) You attempted to create or access a subroutine with an illegal name.
4254
a0d0e21e
LW
4255=item Unbalanced context: %d more PUSHes than POPs
4256
be771a83
GS
4257(W internal) The exit code detected an internal inconsistency in how
4258many execution contexts were entered and left.
a0d0e21e
LW
4259
4260=item Unbalanced saves: %d more saves than restores
4261
be771a83
GS
4262(W internal) The exit code detected an internal inconsistency in how
4263many values were temporarily localized.
a0d0e21e
LW
4264
4265=item Unbalanced scopes: %d more ENTERs than LEAVEs
4266
be771a83
GS
4267(W internal) The exit code detected an internal inconsistency in how
4268many blocks were entered and left.
a0d0e21e
LW
4269
4270=item Unbalanced tmps: %d more allocs than frees
4271
be771a83
GS
4272(W internal) The exit code detected an internal inconsistency in how
4273many mortal scalars were allocated and freed.
a0d0e21e
LW
4274
4275=item Undefined format "%s" called
4276
4277(F) The format indicated doesn't seem to exist. Perhaps it's really in
4278another package? See L<perlform>.
4279
4280=item Undefined sort subroutine "%s" called
4281
be771a83
GS
4282(F) The sort comparison routine specified doesn't seem to exist.
4283Perhaps it's in a different package? See L<perlfunc/sort>.
a0d0e21e
LW
4284
4285=item Undefined subroutine &%s called
4286
be771a83
GS
4287(F) The subroutine indicated hasn't been defined, or if it was, it has
4288since been undefined.
a0d0e21e
LW
4289
4290=item Undefined subroutine called
4291
4292(F) The anonymous subroutine you're trying to call hasn't been defined,
4293or if it was, it has since been undefined.
4294
4295=item Undefined subroutine in sort
4296
be771a83
GS
4297(F) The sort comparison routine specified is declared but doesn't seem
4298to have been defined yet. See L<perlfunc/sort>.
a0d0e21e 4299
4633a7c4
LW
4300=item Undefined top format "%s" called
4301
4302(F) The format indicated doesn't seem to exist. Perhaps it's really in
4303another package? See L<perlform>.
4304
20408e3c
GS
4305=item Undefined value assigned to typeglob
4306
be771a83
GS
4307(W misc) An undefined value was assigned to a typeglob, a la
4308C<*foo = undef>. This does nothing. It's possible that you really mean
4309C<undef *foo>.
20408e3c 4310
6df41af2
GS
4311=item %s: Undefined variable
4312
be771a83
GS
4313(A) You've accidentally run your script through B<csh> instead of Perl.
4314Check the #! line, or manually feed your script into Perl yourself.
6df41af2 4315
a0d0e21e
LW
4316=item unexec of %s into %s failed!
4317
4318(F) The unexec() routine failed for some reason. See your local FSF
4319representative, who probably put it there in the first place.
4320
3d401ffb
JH
4321=item Unicode character %s is illegal
4322
507b9800
JH
4323(W utf8) Certain Unicode characters have been designated off-limits by
4324the Unicode standard and should not be generated. If you really know
4325what you are doing you can turn off this warning by C<no warnings 'utf8';>.
b45f050a 4326
a0d0e21e
LW
4327=item Unknown BYTEORDER
4328
be771a83
GS
4329(F) There are no byte-swapping functions for a machine with this byte
4330order.
a0d0e21e 4331
6170680b
IZ
4332=item Unknown open() mode '%s'
4333
437784d6 4334(F) The second argument of 3-argument open() is not among the list
c47ff5f1 4335of valid modes: C<< < >>, C<< > >>, C<<< >> >>>, C<< +< >>,
488dad83 4336C<< +> >>, C<<< +>> >>>, C<-|>, C<|->, C<< <& >>, C<< >& >>.
6170680b 4337
b4581f09
JH
4338=item Unknown PerlIO layer "%s"
4339
4340(W layer) An attempt was made to push an unknown layer onto the Perl I/O
4341system. (Layers take care of transforming data between external and
4342internal representations.) Note that some layers, such as C<mmap>,
4343are not supported in all environments. If your program didn't
4344explicitly request the failing operation, it may be the result of the
4345value of the environment variable PERLIO.
4346
f675dbe5
CB
4347=item Unknown process %x sent message to prime_env_iter: %s
4348
4349(P) An error peculiar to VMS. Perl was reading values for %ENV before
4350iterating over it, and someone else stuck a message in the stream of
4351data Perl expected. Someone's very confused, or perhaps trying to
4352subvert Perl's population of %ENV for nefarious purposes.
a05d7ebb 4353
2f7da168
RK
4354=item Unknown "re" subpragma '%s' (known ones are: %s)
4355
4356You tried to use an unknown subpragma of the "re" pragma.
4357
96ebfdd7
RK
4358=item Unknown switch condition (?(%.2s in regex; marked by <-- HERE in m/%s/
4359
4360(F) The condition part of a (?(condition)if-clause|else-clause) construct
4361is not known. The condition may be lookahead or lookbehind (the condition
4362is true if the lookahead or lookbehind is true), a (?{...}) construct (the
4363condition is true if the code evaluates to a true value), or a number (the
4364condition is true if the set of capturing parentheses named by the number
4365matched).
4366
4367The <-- HERE shows in the regular expression about where the problem was
4368discovered. See L<perlre>.
4369
a05d7ebb
JH
4370=item Unknown Unicode option letter '%c'
4371
4372You specified an unknown Unicode option. See L<perlrun> documentation
4373of the C<-C> switch for the list of known options.
4374
4375=item Unknown Unicode option value %x
4376
4377You specified an unknown Unicode option. See L<perlrun> documentation
4378of the C<-C> switch for the list of known options.
f675dbe5 4379
3d1a39c8
RGS
4380=item Unknown warnings category '%s'
4381
4382(F) An error issued by the C<warnings> pragma. You specified a warnings
4383category that is unknown to perl at this point.
4384
4385Note that if you want to enable a warnings category registered by a module
4386(e.g. C<use warnings 'File::Find'>), you must have imported this module
e2e6a0f1
YO
4387
4388=item Unknown verb pattern '%s' in regex; marked by <-- HERE in m/%s/
4389
4390(F) You either made a typo or have incorrectly put a C<*> quantifier
4391after an open brace in your pattern. Check the pattern and review
4392L<perlre> for details on legal verb patterns.
4393
3d1a39c8
RGS
4394first.
4395
7253e4e3 4396=item unmatched [ in regex; marked by <-- HERE in m/%s/
6df41af2 4397
380a0633 4398(F) The brackets around a character class must match. If you wish to
be771a83 4399include a closing bracket in a character class, backslash it or put it
7253e4e3
RK
4400first. The <-- HERE shows in the regular expression about where the problem
4401was discovered. See L<perlre>.
6df41af2 4402
7253e4e3 4403=item unmatched ( in regex; marked by <-- HERE in m/%s/
a0d0e21e
LW
4404
4405(F) Unbackslashed parentheses must always be balanced in regular
7253e4e3
RK
4406expressions. If you're a vi user, the % key is valuable for finding the
4407matching parenthesis. The <-- HERE shows in the regular expression about
4408where the problem was discovered. See L<perlre>.
a0d0e21e 4409
d98d5fff 4410=item Unmatched right %s bracket
a0d0e21e 4411
be771a83
GS
4412(F) The lexer counted more closing curly or square brackets than opening
4413ones, so you're probably missing a matching opening bracket. As a
4414general rule, you'll find the missing one (so to speak) near the place
4415you were last editing.
a0d0e21e 4416
a0d0e21e
LW
4417=item Unquoted string "%s" may clash with future reserved word
4418
be771a83
GS
4419(W reserved) You used a bareword that might someday be claimed as a
4420reserved word. It's best to put such a word in quotes, or capitalize it
4421somehow, or insert an underbar into it. You might also declare it as a
4422subroutine.
a0d0e21e 4423
356c7adf 4424=item Unrecognized character %s in column %d
a0d0e21e 4425
54310121 4426(F) The Perl parser has no idea what to do with the specified character
356c7adf
CJ
4427in your Perl script (or eval) at the specified column. Perhaps you tried
4428to run a compressed script, a binary program, or a directory as a Perl program.
a0d0e21e 4429
2628b4e0 4430=item Unrecognized escape \\%c in character class passed through in regex; marked by <-- HERE in m/%s/
6df41af2 4431
be771a83
GS
4432(W regexp) You used a backslash-character combination which is not
4433recognized by Perl inside character classes. The character was
4434understood literally.
2628b4e0
TS
4435The <-- HERE shows in the regular expression about where the
4436escape was discovered.
6df41af2 4437
2f7da168
RK
4438=item Unrecognized escape \\%c passed through
4439
2628b4e0
TS
4440(W misc) You used a backslash-character combination which is not
4441recognized by Perl. The character was understood literally.
2f7da168 4442
49704364 4443=item Unrecognized escape \\%c passed through in regex; marked by <-- HERE in m/%s/
6df41af2 4444
be771a83 4445(W regexp) You used a backslash-character combination which is not
2628b4e0
TS
4446recognized by Perl. The character was understood literally.
4447The <-- HERE shows in the regular expression about where the
7253e4e3 4448escape was discovered.
6df41af2 4449
a0d0e21e
LW
4450=item Unrecognized signal name "%s"
4451
be771a83
GS
4452(F) You specified a signal name to the kill() function that was not
4453recognized. Say C<kill -l> in your shell to see the valid signal names
4454on your system.
a0d0e21e 4455
90248788 4456=item Unrecognized switch: -%s (-h will show valid options)
a0d0e21e 4457
be771a83
GS
4458(F) You specified an illegal option to Perl. Don't do that. (If you
4459think you didn't do that, check the #! line to see if it's supplying the
4460bad switch on your behalf.)
a0d0e21e
LW
4461
4462=item Unsuccessful %s on filename containing newline
4463
be771a83
GS
4464(W newline) A file operation was attempted on a filename, and that
4465operation failed, PROBABLY because the filename contained a newline,
5b3eff12 4466PROBABLY because you forgot to chomp() it off. See L<perlfunc/chomp>.
a0d0e21e
LW
4467
4468=item Unsupported directory function "%s" called
4469
4470(F) Your machine doesn't support opendir() and readdir().
4471
6df41af2
GS
4472=item Unsupported function %s
4473
4474(F) This machine doesn't implement the indicated function, apparently.
4475At least, Configure doesn't think so.
4476
54310121 4477=item Unsupported function fork
4478
4479(F) Your version of executable does not support forking.
4480
be771a83
GS
4481Note that under some systems, like OS/2, there may be different flavors
4482of Perl executables, some of which may support fork, some not. Try
4483changing the name you call Perl by to C<perl_>, C<perl__>, and so on.
54310121 4484
7aa207d6 4485=item Unsupported script encoding %s
b250498f
GS
4486
4487(F) Your program file begins with a Unicode Byte Order Mark (BOM) which
7aa207d6 4488declares it to be in a Unicode encoding that Perl cannot read.
b250498f 4489
a0d0e21e
LW
4490=item Unsupported socket function "%s" called
4491
4492(F) Your machine doesn't support the Berkeley socket mechanism, or at
4493least that's what Configure thought.
4494
6df41af2 4495=item Unterminated attribute list
a0d0e21e 4496
be771a83
GS
4497(F) The lexer found something other than a simple identifier at the
4498start of an attribute, and it wasn't a semicolon or the start of a
4499block. Perhaps you terminated the parameter list of the previous
4500attribute too soon. See L<attributes>.
a0d0e21e 4501
09bef843
SB
4502=item Unterminated attribute parameter in attribute list
4503
be771a83
GS
4504(F) The lexer saw an opening (left) parenthesis character while parsing
4505an attribute list, but the matching closing (right) parenthesis
09bef843
SB
4506character was not found. You may need to add (or remove) a backslash
4507character to get your parentheses to balance. See L<attributes>.
4508
f1991046
GS
4509=item Unterminated compressed integer
4510
4511(F) An argument to unpack("w",...) was incompatible with the BER
4512compressed integer format and could not be converted to an integer.
4513See L<perlfunc/pack>.
4514
e2e6a0f1
YO
4515=item Unterminated verb pattern in regex; marked by <-- HERE in m/%s/
4516
4517(F) You used a pattern of the form C<(*VERB)> but did not terminate
4518the pattern with a C<)>. Fix the pattern and retry.
4519
4520=item Unterminated verb pattern argument in regex; marked by <-- HERE in m/%s/
4521
4522(F) You used a pattern of the form C<(*VERB:ARG)> but did not terminate
4523the pattern with a C<)>. Fix the pattern and retry.
4524
2bf803e2
YO
4525=item Unterminated \g{...} pattern in regex; marked by <-- HERE in m/%s/
4526
4527(F) You missed a close brace on a \g{..} pattern (group reference) in
4528a regular expression. Fix the pattern and retry.
e2e6a0f1 4529
6df41af2 4530=item Unterminated <> operator
09bef843 4531
6df41af2 4532(F) The lexer saw a left angle bracket in a place where it was expecting
be771a83
GS
4533a term, so it's looking for the corresponding right angle bracket, and
4534not finding it. Chances are you left some needed parentheses out
4535earlier in the line, and you really meant a "less than".
09bef843 4536
6df41af2 4537=item untie attempted while %d inner references still exist
a0d0e21e 4538
be771a83
GS
4539(W untie) A copy of the object returned from C<tie> (or C<tied>) was
4540still valid when C<untie> was called.
a0d0e21e 4541
8e11cd2b
JC
4542=item Usage: POSIX::%s(%s)
4543
4544(F) You called a POSIX function with incorrect arguments.
4545See L<POSIX/FUNCTIONS> for more information.
4546
4547=item Usage: Win32::%s(%s)
4548
4549(F) You called a Win32 function with incorrect arguments.
4550See L<Win32> for more information.
4551
96ebfdd7 4552=item Useless (?-%s) - don't use /%s modifier in regex; marked by <-- HERE in m/%s/
9d1d55b5 4553
96ebfdd7
RK
4554(W regexp) You have used an internal modifier such as (?-o) that has no
4555meaning unless removed from the entire regexp:
9d1d55b5 4556
96ebfdd7 4557 if ($string =~ /(?-o)$pattern/o) { ... }
9d1d55b5
JP
4558
4559must be written as
4560
96ebfdd7 4561 if ($string =~ /$pattern/) { ... }
9d1d55b5
JP
4562
4563The <-- HERE shows in the regular expression about
4564where the problem was discovered. See L<perlre>.
4565
b4581f09
JH
4566=item Useless localization of %s
4567
4568(W syntax) The localization of lvalues such as C<local($x=10)> is
4569legal, but in fact the local() currently has no effect. This may change at
4570some point in the future, but in the meantime such code is discouraged.
4571
96ebfdd7 4572=item Useless (?%s) - use /%s modifier in regex; marked by <-- HERE in m/%s/
9d1d55b5 4573
96ebfdd7
RK
4574(W regexp) You have used an internal modifier such as (?o) that has no
4575meaning unless applied to the entire regexp:
9d1d55b5 4576
96ebfdd7 4577 if ($string =~ /(?o)$pattern/) { ... }
9d1d55b5
JP
4578
4579must be written as
4580
96ebfdd7 4581 if ($string =~ /$pattern/o) { ... }
9d1d55b5
JP
4582
4583The <-- HERE shows in the regular expression about
4584where the problem was discovered. See L<perlre>.
4585
b08e453b
RB
4586=item Useless use of /d modifier in transliteration operator
4587
4588(W misc) You have used the /d modifier where the searchlist has the
4589same length as the replacelist. See L<perlop> for more information
4590about the /d modifier.
4591
6df41af2 4592=item Useless use of %s in void context
a0d0e21e 4593
75b44862 4594(W void) You did something without a side effect in a context that does
be771a83
GS
4595nothing with the return value, such as a statement that doesn't return a
4596value from a block, or the left side of a scalar comma operator. Very
4597often this points not to stupidity on your part, but a failure of Perl
4598to parse your program the way you thought it would. For example, you'd
4599get this if you mixed up your C precedence with Python precedence and
4600said
a0d0e21e 4601
6df41af2 4602 $one, $two = 1, 2;
748a9306 4603
6df41af2
GS
4604when you meant to say
4605
4606 ($one, $two) = (1, 2);
4607
4608Another common error is to use ordinary parentheses to construct a list
4609reference when you should be using square or curly brackets, for
4610example, if you say
4611
4612 $array = (1,2);
4613
4614when you should have said
4615
4616 $array = [1,2];
4617
4618The square brackets explicitly turn a list value into a scalar value,
4619while parentheses do not. So when a parenthesized list is evaluated in
4620a scalar context, the comma is treated like C's comma operator, which
4621throws away the left argument, which is not what you want. See
4622L<perlref> for more on this.
4623
65191a1e
BS
4624This warning will not be issued for numerical constants equal to 0 or 1
4625since they are often used in statements like
4626
4358a253 4627 1 while sub_with_side_effects();
65191a1e
BS
4628
4629String constants that would normally evaluate to 0 or 1 are warned
4630about.
4631
6df41af2
GS
4632=item Useless use of "re" pragma
4633
4634(W) You did C<use re;> without any arguments. That isn't very useful.
4635
a801c63c
RGS
4636=item Useless use of sort in scalar context
4637
4638(W void) You used sort in scalar context, as in :
4639
4640 my $x = sort @y;
4641
4642This is not very useful, and perl currently optimizes this away.
4643
de4864e4
JH
4644=item Useless use of %s with no values
4645
f87c3213 4646(W syntax) You used the push() or unshift() function with no arguments
de4864e4
JH
4647apart from the array, like C<push(@x)> or C<unshift(@foo)>. That won't
4648usually have any effect on the array, so is completely useless. It's
4649possible in principle that push(@tied_array) could have some effect
4650if the array is tied to a class which implements a PUSH method. If so,
4651you can write it as C<push(@tied_array,())> to avoid this warning.
4652
6df41af2
GS
4653=item "use" not allowed in expression
4654
be771a83
GS
4655(F) The "use" keyword is recognized and executed at compile time, and
4656returns no useful value. See L<perlmod>.
748a9306 4657
c47ff5f1 4658=item Use of bare << to mean <<"" is deprecated
4633a7c4 4659
83ce3e12
RGS
4660(D deprecated, W syntax) You are now encouraged to use the explicitly quoted
4661form if you wish to use an empty line as the terminator of the here-document.
4662
4663=item Use of comma-less variable list is deprecated
4664
4665(D deprecated, W syntax) The values you give to a format should be
4666separated by commas, not just aligned on a line.
4633a7c4 4667
96ebfdd7
RK
4668=item Use of chdir('') or chdir(undef) as chdir() deprecated
4669
4670(D deprecated) chdir() with no arguments is documented to change to
4671$ENV{HOME} or $ENV{LOGDIR}. chdir(undef) and chdir('') share this
4672behavior, but that has been deprecated. In future versions they
4673will simply fail.
4674
4675Be careful to check that what you pass to chdir() is defined and not
4676blank, else you might find yourself in your home directory.
4677
64e578a2
MJD
4678=item Use of /c modifier is meaningless in s///
4679
4680(W regexp) You used the /c modifier in a substitution. The /c
4681modifier is not presently meaningful in substitutions.
4682
4ac733c9
MJD
4683=item Use of /c modifier is meaningless without /g
4684
4685(W regexp) You used the /c modifier with a regex operand, but didn't
4686use the /g modifier. Currently, /c is meaningful only when /g is
4687used. (This may change in the future.)
4688
b6c83531 4689=item Use of freed value in iteration
2f7da168 4690
b6c83531
JH
4691(F) Perhaps you modified the iterated array within the loop?
4692This error is typically caused by code like the following:
2f7da168
RK
4693
4694 @a = (3,4);
4695 @a = () for (1,2,@a);
4696
4697You are not supposed to modify arrays while they are being iterated over.
4698For speed and efficiency reasons, Perl internally does not do full
4699reference-counting of iterated items, hence deleting such an item in the
4700middle of an iteration causes Perl to see a freed value.
4701
39b99f21 4702=item Use of *glob{FILEHANDLE} is deprecated
4703
4704(D deprecated) You are now encouraged to use the shorter *glob{IO} form
4705to access the filehandle slot within a typeglob.
4706
96ebfdd7 4707=item Use of /g modifier is meaningless in split
35ae6b54 4708
96ebfdd7
RK
4709(W regexp) You used the /g modifier on the pattern for a C<split>
4710operator. Since C<split> always tries to match the pattern
4711repeatedly, the C</g> has no effect.
35ae6b54 4712
a0d0e21e
LW
4713=item Use of implicit split to @_ is deprecated
4714
83ce3e12
RGS
4715(D deprecated, W syntax) It makes a lot of work for the compiler when you
4716clobber a subroutine's argument list, so it's better if you assign the results
be771a83 4717of a split() explicitly to an array (or list).
a0d0e21e 4718
dc848c6f 4719=item Use of inherited AUTOLOAD for non-method %s() is deprecated
4720
be771a83
GS
4721(D deprecated) As an (ahem) accidental feature, C<AUTOLOAD> subroutines
4722are looked up as methods (using the C<@ISA> hierarchy) even when the
4723subroutines to be autoloaded were called as plain functions (e.g.
4724C<Foo::bar()>), not as methods (e.g. C<< Foo->bar() >> or C<<
4725$obj->bar() >>).
dc848c6f 4726
be771a83
GS
4727This bug will be rectified in future by using method lookup only for
4728methods' C<AUTOLOAD>s. However, there is a significant base of existing
4729code that may be using the old behavior. So, as an interim step, Perl
4730currently issues an optional warning when non-methods use inherited
4731C<AUTOLOAD>s.
dc848c6f 4732
4733The simple rule is: Inheritance will not work when autoloading
be771a83
GS
4734non-methods. The simple fix for old code is: In any module that used
4735to depend on inheriting C<AUTOLOAD> for non-methods from a base class
4736named C<BaseClass>, execute C<*AUTOLOAD = \&BaseClass::AUTOLOAD> during
4737startup.
dc848c6f 4738
be771a83
GS
4739In code that currently says C<use AutoLoader; @ISA = qw(AutoLoader);>
4740you should remove AutoLoader from @ISA and change C<use AutoLoader;> to
7b8d334a 4741C<use AutoLoader 'AUTOLOAD';>.
fb73857a 4742
609122bd
KW
4743=item Use of octal value above 377 is deprecated
4744
4745(D deprecated, W regexp) There is a constant in the regular expression whose
4746value is interpeted by Perl as octal and larger than 377 (255 decimal, 0xFF
4747hex). Perl may take this to mean different things depending on the rest of
4748the regular expression. If you meant such an octal value, convert it to
4749hexadecimal and use C<\xHH> or C<\x{HH}> instead. If you meant to have
4750part of it mean a backreference, use C<\g> for that. See L<perlre>.
4751
6df41af2
GS
4752=item Use of %s in printf format not supported
4753
4754(F) You attempted to use a feature of printf that is accessible from
4755only C. This usually means there's a better way to do it in Perl.
4756
6df41af2
GS
4757=item Use of %s is deprecated
4758
75b44862 4759(D deprecated) The construct indicated is no longer recommended for use,
be771a83
GS
4760generally because there's a better way to do it, and also because the
4761old way has bad side effects.
6df41af2 4762
96ebfdd7
RK
4763=item Use of -l on filehandle %s
4764
4765(W io) A filehandle represents an opened file, and when you opened the file
4766it already went past any symlink you are presumably trying to look for.
4767The operation returned C<undef>. Use a filename instead.
4768
4769=item Use of "package" with no arguments is deprecated
4770
4771(D deprecated) You used the C<package> keyword without specifying a package
4772name. So no namespace is current at all. Using this can cause many
4773otherwise reasonable constructs to fail in baffling ways. C<use strict;>
4774instead.
4775
1f1cc344 4776=item Use of reference "%s" as array index
d804643f 4777
77b96956 4778(W misc) You tried to use a reference as an array index; this probably
1f1cc344
JH
4779isn't what you mean, because references in numerical context tend
4780to be huge numbers, and so usually indicates programmer error.
d804643f 4781
64977eb6 4782If you really do mean it, explicitly numify your reference, like so:
1f1cc344
JH
4783C<$array[0+$ref]>. This warning is not given for overloaded objects,
4784either, because you can overload the numification and stringification
353c6505 4785operators and then you assumably know what you are doing.
d804643f 4786
85b81015
LW
4787=item Use of reserved word "%s" is deprecated
4788
be771a83
GS
4789(D deprecated) The indicated bareword is a reserved word. Future
4790versions of perl may use it as a keyword, so you're better off either
4791explicitly quoting the word in a manner appropriate for its context of
4792use, or using a different name altogether. The warning can be
4793suppressed for subroutine names by either adding a C<&> prefix, or using
4794a package qualifier, e.g. C<&our()>, or C<Foo::our()>.
85b81015 4795
bbd7eb8a
RD
4796=item Use of tainted arguments in %s is deprecated
4797
159f47d9 4798(W taint, deprecated) You have supplied C<system()> or C<exec()> with multiple
bbd7eb8a
RD
4799arguments and at least one of them is tainted. This used to be allowed
4800but will become a fatal error in a future version of perl. Untaint your
4801arguments. See L<perlsec>.
4802
cc95b072 4803=item Use of uninitialized value%s
a0d0e21e 4804
be771a83
GS
4805(W uninitialized) An undefined value was used as if it were already
4806defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
4807To suppress this warning assign a defined value to your variables.
a0d0e21e 4808
29489e7c
DM
4809To help you figure out what was undefined, perl will try to tell you the
4810name of the variable (if any) that was undefined. In some cases it cannot
4811do this, so it also tells you what operation you used the undefined value
4812in. Note, however, that perl optimizes your program and the operation
4813displayed in the warning may not necessarily appear literally in your
4814program. For example, C<"that $foo"> is usually optimized into C<"that "
4815. $foo>, and the warning will refer to the C<concatenation (.)> operator,
4816even though there is no C<.> in your program.
e5be4a53 4817
a1063b2d
RH
4818=item Using a hash as a reference is deprecated
4819
496a33f5 4820(D deprecated) You tried to use a hash as a reference, as in
1b1f1335
NIS
4821C<< %foo->{"bar"} >> or C<< %$ref->{"hello"} >>. Versions of perl <= 5.6.1
4822used to allow this syntax, but shouldn't have. It is now deprecated, and will
496a33f5 4823be removed in a future version.
a1063b2d
RH
4824
4825=item Using an array as a reference is deprecated
4826
496a33f5 4827(D deprecated) You tried to use an array as a reference, as in
1b1f1335
NIS
4828C<< @foo->[23] >> or C<< @$ref->[99] >>. Versions of perl <= 5.6.1 used to
4829allow this syntax, but shouldn't have. It is now deprecated, and will be
496a33f5 4830removed in a future version.
a1063b2d 4831
9466bab6
JH
4832=item UTF-16 surrogate %s
4833
507b9800
JH
4834(W utf8) You tried to generate half of an UTF-16 surrogate by
4835requesting a Unicode character between the code points 0xD800 and
48360xDFFF (inclusive). That range is reserved exclusively for the use of
4837UTF-16 encoding (by having two 16-bit UCS-2 characters); but Perl
4838encodes its characters in UTF-8, so what you got is a very illegal
4839character. If you really know what you are doing you can turn off
4840this warning by C<no warnings 'utf8';>.
9466bab6 4841
68dc0745 4842=item Value of %s can be "0"; test with defined()
a6006777 4843
75b44862 4844(W misc) In a conditional expression, you used <HANDLE>, <*> (glob),
be771a83
GS
4845C<each()>, or C<readdir()> as a boolean value. Each of these constructs
4846can return a value of "0"; that would make the conditional expression
4847false, which is probably not what you intended. When using these
4848constructs in conditional expressions, test their values with the
4849C<defined> operator.
a6006777 4850
f675dbe5
CB
4851=item Value of CLI symbol "%s" too long
4852
be771a83
GS
4853(W misc) A warning peculiar to VMS. Perl tried to read the value of an
4854%ENV element from a CLI symbol table, and found a resultant string
4855longer than 1024 characters. The return value has been truncated to
48561024 characters.
f675dbe5 4857
b5c19bd7 4858=item Variable "%s" is not available
44a8e56a 4859
b5c19bd7
DM
4860(W closure) During compilation, an inner named subroutine or eval is
4861attempting to capture an outer lexical that is not currently available.
42c13b56 4862This can happen for one of two reasons. First, the outer lexical may be
b5c19bd7
DM
4863declared in an outer anonymous subroutine that has not yet been created.
4864(Remember that named subs are created at compile time, while anonymous
42c13b56 4865subs are created at run-time.) For example,
44a8e56a 4866
b5c19bd7 4867 sub { my $a; sub f { $a } }
44a8e56a 4868
b5c19bd7
DM
4869At the time that f is created, it can't capture the current value of $a,
4870since the anonymous subroutine hasn't been created yet. Conversely,
4871the following won't give a warning since the anonymous subroutine has by
4872now been created and is live:
be771a83 4873
b5c19bd7
DM
4874 sub { my $a; eval 'sub f { $a }' }->();
4875
4876The second situation is caused by an eval accessing a variable that has
4877gone out of scope, for example,
4878
4879 sub f {
4880 my $a;
4881 sub { eval '$a' }
4882 }
4883 f()->();
4884
4885Here, when the '$a' in the eval is being compiled, f() is not currently being
4886executed, so its $a is not available for capture.
44a8e56a 4887
b4581f09
JH
4888=item Variable "%s" is not imported%s
4889
4890(F) While "use strict" in effect, you referred to a global variable that
4891you apparently thought was imported from another module, because
4892something else of the same name (usually a subroutine) is exported by
4893that module. It usually means you put the wrong funny character on the
4894front of your variable.
4895
58e23c8d 4896=item Variable length lookbehind not implemented in m/%s/
b4581f09
JH
4897
4898(F) Lookbehind is allowed only for subexpressions whose length is fixed and
58e23c8d 4899known at compile time. See L<perlre>.
b4581f09
JH
4900
4901=item "%s" variable %s masks earlier declaration in same %s
4902
30c282f6 4903(W misc) A "my", "our" or "state" variable has been redeclared in the current
b4581f09
JH
4904scope or statement, effectively eliminating all access to the previous
4905instance. This is almost always a typographical error. Note that the
4906earlier variable will still exist until the end of the scope or until
4907all closure referents to it are destroyed.
4908
6df41af2
GS
4909=item Variable syntax
4910
4911(A) You've accidentally run your script through B<csh> instead
4912of Perl. Check the #! line, or manually feed your script into
4913Perl yourself.
4914
44a8e56a 4915=item Variable "%s" will not stay shared
4916
be771a83 4917(W closure) An inner (nested) I<named> subroutine is referencing a
b5c19bd7 4918lexical variable defined in an outer named subroutine.
44a8e56a 4919
b5c19bd7 4920When the inner subroutine is called, it will see the value of
be771a83
GS
4921the outer subroutine's variable as it was before and during the *first*
4922call to the outer subroutine; in this case, after the first call to the
4923outer subroutine is complete, the inner and outer subroutines will no
4924longer share a common value for the variable. In other words, the
4925variable will no longer be shared.
44a8e56a 4926
44a8e56a 4927This problem can usually be solved by making the inner subroutine
4928anonymous, using the C<sub {}> syntax. When inner anonymous subs that
b5c19bd7 4929reference variables in outer subroutines are created, they
be771a83 4930are automatically rebound to the current values of such variables.
44a8e56a 4931
e2e6a0f1
YO
4932=item Verb pattern '%s' has a mandatory argument in regex; marked by <-- HERE in m/%s/
4933
4934(F) You used a verb pattern that requires an argument. Supply an argument
4935or check that you are using the right verb.
4936
4937=item Verb pattern '%s' may not have an argument in regex; marked by <-- HERE in m/%s/
4938
4939(F) You used a verb pattern that is not allowed an argument. Remove the
4940argument or check that you are using the right verb.
4941
084610c0
GS
4942=item Version number must be a constant number
4943
4944(P) The attempt to translate a C<use Module n.n LIST> statement into
4945its equivalent C<BEGIN> block found an internal inconsistency with
4946the version number.
4947
808ee47e
SP
4948=item Version string '%s' contains invalid data; ignoring: '%s'
4949
32e998fd
RGS
4950(W misc) The version string contains invalid characters at the end, which
4951are being ignored.
808ee47e 4952
7e1af8bc 4953=item Warning: something's wrong
5f05dabc 4954
4955(W) You passed warn() an empty string (the equivalent of C<warn "">) or
ec8bb14c 4956you called it with no args and C<$@> was empty.
5f05dabc 4957
f86702cc 4958=item Warning: unable to close filehandle %s properly
a0d0e21e 4959
be771a83
GS
4960(S) The implicit close() done by an open() got an error indication on
4961the close(). This usually indicates your file system ran out of disk
4962space.
a0d0e21e 4963
5f05dabc 4964=item Warning: Use of "%s" without parentheses is ambiguous
a0d0e21e 4965
be771a83
GS
4966(S ambiguous) You wrote a unary operator followed by something that
4967looks like a binary operator that could also have been interpreted as a
4968term or unary operator. For instance, if you know that the rand
4969function has a default argument of 1.0, and you write
a0d0e21e
LW
4970
4971 rand + 5;
4972
4973you may THINK you wrote the same thing as
4974
4975 rand() + 5;
4976
4977but in actual fact, you got
4978
4979 rand(+5);
4980
5f05dabc 4981So put in parentheses to say what you really mean.
a0d0e21e 4982
4b3603a4
JH
4983=item Wide character in %s
4984
c8f79457 4985(S utf8) Perl met a wide character (>255) when it wasn't expecting
cd28123a
JH
4986one. This warning is by default on for I/O (like print). The easiest
4987way to quiet this warning is simply to add the C<:utf8> layer to the
4988output, e.g. C<binmode STDOUT, ':utf8'>. Another way to turn off the
4989warning is to add C<no warnings 'utf8';> but that is often closer to
4990cheating. In general, you are supposed to explicitly mark the
4991filehandle with an encoding, see L<open> and L<perlfunc/binmode>.
4b3603a4 4992
49704364
WL
4993=item Within []-length '%c' not allowed
4994
4995(F) The count in the (un)pack template may be replaced by C<[TEMPLATE]> only if
4996C<TEMPLATE> always matches the same amount of packed bytes that can be
4997determined from the template alone. This is not possible if it contains an
4998of the codes @, /, U, u, w or a *-length. Redesign the template.
4999
9a7dcd9c 5000=item write() on closed filehandle %s
a0d0e21e 5001
be771a83 5002(W closed) The filehandle you're writing to got itself closed sometime
c289d2f7 5003before now. Check your control flow.
a0d0e21e 5004
b4581f09
JH
5005=item %s "\x%s" does not map to Unicode
5006
5007When reading in different encodings Perl tries to map everything
5008into Unicode characters. The bytes you read in are not legal in
5009this encoding, for example
5010
5011 utf8 "\xE4" does not map to Unicode
5012
5013if you try to read in the a-diaereses Latin-1 as UTF-8.
5014
49704364 5015=item 'X' outside of string
a0d0e21e 5016
49704364
WL
5017(F) You had a (un)pack template that specified a relative position before
5018the beginning of the string being (un)packed. See L<perlfunc/pack>.
a0d0e21e 5019
49704364 5020=item 'x' outside of string in unpack
a0d0e21e
LW
5021
5022(F) You had a pack template that specified a relative position after
5023the end of the string being unpacked. See L<perlfunc/pack>.
5024
a0d0e21e
LW
5025=item YOU HAVEN'T DISABLED SET-ID SCRIPTS IN THE KERNEL YET!
5026
5f05dabc 5027(F) And you probably never will, because you probably don't have the
a0d0e21e 5028sources to your kernel, and your vendor probably doesn't give a rip
1b1f1335 5029about what you want. Your best bet is to put a setuid C wrapper around
496a33f5 5030your script.
a0d0e21e
LW
5031
5032=item You need to quote "%s"
5033
be771a83
GS
5034(W syntax) You assigned a bareword as a signal handler name.
5035Unfortunately, you already have a subroutine of that name declared,
5036which means that Perl 5 will try to call the subroutine when the
5037assignment is executed, which is probably not what you want. (If it IS
5038what you want, put an & in front.)
a0d0e21e 5039
6cfd5ea7
JH
5040=item Your random numbers are not that random
5041
5042(F) When trying to initialise the random seed for hashes, Perl could
5043not get any randomness out of your system. This usually indicates
5044Something Very Wrong.
5045
a0d0e21e
LW
5046=back
5047
00eb3f2b
RGS
5048=head1 SEE ALSO
5049
5050L<warnings>, L<perllexwarn>.
5051
56e90b21 5052=cut