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