This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
typo, doc tweak
[perl5.git] / pod / perldiag.pod
CommitLineData
a0d0e21e
LW
1=head1 NAME
2
3perldiag - various Perl diagnostics
4
5=head1 DESCRIPTION
6
7These messages are classified as follows (listed in increasing order of
8desperation):
9
10 (W) A warning (optional).
11 (D) A deprecation (optional).
12 (S) A severe warning (mandatory).
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
748a9306 18Optional warnings are enabled by using the B<-w> switch. Warnings may
68dc0745
PP
19be captured by setting C<$SIG{__WARN__}> to a reference to a routine that
20will be called on each warning instead of printing it. See L<perlvar>.
4438c4b7 21
748a9306 22Trappable errors may be trapped using the eval operator. See
4438c4b7
JH
23L<perlfunc/eval>. In almost all cases, warnings may be selectively
24disabled or promoted to fatal errors using the C<warnings> pragma.
25See L<warnings>.
a0d0e21e
LW
26
27Some of these messages are generic. Spots that vary are denoted with a %s,
2ba9eb46 28just as in a printf format. Note that some messages start with a %s!
10f9c03d
CK
29Since the messages are listed in alphabetical order, the symbols
30C<"%(-?@> sort before the letters, while C<[> and C<\> sort after.
a0d0e21e
LW
31
32=over 4
33
09bef843
SB
34=item "my sub" not yet implemented
35
36(F) Lexically scoped subroutines are not yet implemented. Don't try that
37yet.
38
a0d0e21e
LW
39=item "my" variable %s can't be in a package
40
41(F) Lexically scoped variables aren't in a package, so it doesn't make sense
42to try to declare one with a package qualifier on the front. Use local()
43if you want to localize a package variable.
44
9fbbe825 45=item "my" variable %s masks earlier declaration in same %s
2ba9eb46 46
9fbbe825
GS
47(W) A lexical variable has been redeclared in the current scope or statement,
48effectively eliminating all access to the previous instance. This is almost
49always a typographical error. Note that the earlier variable will still exist
2ba9eb46
PP
50until the end of the scope or until all closure referents to it are
51destroyed.
52
a0d0e21e
LW
53=item "no" not allowed in expression
54
55(F) The "no" keyword is recognized and executed at compile time, and returns
56no useful value. See L<perlmod>.
57
58=item "use" not allowed in expression
59
60(F) The "use" keyword is recognized and executed at compile time, and returns
61no useful value. See L<perlmod>.
62
f61d411c 63=item '!' allowed only after types %s
ef54e1a4 64
f61d411c
JH
65(F) The '!' is allowed in pack() and unpack() only after certain types.
66See L<perlfunc/pack>.
ef54e1a4 67
17f4a12d 68=item / cannot take a count
43192e07
IP
69
70(F) You had an unpack template indicating a counted-length string,
71but you have also specified an explicit size for the string.
72See L<perlfunc/pack>.
73
17f4a12d 74=item / must be followed by a, A or Z
43192e07
IP
75
76(F) You had an unpack template indicating a counted-length string,
77which must be followed by one of the letters a, A or Z
78to indicate what sort of string is to be unpacked.
79See L<perlfunc/pack>.
80
17f4a12d 81=item / must be followed by a*, A* or Z*
43192e07 82
437784d6 83(F) You had a pack template indicating a counted-length string,
43192e07
IP
84Currently the only things that can have their length counted are a*, A* or Z*.
85See L<perlfunc/pack>.
86
17f4a12d 87=item / must follow a numeric type
43192e07
IP
88
89(F) You had an unpack template that contained a '#',
90but this did not follow some numeric unpack specification.
91See L<perlfunc/pack>.
92
a0d0e21e
LW
93=item % may only be used in unpack
94
5f05dabc 95(F) You can't pack a string by supplying a checksum, because the
a0d0e21e
LW
96checksumming process loses information, and you can't go the other
97way. See L<perlfunc/unpack>.
98
06387354
NT
99=item Repeat count in pack overflows
100
101(F) You can't specify a repeat count so large that it overflows
102your signed integers. See L<perlfunc/pack>.
103
104=item Repeat count in unpack overflows
105
106(F) You can't specify a repeat count so large that it overflows
107your signed integers. See L<perlfunc/unpack>.
108
c9f97d15
IZ
109=item /%s/: Unrecognized escape \\%c passed through
110
111(W) You used a backslash-character combination which is not recognized
112by Perl. This combination appears in an interpolated variable or a
1028017a
JH
113C<'>-delimited regular expression. The character was understood literally.
114
115=item /%s/: Unrecognized escape \\%c in character class passed through
116
117(W) You used a backslash-character combination which is not recognized
118by Perl inside character classes. The character was understood literally.
c9f97d15 119
eb6e2d6f
GS
120=item /%s/ should probably be written as "%s"
121
122(W) You have used a pattern where Perl expected to find a string,
437784d6 123as in the first argument to C<join>. Perl will treat the true
eb6e2d6f
GS
124or false result of matching the pattern against $_ as the string,
125which is probably not what you had in mind.
126
a0d0e21e
LW
127=item %s (...) interpreted as function
128
129(W) You've run afoul of the rule that says that any list operator followed
8b1a09fc 130by parentheses turns into a function, with all the list operators arguments
5f05dabc 131found inside the parentheses. See L<perlop/Terms and List Operators (Leftward)>.
a0d0e21e 132
76cd736e
GS
133=item %s() called too early to check prototype
134
135(W) You've called a function that has a prototype before the parser saw a
136definition or declaration for it, and Perl could not check that the call
137conforms to the prototype. You need to either add an early prototype
138declaration for the subroutine in question, or move the subroutine
139definition ahead of the call to get proper prototype checking. Alternatively,
140if you are certain that you're calling the function correctly, you may put
141an ampersand before the name to avoid the warning. See L<perlsub>.
142
a0d0e21e
LW
143=item %s argument is not a HASH element
144
5f05dabc 145(F) The argument to exists() must be a hash element, such as
a0d0e21e
LW
146
147 $foo{$bar}
148 $ref->[12]->{"susie"}
149
5f05dabc
PP
150=item %s argument is not a HASH element or slice
151
152(F) The argument to delete() must be either a hash element, such as
153
154 $foo{$bar}
155 $ref->[12]->{"susie"}
156
157or a hash slice, such as
158
159 @foo{$bar, $baz, $xyzzy}
160 @{$ref->[12]}{"susie", "queue"}
161
a0d0e21e
LW
162=item %s did not return a true value
163
164(F) A required (or used) file must return a true value to indicate that
165it compiled correctly and ran its initialization code correctly. It's
166traditional to end such a file with a "1;", though any true value would
167do. See L<perlfunc/require>.
168
169=item %s found where operator expected
170
171(S) The Perl lexer knows whether to expect a term or an operator. If it
172sees what it knows to be a term when it was expecting to see an operator,
173it gives you this warning. Usually it indicates that an operator or
174delimiter was omitted, such as a semicolon.
175
f86702cc 176=item %s had compilation errors
a0d0e21e
LW
177
178(F) The final summary message when a C<perl -c> fails.
179
f86702cc 180=item %s has too many errors
a0d0e21e
LW
181
182(F) The parser has given up trying to parse the program after 10 errors.
183Further error messages would likely be uninformative.
184
185=item %s matches null string many times
186
187(W) The pattern you've specified would be an infinite loop if the
188regular expression engine didn't specifically check for that. See L<perlre>.
189
190=item %s never introduced
191
192(S) The symbol in question was declared but somehow went out of scope
193before it could possibly have been used.
194
09bef843
SB
195=item %s package attribute may clash with future reserved word: %s
196
197(W) A lowercase attribute name was used that had a package-specific handler.
198That name might have a meaning to Perl itself some day, even though it
199doesn't yet. Perhaps you should use a mixed-case attribute name, instead.
200See L<attributes>.
201
a0d0e21e
LW
202=item %s syntax OK
203
204(F) The final summary message when a C<perl -c> succeeds.
205
f86702cc 206=item %s: Command not found
cb1a09d0
AD
207
208(A) You've accidentally run your script through B<csh> instead
3a52c276
CS
209of Perl. Check the #! line, or manually feed your script into
210Perl yourself.
cb1a09d0 211
f86702cc 212=item %s: Expression syntax
cb1a09d0
AD
213
214(A) You've accidentally run your script through B<csh> instead
3a52c276
CS
215of Perl. Check the #! line, or manually feed your script into
216Perl yourself.
cb1a09d0 217
f86702cc 218=item %s: Undefined variable
cb1a09d0
AD
219
220(A) You've accidentally run your script through B<csh> instead
3a52c276
CS
221of Perl. Check the #! line, or manually feed your script into
222Perl yourself.
cb1a09d0
AD
223
224=item %s: not found
225
8b1a09fc 226(A) You've accidentally run your script through the Bourne shell
3a52c276 227instead of Perl. Check the #! line, or manually feed your script
cb1a09d0
AD
228into Perl yourself.
229
a99e4ac2
GS
230=item (in cleanup) %s
231
232(W) This prefix usually indicates that a DESTROY() method raised
233the indicated exception. Since destructors are usually called by
234the system at arbitrary points during execution, and often a vast
235number of times, the warning is issued only once for any number
236of failures that would otherwise result in the same message being
237repeated.
238
239Failure of user callbacks dispatched using the C<G_KEEPERR> flag
240could also result in this warning. See L<perlcall/G_KEEPERR>.
241
702d120d
G
242=item (Missing semicolon on previous line?)
243
244(S) This is an educated guess made in conjunction with the message "%s
245found where operator expected". Don't automatically put a semicolon on
246the previous line just because you saw this message.
247
a0d0e21e
LW
248=item B<-P> not allowed for setuid/setgid script
249
250(F) The script would have to be opened by the C preprocessor by name,
251which provides a race condition that breaks security.
252
253=item C<-T> and C<-B> not implemented on filehandles
254
255(F) Perl can't peek at the stdio buffer of filehandles when it doesn't
256know about your kind of stdio. You'll have to use a filename instead.
257
08e9d68e
DD
258=item C<-p> destination: %s
259
260(F) An error occurred during the implicit output invoked by the C<-p>
261command-line switch. (This output goes to STDOUT unless you've
262redirected it with select().)
263
a5f75d66
AD
264=item 500 Server error
265
266See Server error.
267
a0d0e21e
LW
268=item ?+* follows nothing in regexp
269
270(F) You started a regular expression with a quantifier. Backslash it
271if you meant it literally. See L<perlre>.
272
273=item @ outside of string
274
2ba9eb46 275(F) You had a pack template that specified an absolute position outside
a0d0e21e
LW
276the string being unpacked. See L<perlfunc/pack>.
277
742c16d1
MJD
278=item <> should be quotes
279
280(F) You wrote C<require E<lt>fileE<gt>> when you should have written
281C<require 'file'>.
282
a0d0e21e
LW
283=item accept() on closed fd
284
285(W) You tried to do an accept on a closed socket. Did you forget to check
286the return value of your socket() call? See L<perlfunc/accept>.
287
288=item Allocation too large: %lx
289
54310121 290(X) You can't allocate more than 64K on an MS-DOS machine.
55497cff 291
2ae324a7
PP
292=item Applying %s to %s will act on scalar(%s)
293
2c268ad5 294(W) The pattern match (//), substitution (s///), and transliteration (tr///)
2ae324a7
PP
295operators work on scalar values. If you apply one of them to an array
296or a hash, it will convert the array or hash to a scalar value -- the
297length of an array, or the population info of a hash -- and then work on
298that scalar value. This is probably not what you meant to do. See
299L<perlfunc/grep> and L<perlfunc/map> for alternatives.
300
a0d0e21e
LW
301=item Arg too short for msgsnd
302
303(F) msgsnd() requires a string at least as long as sizeof(long).
304
748a9306
LW
305=item Ambiguous use of %s resolved as %s
306
307(W)(S) You said something that may not be interpreted the way
308you thought. Normally it's pretty easy to disambiguate it by supplying
5f05dabc 309a missing quote, operator, parenthesis pair or declaration.
748a9306 310
5315574d
GS
311=item Ambiguous call resolved as CORE::%s(), qualify as such or use &
312
313(W) A subroutine you have declared has the same name as a Perl keyword,
314and you have used the name without qualification for calling one or the
315other. Perl decided to call the builtin because the subroutine is
316not imported.
317
318To force interpretation as a subroutine call, either put an ampersand
319before the subroutine name, or qualify the name with its package.
320Alternatively, you can import the subroutine (or pretend that it's
321imported with the C<use subs> pragma).
322
323To silently interpret it as the Perl operator, use the C<CORE::> prefix
324on the operator (e.g. C<CORE::log($x)>) or by declaring the subroutine
09bef843
SB
325to be an object method (see L<perlsub/"Subroutine Attributes">
326or L<attributes>).
5315574d 327
a0d0e21e
LW
328=item Args must match #! line
329
330(F) The setuid emulator requires that the arguments Perl was invoked
3a52c276
CS
331with match the arguments specified on the #! line. Since some systems
332impose a one-argument limit on the #! line, try combining switches;
333for example, turn C<-w -U> into C<-wU>.
a0d0e21e 334
f86702cc 335=item Argument "%s" isn't numeric%s
a0d0e21e
LW
336
337(W) The indicated string was fed as an argument to an operator that
338expected a numeric value instead. If you're fortunate the message
339will identify which operator was so unfortunate.
340
341=item Array @%s missing the @ in argument %d of %s()
342
343(D) Really old Perl let you omit the @ on array names in some spots. This
344is now heavily deprecated.
345
346=item assertion botched: %s
347
348(P) The malloc package that comes with Perl had an internal failure.
349
350=item Assertion failed: file "%s"
351
352(P) A general assertion failed. The file in question must be examined.
353
354=item Assignment to both a list and a scalar
355
356(F) If you assign to a conditional operator, the 2nd and 3rd arguments
357must either both be scalars or both be lists. Otherwise Perl won't
358know which context to supply to the right side.
359
360=item Attempt to free non-arena SV: 0x%lx
361
362(P) All SV objects are supposed to be allocated from arenas that will
363be garbage collected on exit. An SV was discovered to be outside any
364of those arenas.
365
54310121 366=item Attempt to free nonexistent shared string
bbce6d69
PP
367
368(P) Perl maintains a reference counted internal table of strings to
369optimize the storage and access of hash keys and other strings. This
370indicates someone tried to decrement the reference count of a string
371that can no longer be found in the table.
372
a0d0e21e
LW
373=item Attempt to free temp prematurely
374
375(W) Mortalized values are supposed to be freed by the free_tmps()
376routine. This indicates that something else is freeing the SV before
377the free_tmps() routine gets a chance, which means that the free_tmps()
378routine will be freeing an unreferenced scalar when it does try to free
379it.
380
381=item Attempt to free unreferenced glob pointers
382
383(P) The reference counts got screwed up on symbol aliases.
384
385=item Attempt to free unreferenced scalar
386
387(W) Perl went to decrement the reference count of a scalar to see if it
388would go to 0, and discovered that it had already gone to 0 earlier,
389and should have been freed, and in fact, probably was freed. This
390could indicate that SvREFCNT_dec() was called too many times, or that
391SvREFCNT_inc() was called too few times, or that the SV was mortalized
392when it shouldn't have been, or that memory has been corrupted.
393
dcdda58d
GS
394=item Attempt to join self
395
396(F) You tried to join a thread from within itself, which is an
397impossible task. You may be joining the wrong thread, or you may
398need to move the join() to some other thread.
399
84902520
TB
400=item Attempt to pack pointer to temporary value
401
402(W) You tried to pass a temporary value (like the result of a
403function, or a computed expression) to the "p" pack() template. This
404means the result contains a pointer to a location that could become
405invalid anytime, even before the end of the current statement. Use
406literals or global values as arguments to the "p" pack() template to
407avoid this warning.
408
b7a902f4
PP
409=item Attempt to use reference as lvalue in substr
410
411(W) You supplied a reference as the first argument to substr() used
8b1a09fc 412as an lvalue, which is pretty strange. Perhaps you forgot to
b7a902f4
PP
413dereference it first. See L<perlfunc/substr>.
414
a0d0e21e
LW
415=item Bad arg length for %s, is %d, should be %d
416
417(F) You passed a buffer of the wrong size to one of msgctl(), semctl() or
2ba9eb46 418shmctl(). In C parlance, the correct sizes are, respectively,
5f05dabc 419S<sizeof(struct msqid_ds *)>, S<sizeof(struct semid_ds *)>, and
a0d0e21e
LW
420S<sizeof(struct shmid_ds *)>.
421
a0d0e21e
LW
422=item Bad filehandle: %s
423
424(F) A symbol was passed to something wanting a filehandle, but the symbol
425has no filehandle associated with it. Perhaps you didn't do an open(), or
426did it in another package.
427
428=item Bad free() ignored
429
430(S) An internal routine called free() on something that had never been
33c8a3fe
IZ
431malloc()ed in the first place. Mandatory, but can be disabled by
432setting environment variable C<PERL_BADFREE> to 1.
433
434This message can be quite often seen with DB_File on systems with
435"hard" dynamic linking, like C<AIX> and C<OS/2>. It is a bug of
436C<Berkeley DB> which is left unnoticed if C<DB> uses I<forgiving>
437system malloc().
a0d0e21e 438
aa689395
PP
439=item Bad hash
440
441(P) One of the internal hash routines was passed a null HV pointer.
442
f1192cee
GA
443=item Bad index while coercing array into hash
444
6f54a448
GS
445(F) The index looked up in the hash found as the 0'th element of a
446pseudo-hash is not legal. Index values must be at 1 or greater.
447See L<perlref>.
57079c46 448
a0d0e21e
LW
449=item Bad name after %s::
450
451(F) You started to name a symbol by using a package prefix, and then didn't
452finish the symbol. In particular, you can't interpolate outside of quotes,
453so
454
455 $var = 'myvar';
456 $sym = mypack::$var;
457
458is not the same as
459
460 $var = 'myvar';
461 $sym = "mypack::$var";
462
4ad56ec9
IZ
463=item Bad realloc() ignored
464
465(S) An internal routine called realloc() on something that had never been
466malloc()ed in the first place. Mandatory, but can be disabled by
467setting environment variable C<PERL_BADFREE> to 1.
468
a0d0e21e
LW
469=item Bad symbol for array
470
471(P) An internal request asked to add an array entry to something that
472wasn't a symbol table entry.
473
474=item Bad symbol for filehandle
475
476(P) An internal request asked to add a filehandle entry to something that
477wasn't a symbol table entry.
478
479=item Bad symbol for hash
480
481(P) An internal request asked to add a hash entry to something that
482wasn't a symbol table entry.
483
8b1a09fc 484=item Badly placed ()'s
cb1a09d0
AD
485
486(A) You've accidentally run your script through B<csh> instead
3a52c276
CS
487of Perl. Check the #! line, or manually feed your script into
488Perl yourself.
cb1a09d0 489
3fe9a6f1
PP
490=item Bareword "%s" not allowed while "strict subs" in use
491
492(F) With "strict subs" in use, a bareword is only allowed as a
d98d5fff 493subroutine identifier, in curly brackets or to the left of the "=>" symbol.
54310121 494Perhaps you need to predeclare a subroutine?
3fe9a6f1 495
c3e0f903
GS
496=item Bareword "%s" refers to nonexistent package
497
498(W) You used a qualified bareword of the form C<Foo::>, but
499the compiler saw no other uses of that namespace before that point.
500Perhaps you need to predeclare a package?
501
a0d0e21e
LW
502=item BEGIN failed--compilation aborted
503
504(F) An untrapped exception was raised while executing a BEGIN subroutine.
505Compilation stops immediately and the interpreter is exited.
506
68dc0745
PP
507=item BEGIN not safe after errors--compilation aborted
508
509(F) Perl found a C<BEGIN {}> subroutine (or a C<use> directive, which
510implies a C<BEGIN {}>) after one or more compilation errors had
511already occurred. Since the intended environment for the C<BEGIN {}>
512could not be guaranteed (due to the errors), and since subsequent code
513likely depends on its correct operation, Perl just gave up.
514
252aa082
JH
515=item Binary number > 0b11111111111111111111111111111111 non-portable
516
9e24b6e2
JH
517(W) The binary number you specified is larger than 2**32-1
518(4294967295) and therefore non-portable between systems. See
519L<perlport> for more on portability concerns.
252aa082 520
a0d0e21e
LW
521=item bind() on closed fd
522
523(W) You tried to do a bind on a closed socket. Did you forget to check
524the return value of your socket() call? See L<perlfunc/bind>.
525
c5a0f51a
JH
526=item Bit vector size > 32 non-portable
527
528(W) Using bit vector sizes larger than 32 is non-portable.
529
4633a7c4
LW
530=item Bizarre copy of %s in %s
531
532(P) Perl detected an attempt to copy an internal value that is not copiable.
533
f675dbe5
CB
534=item Buffer overflow in prime_env_iter: %s
535
536(W) A warning peculiar to VMS. While Perl was preparing to iterate over
537%ENV, it encountered a logical name or symbol definition which was too long,
538so it was truncated to the string shown.
539
a0d0e21e
LW
540=item Callback called exit
541
542(F) A subroutine invoked from an external package via perl_call_sv()
543exited by calling exit.
544
0a753a76
PP
545=item Can't "goto" outside a block
546
547(F) A "goto" statement was executed to jump out of what might look
548like a block, except that it isn't a proper block. This usually
549occurs if you tried to jump out of a sort() block or subroutine, which
550is a no-no. See L<perlfunc/goto>.
551
84902520
TB
552=item Can't "goto" into the middle of a foreach loop
553
554(F) A "goto" statement was executed to jump into the middle of a
555foreach loop. You can't get there from here. See L<perlfunc/goto>.
556
a0d0e21e
LW
557=item Can't "last" outside a block
558
559(F) A "last" statement was executed to break out of the current block,
560except that there's this itty bitty problem called there isn't a
561current block. Note that an "if" or "else" block doesn't count as a
0a753a76
PP
562"loopish" block, as doesn't a block given to sort(). You can usually double
563the curlies to get the same effect though, because the inner curlies
564will be considered a block that loops once. See L<perlfunc/last>.
a0d0e21e
LW
565
566=item Can't "next" outside a block
567
568(F) A "next" statement was executed to reiterate the current block, but
569there isn't a current block. Note that an "if" or "else" block doesn't
0a753a76
PP
570count as a "loopish" block, as doesn't a block given to sort(). You can
571usually double the curlies to get the same effect though, because the inner
54310121 572curlies will be considered a block that loops once. See L<perlfunc/next>.
a0d0e21e 573
f675dbe5
CB
574=item Can't read CRTL environ
575
576(S) A warning peculiar to VMS. Perl tried to read an element of %ENV
577from the CRTL's internal environment array and discovered the array was
578missing. You need to figure out where your CRTL misplaced its environ
579or define F<PERL_ENV_TABLES> (see L<perlvms>) so that environ is not searched.
580
a0d0e21e
LW
581=item Can't "redo" outside a block
582
583(F) A "redo" statement was executed to restart the current block, but
584there isn't a current block. Note that an "if" or "else" block doesn't
0a753a76
PP
585count as a "loopish" block, as doesn't a block given to sort(). You can
586usually double the curlies to get the same effect though, because the inner
54310121 587curlies will be considered a block that loops once. See L<perlfunc/redo>.
a0d0e21e
LW
588
589=item Can't bless non-reference value
590
591(F) Only hard references may be blessed. This is how Perl "enforces"
592encapsulation of objects. See L<perlobj>.
593
594=item Can't break at that line
595
54310121 596(S) A warning intended to only be printed while running within the debugger, indicating
a0d0e21e
LW
597the line number specified wasn't the location of a statement that could
598be stopped at.
599
600=item Can't call method "%s" in empty package "%s"
601
602(F) You called a method correctly, and it correctly indicated a package
603functioning as a class, but that package doesn't have ANYTHING defined
604in it, let alone methods. See L<perlobj>.
605
606=item Can't call method "%s" on unblessed reference
607
54310121 608(F) A method call must know in what package it's supposed to run. It
a0d0e21e
LW
609ordinarily finds this out from the object reference you supply, but
610you didn't supply an object reference in this case. A reference isn't
611an object reference until it has been blessed. See L<perlobj>.
612
613=item Can't call method "%s" without a package or object reference
614
615(F) You used the syntax of a method call, but the slot filled by the
616object reference or package name contains an expression that returns
72b5445b
GS
617a defined value which is neither an object reference nor a package name.
618Something like this will reproduce the error:
619
620 $BADREF = 42;
621 process $BADREF 1,2,3;
622 $BADREF->process(1,2,3);
623
624=item Can't call method "%s" on an undefined value
625
626(F) You used the syntax of a method call, but the slot filled by the
627object reference or package name contains an undefined value.
a0d0e21e
LW
628Something like this will reproduce the error:
629
630 $BADREF = undef;
631 process $BADREF 1,2,3;
632 $BADREF->process(1,2,3);
633
634=item Can't chdir to %s
635
636(F) You called C<perl -x/foo/bar>, but C</foo/bar> is not a directory
637that you can chdir to, possibly because it doesn't exist.
638
104d25b7
JH
639=item Can't check filesystem of script "%s"
640
641(P) For some reason you can't check the filesystem of the script for nosuid.
642
a0d0e21e
LW
643=item Can't coerce %s to integer in %s
644
645(F) Certain types of SVs, in particular real symbol table entries
55497cff 646(typeglobs), can't be forced to stop being what they are. So you can't
a0d0e21e
LW
647say things like:
648
649 *foo += 1;
650
651You CAN say
652
653 $foo = *foo;
654 $foo += 1;
655
656but then $foo no longer contains a glob.
657
658=item Can't coerce %s to number in %s
659
660(F) Certain types of SVs, in particular real symbol table entries
55497cff 661(typeglobs), can't be forced to stop being what they are.
a0d0e21e
LW
662
663=item Can't coerce %s to string in %s
664
665(F) Certain types of SVs, in particular real symbol table entries
55497cff 666(typeglobs), can't be forced to stop being what they are.
a0d0e21e 667
57079c46
GA
668=item Can't coerce array into hash
669
670(F) You used an array where a hash was expected, but the array has no
671information on how to map from keys to array indices. You can do that
672only with arrays that have a hash reference at index 0.
673
a0d0e21e
LW
674=item Can't create pipe mailbox
675
748a9306
LW
676(P) An error peculiar to VMS. The process is suffering from exhausted quotas
677or other plumbing problems.
a0d0e21e
LW
678
679=item Can't declare %s in my
680
5f05dabc 681(F) Only scalar, array, and hash variables may be declared as lexical variables.
a0d0e21e
LW
682They must have ordinary identifiers as names.
683
684=item Can't do inplace edit on %s: %s
685
686(S) The creation of the new file failed for the indicated reason.
687
54310121 688=item Can't do inplace edit without backup
a0d0e21e 689
54310121 690(F) You're on a system such as MS-DOS that gets confused if you try reading
3fe9a6f1 691from a deleted (but still opened) file. You have to say C<-i.bak>, or some
a0d0e21e
LW
692such.
693
10f9c03d 694=item Can't do inplace edit: %s would not be unique
a0d0e21e 695
10f9c03d
CK
696(S) Your filesystem does not support filenames longer than 14
697characters and Perl was unable to create a unique filename during
698inplace editing with the B<-i> switch. The file was ignored.
a0d0e21e
LW
699
700=item Can't do inplace edit: %s is not a regular file
701
702(S) You tried to use the B<-i> switch on a special file, such as a file in
703/dev, or a FIFO. The file was ignored.
704
705=item Can't do setegid!
706
707(P) The setegid() call failed for some reason in the setuid emulator
708of suidperl.
709
710=item Can't do seteuid!
711
712(P) The setuid emulator of suidperl failed for some reason.
713
714=item Can't do setuid
715
716(F) This typically means that ordinary perl tried to exec suidperl to
717do setuid emulation, but couldn't exec it. It looks for a name of the
718form sperl5.000 in the same directory that the perl executable resides
719under the name perl5.000, typically /usr/local/bin on Unix machines.
720If the file is there, check the execute permissions. If it isn't, ask
721your sysadmin why he and/or she removed it.
722
723=item Can't do waitpid with flags
724
725(F) This machine doesn't have either waitpid() or wait4(), so only waitpid()
726without flags is emulated.
727
8b1a09fc 728=item Can't do {n,m} with n E<gt> m
a0d0e21e
LW
729
730(F) Minima must be less than or equal to maxima. If you really want
731your regexp to match something 0 times, just put {0}. See L<perlre>.
732
733=item Can't emulate -%s on #! line
734
735(F) The #! line specifies a switch that doesn't make sense at this point.
736For example, it'd be kind of silly to put a B<-x> on the #! line.
737
738=item Can't exec "%s": %s
739
5f05dabc 740(W) An system(), exec(), or piped open call could not execute the named
a0d0e21e
LW
741program for the indicated reason. Typical reasons include: the permissions
742were wrong on the file, the file wasn't found in C<$ENV{PATH}>, the
743executable in question was compiled for another architecture, or the
744#! line in a script points to an interpreter that can't be run for
745similar reasons. (Or maybe your system doesn't support #! at all.)
746
747=item Can't exec %s
748
749(F) Perl was trying to execute the indicated program for you because that's
750what the #! line said. If that's not what you wanted, you may need to
751mention "perl" on the #! line somewhere.
752
753=item Can't execute %s
754
2a92aaa0
GS
755(F) You used the B<-S> switch, but the copies of the script to execute found
756in the PATH did not have correct permissions.
757
758=item Can't find %s on PATH, '.' not in PATH
759
760(F) You used the B<-S> switch, but the script to execute could not be found
761in the PATH, or at least not with the correct permissions. The script
762exists in the current directory, but PATH prohibits running it.
763
764=item Can't find %s on PATH
765
a0d0e21e 766(F) You used the B<-S> switch, but the script to execute could not be found
2a92aaa0 767in the PATH.
a0d0e21e
LW
768
769=item Can't find label %s
770
771(F) You said to goto a label that isn't mentioned anywhere that it's possible
772for us to go to. See L<perlfunc/goto>.
773
774=item Can't find string terminator %s anywhere before EOF
775
776(F) Perl strings can stretch over multiple lines. This message means that
5f05dabc 777the closing delimiter was omitted. Because bracketed quotes count nesting
a0d0e21e
LW
778levels, the following is missing its final parenthesis:
779
fb73857a
PP
780 print q(The character '(' starts a side comment.);
781
782If you're getting this error from a here-document, you may have
783included unseen whitespace before or after your closing tag. A good
784programmer's editor will have a way to help you find these characters.
a0d0e21e
LW
785
786=item Can't fork
787
788(F) A fatal error occurred while trying to fork while opening a pipeline.
789
748a9306
LW
790=item Can't get filespec - stale stat buffer?
791
792(S) A warning peculiar to VMS. This arises because of the difference between
793access checks under VMS and under the Unix model Perl assumes. Under VMS,
794access checks are done by filename, rather than by bits in the stat buffer, so
795that ACLs and other protections can be taken into account. Unfortunately, Perl
796assumes that the stat buffer contains all the necessary information, and passes
797it, instead of the filespec, to the access checking routine. It will try to
798retrieve the filespec using the device name and FID present in the stat buffer,
799but this works only if you haven't made a subsequent call to the CRTL stat()
5f05dabc 800routine, because the device name is overwritten with each call. If this warning
748a9306
LW
801appears, the name lookup failed, and the access checking routine gave up and
802returned FALSE, just to be conservative. (Note: The access checking routine
803knows about the Perl C<stat> operator and file tests, so you shouldn't ever
804see this warning in response to a Perl command; it arises only if some internal
805code takes stat buffers lightly.)
806
a0d0e21e
LW
807=item Can't get pipe mailbox device name
808
748a9306
LW
809(P) An error peculiar to VMS. After creating a mailbox to act as a pipe, Perl
810can't retrieve its name for later use.
a0d0e21e
LW
811
812=item Can't get SYSGEN parameter value for MAXBUF
813
748a9306
LW
814(P) An error peculiar to VMS. Perl asked $GETSYI how big you want your
815mailbox buffers to be, and didn't get an answer.
a0d0e21e
LW
816
817=item Can't goto subroutine outside a subroutine
818
819(F) The deeply magical "goto subroutine" call can only replace one subroutine
820call for another. It can't manufacture one out of whole cloth. In general
5f05dabc 821you should be calling it out of only an AUTOLOAD routine anyway. See
a0d0e21e
LW
822L<perlfunc/goto>.
823
b150fb22
RH
824=item Can't goto subroutine from an eval-string
825
826(F) The "goto subroutine" call can't be used to jump out of an eval "string".
827(You can use it to jump out of an eval {BLOCK}, but you probably don't want to.)
828
706a304b 829=item Can't localize through a reference
4633a7c4 830
706a304b
SM
831(F) You said something like C<local $$ref>, which Perl can't currently
832handle, because when it goes to restore the old value of whatever $ref
833pointed to after the scope of the local() is finished, it can't be
834sure that $ref will still be a reference.
4633a7c4 835
748a9306
LW
836=item Can't localize lexical variable %s
837
2ba9eb46 838(F) You used local on a variable name that was previously declared as a
748a9306
LW
839lexical variable using "my". This is not allowed. If you want to
840localize a package variable of the same name, qualify it with the
841package name.
842
0ebe0038
SM
843=item Can't localize pseudo-hash element
844
845(F) You said something like C<local $ar-E<gt>{'key'}>, where $ar is
846a reference to a pseudo-hash. That hasn't been implemented yet, but
847you can get a similar effect by localizing the corresponding array
848element directly -- C<local $ar-E<gt>[$ar-E<gt>[0]{'key'}]>.
849
4727527e
IZ
850=item Can't locate auto/%s.al in @INC
851
852(F) A function (or method) was called in a package which allows autoload,
853but there is no function to autoload. Most probable causes are a misprint
854in a function/method name or a failure to C<AutoSplit> the file, say, by
855doing C<make install>.
856
ec889f3a
GS
857=item Can't locate %s
858
859(F) You said to C<do> (or C<require>, or C<use>) a file that couldn't be
860found. Perl looks for the file in all the locations mentioned in @INC,
861unless the file name included the full path to the file. Perhaps you need
862to set the PERL5LIB or PERL5OPT environment variable to say where the extra
863library is, or maybe the script needs to add the library name to @INC. Or
864maybe you just misspelled the name of the file. See L<perlfunc/require>
865and L<lib>.
a0d0e21e
LW
866
867=item Can't locate object method "%s" via package "%s"
868
869(F) You called a method correctly, and it correctly indicated a package
870functioning as a class, but that package doesn't define that particular
2ba9eb46 871method, nor does any of its base classes. See L<perlobj>.
a0d0e21e
LW
872
873=item Can't locate package %s for @%s::ISA
874
875(W) The @ISA array contained the name of another package that doesn't seem
876to exist.
877
3e3baf6d
TB
878=item Can't make list assignment to \%ENV on this system
879
880(F) List assignment to %ENV is not supported on some systems, notably VMS.
881
a0d0e21e
LW
882=item Can't modify %s in %s
883
884(F) You aren't allowed to assign to the item indicated, or otherwise try to
5f05dabc 885change it, such as with an auto-increment.
a0d0e21e 886
cd06dffe
GS
887=item Can't modify non-lvalue subroutine call
888
437784d6
GS
889(F) Subroutines meant to be used in lvalue context should be declared as
890such, see L<perlsub/"Lvalue subroutines">.
cd06dffe 891
54310121 892=item Can't modify nonexistent substring
a0d0e21e
LW
893
894(P) The internal routine that does assignment to a substr() was handed
895a NULL.
896
5f05dabc 897=item Can't msgrcv to read-only var
a0d0e21e 898
5f05dabc 899(F) The target of a msgrcv must be modifiable to be used as a receive
a0d0e21e
LW
900buffer.
901
902=item Can't open %s: %s
903
08e9d68e
DD
904(S) The implicit opening of a file through use of the C<E<lt>E<gt>>
905filehandle, either implicitly under the C<-n> or C<-p> command-line
906switches, or explicitly, failed for the indicated reason. Usually this
907is because you don't have read permission for a file which you named
908on the command line.
a0d0e21e
LW
909
910=item Can't open bidirectional pipe
911
912(W) You tried to say C<open(CMD, "|cmd|")>, which is not supported. You can
913try any of several modules in the Perl library to do this, such as
7e1af8bc 914IPC::Open2. Alternately, direct the pipe's output to a file using "E<gt>",
a0d0e21e
LW
915and then read it in under a different file handle.
916
748a9306
LW
917=item Can't open error file %s as stderr
918
919(F) An error peculiar to VMS. Perl does its own command line redirection, and
8b1a09fc
PP
920couldn't open the file specified after '2E<gt>' or '2E<gt>E<gt>' on the
921command line for writing.
748a9306
LW
922
923=item Can't open input file %s as stdin
924
925(F) An error peculiar to VMS. Perl does its own command line redirection, and
8b1a09fc 926couldn't open the file specified after 'E<lt>' on the command line for reading.
748a9306
LW
927
928=item Can't open output file %s as stdout
929
930(F) An error peculiar to VMS. Perl does its own command line redirection, and
8b1a09fc
PP
931couldn't open the file specified after 'E<gt>' or 'E<gt>E<gt>' on the command
932line for writing.
748a9306
LW
933
934=item Can't open output pipe (name: %s)
935
936(P) An error peculiar to VMS. Perl does its own command line redirection, and
937couldn't open the pipe into which to send data destined for stdout.
938
a0d0e21e
LW
939=item Can't open perl script "%s": %s
940
941(F) The script you specified can't be opened for the indicated reason.
942
7bac28a0
PP
943=item Can't redefine active sort subroutine %s
944
945(F) Perl optimizes the internal handling of sort subroutines and keeps
946pointers into them. You tried to redefine one such sort subroutine when it
947was currently active, which is not allowed. If you really want to do
948this, you should write C<sort { &func } @x> instead of C<sort func @x>.
949
10f9c03d
CK
950=item Can't remove %s: %s, skipping file
951
952(S) You requested an inplace edit without creating a backup file. Perl
953was unable to remove the original file to replace it with the modified
954file. The file was left unmodified.
955
a0d0e21e
LW
956=item Can't rename %s to %s: %s, skipping file
957
10f9c03d
CK
958(S) The rename done by the B<-i> switch failed for some reason,
959probably because you don't have write permission to the directory.
a0d0e21e 960
748a9306
LW
961=item Can't reopen input pipe (name: %s) in binary mode
962
963(P) An error peculiar to VMS. Perl thought stdin was a pipe, and tried to
964reopen it to accept binary data. Alas, it failed.
965
a0d0e21e
LW
966=item Can't reswap uid and euid
967
968(P) The setreuid() call failed for some reason in the setuid emulator
969of suidperl.
970
971=item Can't return outside a subroutine
972
973(F) The return statement was executed in mainline code, that is, where
974there was no subroutine call to return out of. See L<perlsub>.
975
cd06dffe
GS
976=item Can't return %s from lvalue subroutine
977
978(F) Perl detected an attempt to return illegal lvalues (such
979as temporary or readonly values) from a subroutine used as an lvalue.
980This is not allowed.
981
a0d0e21e
LW
982=item Can't stat script "%s"
983
984(P) For some reason you can't fstat() the script even though you have
985it open already. Bizarre.
986
987=item Can't swap uid and euid
988
989(P) The setreuid() call failed for some reason in the setuid emulator
990of suidperl.
991
992=item Can't take log of %g
993
fb73857a
PP
994(F) For ordinary real numbers, you can't take the logarithm of a
995negative number or zero. There's a Math::Complex package that comes
996standard with Perl, though, if you really want to do that for
997the negative numbers.
a0d0e21e
LW
998
999=item Can't take sqrt of %g
1000
1001(F) For ordinary real numbers, you can't take the square root of a
fb73857a
PP
1002negative number. There's a Math::Complex package that comes standard
1003with Perl, though, if you really want to do that.
a0d0e21e
LW
1004
1005=item Can't undef active subroutine
1006
1007(F) You can't undefine a routine that's currently running. You can,
1008however, redefine it while it's running, and you can even undef the
1009redefined subroutine while the old routine is running. Go figure.
1010
1011=item Can't unshift
1012
1013(F) You tried to unshift an "unreal" array that can't be unshifted, such
1014as the main Perl stack.
1015
1016=item Can't upgrade that kind of scalar
1017
1018(P) The internal sv_upgrade routine adds "members" to an SV, making
1019it into a more specialized kind of SV. The top several SV types are
1020so specialized, however, that they cannot be interconverted. This
1021message indicates that such a conversion was attempted.
1022
1023=item Can't upgrade to undef
1024
1025(P) The undefined SV is the bottom of the totem pole, in the scheme
1026of upgradability. Upgrading to undef indicates an error in the
1027code calling sv_upgrade.
1028
1d2dff63
GS
1029=item Can't use %%! because Errno.pm is not available
1030
1031(F) The first time the %! hash is used, perl automatically loads the
1032Errno.pm module. The Errno module is expected to tie the %! hash to
1033provide symbolic names for C<$!> errno values.
1034
c07a80fd
PP
1035=item Can't use "my %s" in sort comparison
1036
1037(F) The global variables $a and $b are reserved for sort comparisons.
8b1a09fc 1038You mentioned $a or $b in the same line as the E<lt>=E<gt> or cmp operator,
c07a80fd
PP
1039and the variable had earlier been declared as a lexical variable.
1040Either qualify the sort variable with the package name, or rename the
1041lexical variable.
1042
e9fa98b2
HS
1043=item Bad evalled substitution pattern
1044
1045(F) You've used the /e switch to evaluate the replacement for a
1046substitution, but perl found a syntax error in the code to evaluate,
1047most likely an unexpected right brace '}'.
1048
a0d0e21e
LW
1049=item Can't use %s for loop variable
1050
1051(F) Only a simple scalar variable may be used as a loop variable on a foreach.
1052
1053=item Can't use %s ref as %s ref
1054
1055(F) You've mixed up your reference types. You have to dereference a
1056reference of the type needed. You can use the ref() function to
1057test the type of the reference, if need be.
1058
748a9306
LW
1059=item Can't use \1 to mean $1 in expression
1060
1061(W) In an ordinary expression, backslash is a unary operator that creates
1062a reference to its argument. The use of backslash to indicate a backreference
5f05dabc 1063to a matched substring is valid only as part of a regular expression pattern.
748a9306
LW
1064Trying to do this in ordinary Perl code produces a value that prints
1065out looking like SCALAR(0xdecaf). Use the $1 form instead.
1066
44a8e56a
PP
1067=item Can't use bareword ("%s") as %s ref while \"strict refs\" in use
1068
1069(F) Only hard references are allowed by "strict refs". Symbolic references
1070are disallowed. See L<perlref>.
1071
748a9306 1072=item Can't use string ("%s") as %s ref while "strict refs" in use
a0d0e21e
LW
1073
1074(F) Only hard references are allowed by "strict refs". Symbolic references
1075are disallowed. See L<perlref>.
1076
1077=item Can't use an undefined value as %s reference
1078
1079(F) A value used as either a hard reference or a symbolic reference must
54310121 1080be a defined value. This helps to delurk some insidious errors.
a0d0e21e 1081
a0d0e21e
LW
1082=item Can't use global %s in "my"
1083
1084(F) You tried to declare a magical variable as a lexical variable. This is
5f05dabc 1085not allowed, because the magic can be tied to only one location (namely
a0d0e21e
LW
1086the global variable) and it would be incredibly confusing to have
1087variables in your program that looked like magical variables but
1088weren't.
1089
748a9306
LW
1090=item Can't use subscript on %s
1091
1092(F) The compiler tried to interpret a bracketed expression as a
1093subscript. But to the left of the brackets was an expression that
1094didn't look like an array reference, or anything else subscriptable.
1095
810b8aa5
GS
1096=item Can't weaken a nonreference
1097
1098(F) You attempted to weaken something that was not a reference. Only
1099references can be weakened.
1100
5f05dabc 1101=item Can't x= to read-only value
a0d0e21e
LW
1102
1103(F) You tried to repeat a constant value (often the undefined value) with
1104an assignment operator, which implies modifying the value itself.
1105Perhaps you need to copy the value to a temporary, and repeat that.
1106
3f4520fe 1107=item Can't find an opnumber for "%s"
b6c543e3
IZ
1108
1109(F) A string of a form C<CORE::word> was given to prototype(), but
1110there is no builtin with the name C<word>.
1111
3f4520fe 1112=item Can't resolve method `%s' overloading `%s' in package `%s'
e7ea3e70
IZ
1113
1114(F|P) Error resolving overloading specified by a method name (as
1115opposed to a subroutine reference): no such method callable via the
1116package. If method name is C<???>, this is an internal error.
1117
b8c5462f 1118=item Character class [:%s:] unknown
4599a1de 1119
b8c5462f 1120(F) The class in the character class [: :] syntax is unknown.
437784d6 1121See L<perlre>.
4599a1de 1122
b8c5462f
JH
1123=item Character class syntax [%s] belongs inside character classes
1124
1125(W) The character class constructs [: :], [= =], and [. .] go
644a2880 1126I<inside> character classes, the [] are part of the construct,
437784d6
GS
1127for example: /[012[:alpha:]345]/. Note that [= =] and [. .]
1128are not currently implemented; they are simply placeholders for
1129future extensions.
b8c5462f 1130
644a2880 1131=item Character class syntax [. .] is reserved for future extensions
4599a1de
JH
1132
1133(W) Within regular expression character classes ([]) the syntax beginning
b8c5462f 1134with "[." and ending with ".]" is reserved for future extensions.
4599a1de
JH
1135If you need to represent those character sequences inside a regular
1136expression character class, just quote the square brackets with the
b8c5462f 1137backslash: "\[." and ".\]".
4599a1de
JH
1138
1139=item Character class syntax [= =] is reserved for future extensions
1140
1141(W) Within regular expression character classes ([]) the syntax
1142beginning with "[=" and ending with "=]" is reserved for future extensions.
1143If you need to represent those character sequences inside a regular
1144expression character class, just quote the square brackets with the
1145backslash: "\[=" and "=\]".
1146
a0d0e21e
LW
1147=item chmod: mode argument is missing initial 0
1148
1149(W) A novice will sometimes say
1150
1151 chmod 777, $filename
1152
1153not realizing that 777 will be interpreted as a decimal number, equivalent
1154to 01411. Octal constants are introduced with a leading 0 in Perl, as in C.
1155
8b1a09fc 1156=item Close on unopened file E<lt>%sE<gt>
a0d0e21e
LW
1157
1158(W) You tried to close a filehandle that was never opened.
1159
7a2e2cd6
PP
1160=item Compilation failed in require
1161
1162(F) Perl could not compile a file specified in a C<require> statement.
1163Perl uses this generic message when none of the errors that it encountered
1164were severe enough to halt compilation immediately.
1165
c3464db5
DD
1166=item Complex regular subexpression recursion limit (%d) exceeded
1167
1168(W) The regular expression engine uses recursion in complex situations
1169where back-tracking is required. Recursion depth is limited to 32766,
1170or perhaps less in architectures where the stack cannot grow
1171arbitrarily. ("Simple" and "medium" situations are handled without
1172recursion and are not subject to a limit.) Try shortening the string
1173under examination; looping in Perl code (e.g. with C<while>) rather
1174than in the regular expression engine; or rewriting the regular
1175expression so that it is simpler or backtracks less. (See L<perlbook>
1176for information on I<Mastering Regular Expressions>.)
1177
a0d0e21e
LW
1178=item connect() on closed fd
1179
1180(W) You tried to do a connect on a closed socket. Did you forget to check
1181the return value of your socket() call? See L<perlfunc/connect>.
1182
779c5bc9
GS
1183=item Constant is not %s reference
1184
1185(F) A constant value (perhaps declared using the C<use constant> pragma)
1186is being dereferenced, but it amounts to the wrong type of reference. The
1187message indicates the type of reference that was expected. This usually
1188indicates a syntax error in dereferencing the constant value.
1189See L<perlsub/"Constant Functions"> and L<constant>.
1190
4cee8e80
CS
1191=item Constant subroutine %s redefined
1192
1193(S) You redefined a subroutine which had previously been eligible for
1194inlining. See L<perlsub/"Constant Functions"> for commentary and
1195workarounds.
1196
9607fc9c
PP
1197=item Constant subroutine %s undefined
1198
1199(S) You undefined a subroutine which had previously been eligible for
1200inlining. See L<perlsub/"Constant Functions"> for commentary and
1201workarounds.
1202
423cee85
JH
1203=item constant(%s): %%^H is not localized
1204
1205(F) When setting compile-time-lexicalized hash %^H one should set the
1206corresponding bit of $^H as well.
1207
1208=item constant(%s): %s
1209
1210(F) Compile-time-substitutions (such as overloaded constants and
1211character names) were not correctly set up.
1212
e7ea3e70
IZ
1213=item Copy method did not return a reference
1214
1215(F) The method which overloads "=" is buggy. See L<overload/Copy Constructor>.
1216
a0d0e21e
LW
1217=item Corrupt malloc ptr 0x%lx at 0x%lx
1218
1219(P) The malloc package that comes with Perl had an internal failure.
1220
1221=item corrupted regexp pointers
1222
1223(P) The regular expression engine got confused by what the regular
1224expression compiler gave it.
1225
1226=item corrupted regexp program
1227
1228(P) The regular expression engine got passed a regexp program without
1229a valid magic number.
1230
1231=item Deep recursion on subroutine "%s"
1232
1233(W) This subroutine has called itself (directly or indirectly) 100
3e3baf6d 1234times more than it has returned. This probably indicates an infinite
a0d0e21e
LW
1235recursion, unless you're writing strange benchmark programs, in which
1236case it indicates something else.
1237
f10b0346 1238=item defined(@array) is deprecated
69794302
MJD
1239
1240(D) defined() is not usually useful on arrays because it checks for an
1241undefined I<scalar> value. If you want to see if the array is empty,
1242just use C<if (@array) { # not empty }> for example.
1243
f10b0346 1244=item defined(%hash) is deprecated
69794302
MJD
1245
1246(D) defined() is not usually useful on hashes because it checks for an
1247undefined I<scalar> value. If you want to see if the hash is empty,
1248just use C<if (%hash) { # not empty }> for example.
1249
fc36a67e
PP
1250=item Delimiter for here document is too long
1251
1252(F) In a here document construct like C<E<lt>E<lt>FOO>, the label
1253C<FOO> is too long for Perl to handle. You have to be seriously
1254twisted to write code that triggers this error.
1255
3cdd684c
TP
1256=item Did not produce a valid header
1257
1258See Server error.
1259
4633a7c4
LW
1260=item Did you mean &%s instead?
1261
1262(W) You probably referred to an imported subroutine &FOO as $FOO or some such.
1263
748a9306 1264=item Did you mean $ or @ instead of %?
a0d0e21e 1265
748a9306
LW
1266(W) You probably said %hash{$key} when you meant $hash{$key} or @hash{@keys}.
1267On the other hand, maybe you just meant %hash and got carried away.
1268
7e1af8bc 1269=item Died
5f05dabc
PP
1270
1271(F) You passed die() an empty string (the equivalent of C<die "">) or
1272you called it with no args and both C<$@> and C<$_> were empty.
1273
54310121 1274=item Do you need to predeclare %s?
748a9306
LW
1275
1276(S) This is an educated guess made in conjunction with the message "%s
1277found where operator expected". It often means a subroutine or module
1278name is being referenced that hasn't been declared yet. This may be
1279because of ordering problems in your file, or because of a missing
1280"sub", "package", "require", or "use" statement. If you're
1281referencing something that isn't defined yet, you don't actually have
1282to define the subroutine or package before the current location. You
1283can use an empty "sub foo;" or "package FOO;" to enter a "forward"
1284declaration.
a0d0e21e 1285
3cdd684c
TP
1286=item Document contains no data
1287
1288See Server error.
1289
a0d0e21e
LW
1290=item Don't know how to handle magic of type '%s'
1291
1292(P) The internal handling of magical variables has been cursed.
1293
1294=item do_study: out of memory
1295
1296(P) This should have been caught by safemalloc() instead.
1297
1298=item Duplicate free() ignored
1299
1300(S) An internal routine called free() on something that had already
1301been freed.
1302
4633a7c4
LW
1303=item elseif should be elsif
1304
1305(S) There is no keyword "elseif" in Perl because Larry thinks it's
1306ugly. Your code will be interpreted as an attempt to call a method
1307named "elseif" for the class returned by the following block. This is
1308unlikely to be what you want.
1309
a0d0e21e
LW
1310=item END failed--cleanup aborted
1311
1312(F) An untrapped exception was raised while executing an END subroutine.
1313The interpreter is immediately exited.
1314
85ab1d1d 1315=item entering effective %s failed
5ff3f7a4 1316
85ab1d1d 1317(F) While under the C<use filetest> pragma, switching the real and
5ff3f7a4
GS
1318effective uids or gids failed.
1319
748a9306
LW
1320=item Error converting file specification %s
1321
5f05dabc 1322(F) An error peculiar to VMS. Because Perl may have to deal with file
748a9306
LW
1323specifications in either VMS or Unix syntax, it converts them to a
1324single form when it must operate on them directly. Either you've
1325passed an invalid file specification to Perl, or you've found a
1326case the conversion routines don't handle. Drat.
1327
e4d48cc9
GS
1328=item %s: Eval-group in insecure regular expression
1329
1330(F) Perl detected tainted data when trying to compile a regular expression
1331that contains the C<(?{ ... })> zero-width assertion, which is unsafe.
1332See L<perlre/(?{ code })>, and L<perlsec>.
1333
1334=item %s: Eval-group not allowed, use re 'eval'
1335
1336(F) A regular expression contained the C<(?{ ... })> zero-width assertion,
1337but that construct is only allowed when the C<use re 'eval'> pragma is
1338in effect. See L<perlre/(?{ code })>.
1339
1340=item %s: Eval-group not allowed at run time
1341
1342(F) Perl tried to compile a regular expression containing the C<(?{ ... })>
3c247ff3
GS
1343zero-width assertion at run time, as it would when the pattern contains
1344interpolated values. Since that is a security risk, it is not allowed.
e4d48cc9
GS
1345If you insist, you may still do this by explicitly building the pattern
1346from an interpolated string at run time and using that in an eval().
1347See L<perlre/(?{ code })>.
1348
fc36a67e
PP
1349=item Excessively long <> operator
1350
1351(F) The contents of a <> operator may not exceed the maximum size of a
1352Perl identifier. If you're just trying to glob a long list of
1353filenames, try using the glob() operator, or put the filenames into a
1354variable and glob that.
1355
f86702cc 1356=item Execution of %s aborted due to compilation errors
a0d0e21e
LW
1357
1358(F) The final summary message when a Perl compilation fails.
1359
1360=item Exiting eval via %s
1361
8b1a09fc 1362(W) You are exiting an eval by unconventional means, such as
a0d0e21e
LW
1363a goto, or a loop control statement.
1364
0a753a76
PP
1365=item Exiting pseudo-block via %s
1366
1367(W) You are exiting a rather special block construct (like a sort block or
1368subroutine) by unconventional means, such as a goto, or a loop control
1369statement. See L<perlfunc/sort>.
1370
a0d0e21e
LW
1371=item Exiting subroutine via %s
1372
8b1a09fc 1373(W) You are exiting a subroutine by unconventional means, such as
a0d0e21e
LW
1374a goto, or a loop control statement.
1375
1376=item Exiting substitution via %s
1377
8b1a09fc 1378(W) You are exiting a substitution by unconventional means, such as
a0d0e21e
LW
1379a return, a goto, or a loop control statement.
1380
7b8d334a
GS
1381=item Explicit blessing to '' (assuming package main)
1382
1383(W) You are blessing a reference to a zero length string. This has
1384the effect of blessing the reference into the package main. This is
1385usually not what you want. Consider providing a default target
ae6c4aac 1386package, e.g. bless($ref, $p || 'MyPackage');
7b8d334a 1387
73b437c8
JH
1388=item false [] range "%s" in regexp
1389
1390(W) A character class range must start and end at a literal character, not
1391another character class like C<\d> or C<[:alpha:]>. The "-" in your false
1392range is interpreted as a literal "-". Consider quoting the "-", "\-".
1393See L<perlre>.
1394
748a9306 1395=item Fatal VMS error at %s, line %d
a0d0e21e 1396
748a9306
LW
1397(P) An error peculiar to VMS. Something untoward happened in a VMS system
1398service or RTL routine; Perl's exit status should provide more details. The
1399filename in "at %s" and the line number in "line %d" tell you which section of
1400the Perl source code is distressed.
a0d0e21e
LW
1401
1402=item fcntl is not implemented
1403
1404(F) Your machine apparently doesn't implement fcntl(). What is this, a
1405PDP-11 or something?
1406
1407=item Filehandle %s never opened
1408
1409(W) An I/O operation was attempted on a filehandle that was never initialized.
1410You need to do an open() or a socket() call, or call a constructor from
1411the FileHandle package.
1412
af8c498a 1413=item Filehandle %s opened only for input
a0d0e21e
LW
1414
1415(W) You tried to write on a read-only filehandle. If you
1416intended it to be a read-write filehandle, you needed to open it with
8b1a09fc 1417"+E<lt>" or "+E<gt>" or "+E<gt>E<gt>" instead of with "E<lt>" or nothing. If
5f05dabc 1418you intended only to write the file, use "E<gt>" or "E<gt>E<gt>". See
8b1a09fc 1419L<perlfunc/open>.
a0d0e21e 1420
af8c498a 1421=item Filehandle %s opened only for output
a0d0e21e 1422
af8c498a 1423(W) You tried to read from a filehandle opened only for writing. If you
437784d6 1424intended it to be a read/write filehandle, you needed to open it with
8b1a09fc 1425"+E<lt>" or "+E<gt>" or "+E<gt>E<gt>" instead of with "E<lt>" or nothing. If
af8c498a 1426you intended only to read from the file, use "E<lt>". See
8b1a09fc 1427L<perlfunc/open>.
a0d0e21e
LW
1428
1429=item Final $ should be \$ or $name
1430
1431(F) You must now decide whether the final $ in a string was meant to be
1432a literal dollar sign, or was meant to introduce a variable name
1433that happens to be missing. So you have to put either the backslash or
1434the name.
1435
1436=item Final @ should be \@ or @name
1437
1438(F) You must now decide whether the final @ in a string was meant to be
1439a literal "at" sign, or was meant to introduce a variable name
1440that happens to be missing. So you have to put either the backslash or
1441the name.
1442
1443=item Format %s redefined
1444
1445(W) You redefined a format. To suppress this warning, say
1446
1447 {
4438c4b7 1448 no warnings;
a0d0e21e
LW
1449 eval "format NAME =...";
1450 }
1451
1452=item Format not terminated
1453
1454(F) A format must be terminated by a line with a solitary dot. Perl got
1455to the end of your file without finding such a line.
1456
1457=item Found = in conditional, should be ==
1458
1459(W) You said
1460
1461 if ($foo = 123)
1462
1463when you meant
1464
1465 if ($foo == 123)
1466
1467(or something like that).
1468
1469=item gdbm store returned %d, errno %d, key "%s"
1470
1471(S) A warning from the GDBM_File extension that a store failed.
1472
1473=item gethostent not implemented
1474
1475(F) Your C library apparently doesn't implement gethostent(), probably
1476because if it did, it'd feel morally obligated to return every hostname
1477on the Internet.
1478
1479=item get{sock,peer}name() on closed fd
1480
1481(W) You tried to get a socket or peer socket name on a closed socket.
1482Did you forget to check the return value of your socket() call?
1483
748a9306
LW
1484=item getpwnam returned invalid UIC %#o for user "%s"
1485
1486(S) A warning peculiar to VMS. The call to C<sys$getuai> underlying the
1487C<getpwnam> operator returned an invalid UIC.
1488
a0d0e21e
LW
1489=item Glob not terminated
1490
1491(F) The lexer saw a left angle bracket in a place where it was expecting
1492a term, so it's looking for the corresponding right angle bracket, and not
1493finding it. Chances are you left some needed parentheses out earlier in
1494the line, and you really meant a "less than".
1495
1496=item Global symbol "%s" requires explicit package name
1497
68dc0745
PP
1498(F) You've said "use strict vars", which indicates that all variables
1499must either be lexically scoped (using "my"), or explicitly qualified to
a0d0e21e
LW
1500say which package the global variable is in (using "::").
1501
1502=item goto must have label
1503
1504(F) Unlike with "next" or "last", you're not allowed to goto an
1505unspecified destination. See L<perlfunc/goto>.
1506
1507=item Had to create %s unexpectedly
1508
1509(S) A routine asked for a symbol from a symbol table that ought to have
1510existed already, but for some reason it didn't, and had to be created on
1511an emergency basis to prevent a core dump.
1512
1513=item Hash %%s missing the % in argument %d of %s()
1514
1515(D) Really old Perl let you omit the % on hash names in some spots. This
1516is now heavily deprecated.
1517
252aa082
JH
1518=item Hexadecimal number > 0xffffffff non-portable
1519
9e24b6e2
JH
1520(W) The hexadecimal number you specified is larger than 2**32-1
1521(4294967295) and therefore non-portable between systems. See
1522L<perlport> for more on portability concerns.
252aa082 1523
8903cb82
PP
1524=item Identifier too long
1525
1526(F) Perl limits identifiers (names for variables, functions, etc.) to
fc36a67e
PP
1527about 250 characters for simple names, and somewhat more for compound
1528names (like C<$A::B>). You've exceeded Perl's limits. Future
1529versions of Perl are likely to eliminate these arbitrary limitations.
8903cb82 1530
f675dbe5
CB
1531=item Ill-formed CRTL environ value "%s"
1532
1533(W) A warning peculiar to VMS. Perl tried to read the CRTL's internal
1534environ array, and encountered an element without the C<=> delimiter
1535used to spearate keys from values. The element is ignored.
1536
1537=item Ill-formed message in prime_env_iter: |%s|
a0d0e21e 1538
f675dbe5
CB
1539(W) A warning peculiar to VMS. Perl tried to read a logical name
1540or CLI symbol definition when preparing to iterate over %ENV, and
1541didn't see the expected delimiter between key and value, so the
1542line was ignored.
a0d0e21e 1543
4fdae800
PP
1544=item Illegal character %s (carriage return)
1545
1546(F) A carriage return character was found in the input. This is an
1547error, and not a warning, because carriage return characters can break
54310121
PP
1548multi-line strings, including here documents (e.g., C<print E<lt>E<lt>EOF;>).
1549
1550Under Unix, this error is usually caused by executing Perl code --
68dc0745 1551either the main program, a module, or an eval'd string -- that was
54310121 1552transferred over a network connection from a non-Unix system without
68dc0745
PP
1553properly converting the text file format.
1554
1555Under systems that use something other than '\n' to delimit lines of
1556text, this error can also be caused by reading Perl code from a file
1557handle that is in binary mode (as set by the C<binmode> operator).
1558
1559In either case, the Perl code in question will probably need to be
1560converted with something like C<s/\x0D\x0A?/\n/g> before it can be
1561executed.
4fdae800 1562
a0d0e21e
LW
1563=item Illegal division by zero
1564
1565(F) You tried to divide a number by 0. Either something was wrong in your
1566logic, or you need to put a conditional in to guard against meaningless input.
1567
1568=item Illegal modulus zero
1569
1570(F) You tried to divide a number by 0 to get the remainder. Most numbers
1571don't take to this kindly.
1572
399388f4
GS
1573=item Illegal binary digit %s
1574
437784d6 1575(F) You used a digit other than 0 or 1 in a binary number.
399388f4
GS
1576
1577=item Illegal octal digit %s
a0d0e21e
LW
1578
1579(F) You used an 8 or 9 in a octal number.
1580
399388f4
GS
1581=item Illegal binary digit %s ignored
1582
1583(W) You may have tried to use a digit other than 0 or 1 in a binary number.
1584Interpretation of the binary number stopped before the offending digit.
1585
1586=item Illegal octal digit %s ignored
748a9306
LW
1587
1588(W) You may have tried to use an 8 or 9 in a octal number. Interpretation
1589of the octal number stopped before the 8 or 9.
1590
651978e7 1591=item Illegal hexadecimal digit %s ignored
6ff81951 1592
252aa082
JH
1593(W) You may have tried to use a character other than 0 - 9 or A - F, a - f
1594in a hexadecimal number. Interpretation of the hexadecimal number stopped
6ff81951
GS
1595before the illegal character.
1596
81e118e0
JH
1597=item Illegal number of bits in vec
1598
0a1cd687 1599(F) The number of bits in vec() (the third argument) must be a power of
c5a0f51a 1600two from 1 to 32 (or 64, if your platform supports that).
09bef843 1601
54310121
PP
1602=item Illegal switch in PERL5OPT: %s
1603
1604(X) The PERL5OPT environment variable may only be used to set the
1605following switches: B<-[DIMUdmw]>.
1606
9607fc9c
PP
1607=item In string, @%s now must be written as \@%s
1608
1609(F) It used to be that Perl would try to guess whether you wanted an
1610array interpolated or a literal @. It did this when the string was first
1611used at runtime. Now strings are parsed at compile time, and ambiguous
1612instances of @ must be disambiguated, either by prepending a backslash to
1613indicate a literal, or by declaring (or using) the array within the
1614program before the string (lexically). (Someday it will simply assume
1615that an unbackslashed @ interpolates an array.)
1616
a0d0e21e
LW
1617=item Insecure dependency in %s
1618
8b1a09fc 1619(F) You tried to do something that the tainting mechanism didn't like.
a0d0e21e
LW
1620The tainting mechanism is turned on when you're running setuid or setgid,
1621or when you specify B<-T> to turn it on explicitly. The tainting mechanism
1622labels all data that's derived directly or indirectly from the user,
1623who is considered to be unworthy of your trust. If any such data is
1624used in a "dangerous" operation, you get this error. See L<perlsec>
1625for more information.
1626
1627=item Insecure directory in %s
1628
1629(F) You can't use system(), exec(), or a piped open in a setuid or setgid
8b1a09fc 1630script if C<$ENV{PATH}> contains a directory that is writable by the world.
a0d0e21e
LW
1631See L<perlsec>.
1632
62f468fc 1633=item Insecure $ENV{%s} while running %s
a0d0e21e
LW
1634
1635(F) You can't use system(), exec(), or a piped open in a setuid or
62f468fc
G
1636setgid script if any of C<$ENV{PATH}>, C<$ENV{IFS}>, C<$ENV{CDPATH}>,
1637C<$ENV{ENV}> or C<$ENV{BASH_ENV}> are derived from data supplied (or
a0d0e21e
LW
1638potentially supplied) by the user. The script must set the path to a
1639known value, using trustworthy data. See L<perlsec>.
1640
a7ae9550
GS
1641=item Integer overflow in %s number
1642
9e24b6e2 1643(W) The hexadecimal, octal or binary number you have specified either
c6edd1b7 1644as a literal or as an argument to hex() or oct() is too big for your
9e24b6e2
JH
1645architecture, and has been converted to a floating point number. On a
164632-bit architecture the largest hexadecimal, octal or binary number
1647representable without overflow is 0xFFFFFFFF, 037777777777, or
16480b11111111111111111111111111111111 respectively. Note that Perl
1649transparently promotes all numbers to a floating point representation
1650internally--subject to loss of precision errors in subsequent
1651operations.
bbce6d69 1652
748a9306
LW
1653=item Internal inconsistency in tracking vforks
1654
1655(S) A warning peculiar to VMS. Perl keeps track of the number
5f05dabc 1656of times you've called C<fork> and C<exec>, to determine
2ba9eb46 1657whether the current call to C<exec> should affect the current
b687b08b 1658script or a subprocess (see L<perlvms/"exec LIST">). Somehow, this count
748a9306
LW
1659has become scrambled, so Perl is making a guess and treating
1660this C<exec> as a request to terminate the Perl script
1661and execute the specified command.
1662
a0d0e21e
LW
1663=item internal disaster in regexp
1664
1665(P) Something went badly wrong in the regular expression parser.
1666
4eb79ab5
GS
1667=item glob failed (%s)
1668
1669(W) Something went wrong with the external program(s) used for C<glob>
1670and C<E<lt>*.cE<gt>>. Usually, this means that you supplied a C<glob>
1671pattern that caused the external program to fail and exit with a nonzero
1672status. If the message indicates that the abnormal exit resulted in a
1673coredump, this may also mean that your csh (C shell) is broken. If so,
1674you should change all of the csh-related variables in config.sh: If you
1675have tcsh, make the variables refer to it as if it were csh (e.g.
1676C<full_csh='/usr/bin/tcsh'>); otherwise, make them all empty (except that
1677C<d_csh> should be C<'undef'>) so that Perl will think csh is missing.
1678In either case, after editing config.sh, run C<./Configure -S> and
1679rebuild Perl.
5cd24f17 1680
a0d0e21e
LW
1681=item internal urp in regexp at /%s/
1682
1683(P) Something went badly awry in the regular expression parser.
1684
09bef843
SB
1685=item Invalid %s attribute: %s
1686
1687The indicated attribute for a subroutine or variable was not recognized
1688by Perl or by a user-supplied handler. See L<attributes>.
1689
1690=item Invalid %s attributes: %s
1691
1692The indicated attributes for a subroutine or variable were not recognized
1693by Perl or by a user-supplied handler. See L<attributes>.
1694
73b437c8 1695=item invalid [] range "%s" in regexp
a0d0e21e
LW
1696
1697(F) The range specified in a character class had a minimum character
1209ba90 1698greater than the maximum character. See L<perlre>.
a0d0e21e 1699
c635e13b
PP
1700=item Invalid conversion in %s: "%s"
1701
878e08df 1702(W) Perl does not understand the given format conversion.
c635e13b
PP
1703See L<perlfunc/sprintf>.
1704
09bef843
SB
1705=item Invalid separator character %s in attribute list
1706
1707(F) Something other than a comma or whitespace was seen between the
1708elements of an attribute list. If the previous attribute
1709had a parenthesised parameter list, perhaps that list was terminated
1710too soon. See L<attributes>.
1711
96e4d5b1
PP
1712=item Invalid type in pack: '%s'
1713
8903cb82 1714(F) The given character is not a valid pack type. See L<perlfunc/pack>.
fb73857a
PP
1715(W) The given character is not a valid pack type but used to be silently
1716ignored.
96e4d5b1
PP
1717
1718=item Invalid type in unpack: '%s'
1719
8903cb82 1720(F) The given character is not a valid unpack type. See L<perlfunc/unpack>.
fb73857a
PP
1721(W) The given character is not a valid unpack type but used to be silently
1722ignored.
96e4d5b1 1723
a0d0e21e
LW
1724=item ioctl is not implemented
1725
1726(F) Your machine apparently doesn't implement ioctl(), which is pretty
1727strange for a machine that supports C.
1728
1729=item junk on end of regexp
1730
1731(P) The regular expression parser is confused.
1732
1733=item Label not found for "last %s"
1734
1735(F) You named a loop to break out of, but you're not currently in a
1736loop of that name, not even if you count where you were called from.
1737See L<perlfunc/last>.
1738
1739=item Label not found for "next %s"
1740
1741(F) You named a loop to continue, but you're not currently in a loop of
1742that name, not even if you count where you were called from. See
1743L<perlfunc/last>.
1744
1745=item Label not found for "redo %s"
1746
1747(F) You named a loop to restart, but you're not currently in a loop of
1748that name, not even if you count where you were called from. See
1749L<perlfunc/last>.
1750
85ab1d1d 1751=item leaving effective %s failed
5ff3f7a4 1752
85ab1d1d 1753(F) While under the C<use filetest> pragma, switching the real and
5ff3f7a4
GS
1754effective uids or gids failed.
1755
a0d0e21e
LW
1756=item listen() on closed fd
1757
1758(W) You tried to do a listen on a closed socket. Did you forget to check
1759the return value of your socket() call? See L<perlfunc/listen>.
1760
cd06dffe
GS
1761=item Lvalue subs returning %s not implemented yet
1762
1763(F) Due to limitations in the current implementation, array and hash
1764values cannot be returned in subroutines used in lvalue context.
1765See L<perlsub/"Lvalue subroutines">.
1766
a0d0e21e
LW
1767=item Method for operation %s not found in package %s during blessing
1768
1769(F) An attempt was made to specify an entry in an overloading table that
e7ea3e70 1770doesn't resolve to a valid subroutine. See L<overload>.
a0d0e21e 1771
3cdd684c
TP
1772=item Method %s not permitted
1773
1774See Server error.
1775
a0d0e21e
LW
1776=item Might be a runaway multi-line %s string starting on line %d
1777
1778(S) An advisory indicating that the previous error may have been caused
1779by a missing delimiter on a string or pattern, because it eventually
1780ended earlier on the current line.
1781
1782=item Misplaced _ in number
1783
1784(W) An underline in a decimal constant wasn't on a 3-digit boundary.
1785
1786=item Missing $ on loop variable
1787
8b1a09fc
PP
1788(F) Apparently you've been programming in B<csh> too much. Variables are always
1789mentioned with the $ in Perl, unlike in the shells, where it can vary from
a0d0e21e
LW
1790one line to the next.
1791
4a2d328f 1792=item Missing %sbrace%s on \N{}
423cee85 1793
4a2d328f 1794(F) Wrong syntax of character name literal C<\N{charname}> within
423cee85
JH
1795double-quotish context.
1796
a0d0e21e
LW
1797=item Missing comma after first argument to %s function
1798
1799(F) While certain functions allow you to specify a filehandle or an
1800"indirect object" before the argument list, this ain't one of them.
1801
06eaf0bc
GS
1802=item Missing command in piped open
1803
1804(W) You used the C<open(FH, "| command")> or C<open(FH, "command |")>
1805construction, but the command was missing or blank.
1806
748a9306
LW
1807=item Missing operator before %s?
1808
1809(S) This is an educated guess made in conjunction with the message "%s
1810found where operator expected". Often the missing operator is a comma.
1811
d98d5fff 1812=item Missing right curly or square bracket
a0d0e21e 1813
d98d5fff
GS
1814(F) The lexer counted more opening curly or square brackets than
1815closing ones. As a general rule, you'll find it's missing near the place
1816you were last editing.
a0d0e21e 1817
a0d0e21e
LW
1818=item Modification of a read-only value attempted
1819
1820(F) You tried, directly or indirectly, to change the value of a
5f05dabc 1821constant. You didn't, of course, try "2 = 1", because the compiler
a0d0e21e
LW
1822catches that. But an easy way to do the same thing is:
1823
1824 sub mod { $_[0] = 1 }
1825 mod(2);
1826
1827Another way is to assign to a substr() that's off the end of the string.
1828
4fe4fdb3 1829=item Modification of non-creatable array value attempted, subscript %d
a0d0e21e
LW
1830
1831(F) You tried to make an array value spring into existence, and the
1832subscript was probably negative, even counting from end of the array
1833backwards.
1834
4fe4fdb3 1835=item Modification of non-creatable hash value attempted, subscript "%s"
a0d0e21e 1836
19a09eb8 1837(P) You tried to make a hash value spring into existence, and it couldn't
a0d0e21e
LW
1838be created for some peculiar reason.
1839
1840=item Module name must be constant
1841
1842(F) Only a bare module name is allowed as the first argument to a "use".
1843
1844=item msg%s not implemented
1845
1846(F) You don't have System V message IPC on your system.
1847
1848=item Multidimensional syntax %s not supported
1849
8b1a09fc
PP
1850(W) Multidimensional arrays aren't written like C<$foo[1,2,3]>. They're written
1851like C<$foo[1][2][3]>, as in C.
1852
09bef843
SB
1853=item Missing name in "my sub"
1854
1855(F) The reserved syntax for lexically scoped subroutines requires that they
1856have a name with which they can be found.
1857
8b1a09fc
PP
1858=item Name "%s::%s" used only once: possible typo
1859
68dc0745
PP
1860(W) Typographical errors often show up as unique variable names.
1861If you had a good reason for having a unique name, then just mention
77ca0c92
LW
1862it again somehow to suppress the message. The C<our> declaration is
1863provided for this purpose.
a0d0e21e
LW
1864
1865=item Negative length
1866
1867(F) You tried to do a read/write/send/recv operation with a buffer length
1868that is less than 0. This is difficult to imagine.
1869
1870=item nested *?+ in regexp
1871
5f05dabc 1872(F) You can't quantify a quantifier without intervening parentheses. So
a0d0e21e
LW
1873things like ** or +* or ?* are illegal.
1874
5f05dabc 1875Note, however, that the minimal matching quantifiers, C<*?>, C<+?>, and C<??> appear
a0d0e21e
LW
1876to be nested quantifiers, but aren't. See L<perlre>.
1877
1878=item No #! line
1879
1880(F) The setuid emulator requires that scripts have a well-formed #! line
1881even on machines that don't support the #! construct.
1882
1883=item No %s allowed while running setuid
1884
1885(F) Certain operations are deemed to be too insecure for a setuid or setgid
1886script to even be allowed to attempt. Generally speaking there will be
1887another way to do what you want that is, if not secure, at least securable.
1888See L<perlsec>.
1889
1890=item No B<-e> allowed in setuid scripts
1891
1892(F) A setuid script can't be specified by the user.
1893
1894=item No comma allowed after %s
1895
1896(F) A list operator that has a filehandle or "indirect object" is not
1897allowed to have a comma between that and the following arguments.
1898Otherwise it'd be just another one of the arguments.
1899
0a753a76
PP
1900One possible cause for this is that you expected to have imported a
1901constant to your name space with B<use> or B<import> while no such
1902importing took place, it may for example be that your operating system
1903does not support that particular constant. Hopefully you did use an
1904explicit import list for the constants you expect to see, please see
1905L<perlfunc/use> and L<perlfunc/import>. While an explicit import list
1906would probably have caught this error earlier it naturally does not
1907remedy the fact that your operating system still does not support that
1908constant. Maybe you have a typo in the constants of the symbol import
1909list of B<use> or B<import> or in the constant name at the line where
1910this error was triggered?
1911
748a9306
LW
1912=item No command into which to pipe on command line
1913
1914(F) An error peculiar to VMS. Perl handles its own command line redirection,
54310121 1915and found a '|' at the end of the command line, so it doesn't know where you
748a9306
LW
1916want to pipe the output from this command.
1917
a0d0e21e
LW
1918=item No DB::DB routine defined
1919
1920(F) The currently executing code was compiled with the B<-d> switch,
1921but for some reason the perl5db.pl file (or some facsimile thereof)
1922didn't define a routine to be called at the beginning of each
1923statement. Which is odd, because the file should have been required
1924automatically, and should have blown up the require if it didn't parse
1925right.
1926
1927=item No dbm on this machine
1928
1929(P) This is counted as an internal error, because every machine should
5f05dabc 1930supply dbm nowadays, because Perl comes with SDBM. See L<SDBM_File>.
a0d0e21e
LW
1931
1932=item No DBsub routine
1933
1934(F) The currently executing code was compiled with the B<-d> switch,
1935but for some reason the perl5db.pl file (or some facsimile thereof)
1936didn't define a DB::sub routine to be called at the beginning of each
1937ordinary subroutine call.
1938
8b1a09fc 1939=item No error file after 2E<gt> or 2E<gt>E<gt> on command line
748a9306
LW
1940
1941(F) An error peculiar to VMS. Perl handles its own command line redirection,
8b1a09fc
PP
1942and found a '2E<gt>' or a '2E<gt>E<gt>' on the command line, but can't find
1943the name of the file to which to write data destined for stderr.
748a9306 1944
8b1a09fc 1945=item No input file after E<lt> on command line
748a9306
LW
1946
1947(F) An error peculiar to VMS. Perl handles its own command line redirection,
8b1a09fc
PP
1948and found a 'E<lt>' on the command line, but can't find the name of the file
1949from which to read data for stdin.
748a9306 1950
8b1a09fc 1951=item No output file after E<gt> on command line
748a9306
LW
1952
1953(F) An error peculiar to VMS. Perl handles its own command line redirection,
8b1a09fc 1954and found a lone 'E<gt>' at the end of the command line, so it doesn't know
54310121 1955where you wanted to redirect stdout.
748a9306 1956
8b1a09fc 1957=item No output file after E<gt> or E<gt>E<gt> on command line
748a9306
LW
1958
1959(F) An error peculiar to VMS. Perl handles its own command line redirection,
8b1a09fc
PP
1960and found a 'E<gt>' or a 'E<gt>E<gt>' on the command line, but can't find the
1961name of the file to which to write data destined for stdout.
748a9306 1962
a0d0e21e
LW
1963=item No Perl script found in input
1964
1965(F) You called C<perl -x>, but no line was found in the file beginning
1966with #! and containing the word "perl".
1967
1968=item No setregid available
1969
1970(F) Configure didn't find anything resembling the setregid() call for
1971your system.
1972
1973=item No setreuid available
1974
1975(F) Configure didn't find anything resembling the setreuid() call for
1976your system.
1977
1978=item No space allowed after B<-I>
1979
1980(F) The argument to B<-I> must follow the B<-I> immediately with no
1981intervening space.
1982
88e9b055 1983=item No such pseudo-hash field "%s"
57079c46 1984
88e9b055 1985(F) You tried to access an array as a hash, but the field name used is
57079c46
GA
1986not defined. The hash at index 0 should map all valid field names to
1987array indices for that to work.
1988
88e9b055 1989=item No such pseudo-hash field "%s" in variable %s of type %s
f1192cee
GA
1990
1991(F) You tried to access a field of a typed variable where the type
1992does not know about the field name. The field names are looked up in
1993the %FIELDS hash in the type package at compile time. The %FIELDS hash
1994is usually set up with the 'fields' pragma.
1995
748a9306
LW
1996=item No such pipe open
1997
1998(P) An error peculiar to VMS. The internal routine my_pclose() tried to
1999close a pipe which hadn't been opened. This should have been caught earlier as
2000an attempt to close an unopened filehandle.
2001
a0d0e21e
LW
2002=item No such signal: SIG%s
2003
2004(W) You specified a signal name as a subscript to %SIG that was not recognized.
2005Say C<kill -l> in your shell to see the valid signal names on your system.
2006
bd3fa61c
CB
2007=item no UTC offset information; assuming local time is UTC
2008
db7c17d7 2009(S) A warning peculiar to VMS. Perl was unable to find the local
f675dbe5
CB
2010timezone offset, so it's assuming that local system time is equivalent
2011to UTC. If it's not, define the logical name F<SYS$TIMEZONE_DIFFERENTIAL>
2012to translate to the number of seconds which need to be added to UTC to
2013get local time.
2014
a0d0e21e
LW
2015=item Not a CODE reference
2016
2017(F) Perl was trying to evaluate a reference to a code value (that is, a
2018subroutine), but found a reference to something else instead. You can
2019use the ref() function to find out what kind of ref it really was.
2020See also L<perlref>.
2021
2022=item Not a format reference
2023
2024(F) I'm not sure how you managed to generate a reference to an anonymous
2025format, but this indicates you did, and that it didn't exist.
2026
2027=item Not a GLOB reference
2028
55497cff 2029(F) Perl was trying to evaluate a reference to a "typeglob" (that is,
a0d0e21e
LW
2030a symbol table entry that looks like C<*foo>), but found a reference to
2031something else instead. You can use the ref() function to find out
2032what kind of ref it really was. See L<perlref>.
2033
2034=item Not a HASH reference
2035
2036(F) Perl was trying to evaluate a reference to a hash value, but
2037found a reference to something else instead. You can use the ref()
2038function to find out what kind of ref it really was. See L<perlref>.
2039
2040=item Not a perl script
2041
2042(F) The setuid emulator requires that scripts have a well-formed #! line
2043even on machines that don't support the #! construct. The line must
2044mention perl.
2045
2046=item Not a SCALAR reference
2047
2048(F) Perl was trying to evaluate a reference to a scalar value, but
2049found a reference to something else instead. You can use the ref()
2050function to find out what kind of ref it really was. See L<perlref>.
2051
2052=item Not a subroutine reference
2053
2054(F) Perl was trying to evaluate a reference to a code value (that is, a
2055subroutine), but found a reference to something else instead. You can
2056use the ref() function to find out what kind of ref it really was.
2057See also L<perlref>.
2058
e7ea3e70 2059=item Not a subroutine reference in overload table
a0d0e21e
LW
2060
2061(F) An attempt was made to specify an entry in an overloading table that
8b1a09fc 2062doesn't somehow point to a valid subroutine. See L<overload>.
a0d0e21e
LW
2063
2064=item Not an ARRAY reference
2065
2066(F) Perl was trying to evaluate a reference to an array value, but
2067found a reference to something else instead. You can use the ref()
2068function to find out what kind of ref it really was. See L<perlref>.
2069
2070=item Not enough arguments for %s
2071
2072(F) The function requires more arguments than you specified.
2073
2074=item Not enough format arguments
2075
2076(W) A format specified more picture fields than the next line supplied.
2077See L<perlform>.
2078
2079=item Null filename used
2080
5f05dabc 2081(F) You can't require the null filename, especially because on many machines
a0d0e21e
LW
2082that means the current directory! See L<perlfunc/require>.
2083
55497cff
PP
2084=item Null picture in formline
2085
2086(F) The first argument to formline must be a valid format picture
2087specification. It was found to be empty, which probably means you
2088supplied it an uninitialized value. See L<perlform>.
2089
a0d0e21e
LW
2090=item NULL OP IN RUN
2091
2092(P) Some internal routine called run() with a null opcode pointer.
2093
2094=item Null realloc
2095
2096(P) An attempt was made to realloc NULL.
2097
2098=item NULL regexp argument
2099
5f05dabc 2100(P) The internal pattern matching routines blew it big time.
a0d0e21e
LW
2101
2102=item NULL regexp parameter
2103
2104(P) The internal pattern matching routines are out of their gourd.
2105
fc36a67e
PP
2106=item Number too long
2107
2108(F) Perl limits the representation of decimal numbers in programs to about
2109about 250 characters. You've exceeded that length. Future versions of
2110Perl are likely to eliminate this arbitrary limitation. In the meantime,
2111try using scientific notation (e.g. "1e6" instead of "1_000_000").
2112
252aa082
JH
2113=item Octal number > 037777777777 non-portable
2114
9e24b6e2
JH
2115(W) The octal number you specified is larger than 2**32-1 (4294967295)
2116and therefore non-portable between systems. See L<perlport> for more
2117on portability concerns.
252aa082
JH
2118
2119See also L<perlport> for writing portable code.
2120
1930e939 2121=item Odd number of elements in hash assignment
a0d0e21e 2122
1930e939
TP
2123(S) You specified an odd number of elements to initialize a hash, which
2124is odd, because hashes come in key/value pairs.
a0d0e21e 2125
bbce6d69
PP
2126=item Offset outside string
2127
2128(F) You tried to do a read/write/send/recv operation with an offset
2129pointing outside the buffer. This is difficult to imagine.
2130The sole exception to this is that C<sysread()>ing past the buffer
2131will extend the buffer and zero pad the new area.
2132
a0d0e21e
LW
2133=item oops: oopsAV
2134
2135(S) An internal warning that the grammar is screwed up.
2136
2137=item oops: oopsHV
2138
2139(S) An internal warning that the grammar is screwed up.
2140
56f7f34b 2141=item Operation `%s': no method found, %s
44a8e56a 2142
e7ea3e70
IZ
2143(F) An attempt was made to perform an overloaded operation for which
2144no handler was defined. While some handlers can be autogenerated in
2145terms of other handlers, there is no default handler for any
2146operation, unless C<fallback> overloading key is specified to be
2147true. See L<overload>.
44a8e56a 2148
748a9306
LW
2149=item Operator or semicolon missing before %s
2150
2151(S) You used a variable or subroutine call where the parser was
2152expecting an operator. The parser has assumed you really meant
2153to use an operator, but this is highly likely to be incorrect.
2154For example, if you say "*foo *foo" it will be interpreted as
2155if you said "*foo * 'foo'".
2156
a80b8354
GS
2157=item Out of memory!
2158
2159(X) The malloc() function returned 0, indicating there was insufficient
2160remaining memory (or virtual memory) to satisfy the request. Perl
2161has no option but to exit immediately.
2162
a0d0e21e
LW
2163=item Out of memory for yacc stack
2164
2165(F) The yacc parser wanted to grow its stack so it could continue parsing,
2166but realloc() wouldn't give it more memory, virtual or otherwise.
2167
1b979e0a 2168=item Out of memory during request for %s
a0d0e21e 2169
55497cff 2170(X|F) The malloc() function returned 0, indicating there was insufficient
54310121 2171remaining memory (or virtual memory) to satisfy the request.
eff9c6e2
CS
2172
2173The request was judged to be small, so the possibility to trap it
2174depends on the way perl was compiled. By default it is not trappable.
2175However, if compiled for this, Perl may use the contents of C<$^M> as
2176an emergency pool after die()ing with this message. In this case the
55497cff
PP
2177error is trappable I<once>.
2178
1b979e0a 2179=item Out of memory during "large" request for %s
55497cff
PP
2180
2181(F) The malloc() function returned 0, indicating there was insufficient
2182remaining memory (or virtual memory) to satisfy the request. However,
2183the request was judged large enough (compile-time default is 64K), so
2184a possibility to shut down by trapping this error is granted.
2185
1b979e0a
IZ
2186=item Out of memory during ridiculously large request
2187
2188(F) You can't allocate more than 2^31+"small amount" bytes. This error
2189is most likely to be caused by a typo in the Perl program. e.g., C<$arr[time]>
2190instead of C<$arr[$time]>.
2191
a0d0e21e
LW
2192=item page overflow
2193
2194(W) A single call to write() produced more lines than can fit on a page.
2195See L<perlform>.
2196
2197=item panic: ck_grep
2198
2199(P) Failed an internal consistency check trying to compile a grep.
2200
2201=item panic: ck_split
2202
2203(P) Failed an internal consistency check trying to compile a split.
2204
2205=item panic: corrupt saved stack index
2206
2207(P) The savestack was requested to restore more localized values than there
2208are in the savestack.
2209
810b8aa5
GS
2210=item panic: del_backref
2211
2212(P) Failed an internal consistency check while trying to reset a weak
2213reference.
2214
a0d0e21e
LW
2215=item panic: die %s
2216
2217(P) We popped the context stack to an eval context, and then discovered
2218it wasn't an eval context.
2219
2220=item panic: do_match
2221
2222(P) The internal pp_match() routine was called with invalid operational data.
2223
2224=item panic: do_split
2225
2226(P) Something terrible went wrong in setting up for the split.
2227
2228=item panic: do_subst
2229
2230(P) The internal pp_subst() routine was called with invalid operational data.
2231
2232=item panic: do_trans
2233
2234(P) The internal do_trans() routine was called with invalid operational data.
2235
c635e13b
PP
2236=item panic: frexp
2237
2238(P) The library function frexp() failed, making printf("%f") impossible.
2239
a0d0e21e
LW
2240=item panic: goto
2241
2242(P) We popped the context stack to a context with the specified label,
2243and then discovered it wasn't a context we know how to do a goto in.
2244
2245=item panic: INTERPCASEMOD
2246
2247(P) The lexer got into a bad state at a case modifier.
2248
2249=item panic: INTERPCONCAT
2250
2251(P) The lexer got into a bad state parsing a string with brackets.
2252
e446cec8
IZ
2253=item panic: kid popen errno read
2254
2255(F) forked child returned an incomprehensible message about its errno.
2256
a0d0e21e
LW
2257=item panic: last
2258
2259(P) We popped the context stack to a block context, and then discovered
2260it wasn't a block context.
2261
2262=item panic: leave_scope clearsv
2263
5f05dabc 2264(P) A writable lexical variable became read-only somehow within the scope.
a0d0e21e
LW
2265
2266=item panic: leave_scope inconsistency
2267
2268(P) The savestack probably got out of sync. At least, there was an
2269invalid enum on the top of it.
2270
2271=item panic: malloc
2272
2273(P) Something requested a negative number of bytes of malloc.
2274
810b8aa5
GS
2275=item panic: magic_killbackrefs
2276
2277(P) Failed an internal consistency check while trying to reset all weak
2278references to an object.
2279
a0d0e21e
LW
2280=item panic: mapstart
2281
2282(P) The compiler is screwed up with respect to the map() function.
2283
2284=item panic: null array
2285
2286(P) One of the internal array routines was passed a null AV pointer.
2287
2288=item panic: pad_alloc
2289
2290(P) The compiler got confused about which scratch pad it was allocating
2291and freeing temporaries and lexicals from.
2292
2293=item panic: pad_free curpad
2294
2295(P) The compiler got confused about which scratch pad it was allocating
2296and freeing temporaries and lexicals from.
2297
2298=item panic: pad_free po
2299
2300(P) An invalid scratch pad offset was detected internally.
2301
2302=item panic: pad_reset curpad
2303
2304(P) The compiler got confused about which scratch pad it was allocating
2305and freeing temporaries and lexicals from.
2306
2307=item panic: pad_sv po
2308
2309(P) An invalid scratch pad offset was detected internally.
2310
2311=item panic: pad_swipe curpad
2312
2313(P) The compiler got confused about which scratch pad it was allocating
2314and freeing temporaries and lexicals from.
2315
2316=item panic: pad_swipe po
2317
2318(P) An invalid scratch pad offset was detected internally.
2319
2320=item panic: pp_iter
2321
2322(P) The foreach iterator got called in a non-loop context frame.
2323
2324=item panic: realloc
2325
2326(P) Something requested a negative number of bytes of realloc.
2327
2328=item panic: restartop
2329
2330(P) Some internal routine requested a goto (or something like it), and
2331didn't supply the destination.
2332
2333=item panic: return
2334
2335(P) We popped the context stack to a subroutine or eval context, and
2336then discovered it wasn't a subroutine or eval context.
2337
2338=item panic: scan_num
2339
2340(P) scan_num() got called on something that wasn't a number.
2341
2342=item panic: sv_insert
2343
2344(P) The sv_insert() routine was told to remove more string than there
2345was string.
2346
2347=item panic: top_env
2348
6224f72b 2349(P) The compiler attempted to do a goto, or something weird like that.
a0d0e21e
LW
2350
2351=item panic: yylex
2352
2353(P) The lexer got into a bad state while processing a case modifier.
2354
7b8d334a 2355=item Parentheses missing around "%s" list
a0d0e21e
LW
2356
2357(W) You said something like
2358
2359 my $foo, $bar = @_;
2360
2361when you meant
2362
2363 my ($foo, $bar) = @_;
2364
2365Remember that "my" and "local" bind closer than comma.
2366
2367=item Perl %3.3f required--this is only version %s, stopped
2368
2369(F) The module in question uses features of a version of Perl more recent
2370than the currently running version. How long has it been since you upgraded,
2371anyway? See L<perlfunc/require>.
2372
2373=item Permission denied
2374
2375(F) The setuid emulator in suidperl decided you were up to no good.
2376
bd3fa61c 2377=item pid %x not a child
748a9306
LW
2378
2379(W) A warning peculiar to VMS. Waitpid() was asked to wait for a process which
2380isn't a subprocess of the current process. While this is fine from VMS'
2381perspective, it's probably not what you intended.
2382
a0d0e21e
LW
2383=item POSIX getpgrp can't take an argument
2384
81777298 2385(F) Your system has POSIX getpgrp(), which takes no argument, unlike
a0d0e21e
LW
2386the BSD version, which takes a pid.
2387
6bc102ca
GS
2388=item Possible Y2K bug: %s
2389
2390(W) You are concatenating the number 19 with another number, which
2391could be a potential Year 2000 problem.
2392
bbce6d69
PP
2393=item Possible attempt to put comments in qw() list
2394
774d564b
PP
2395(W) qw() lists contain items separated by whitespace; as with literal
2396strings, comment characters are not ignored, but are instead treated
2397as literal data. (You may have used different delimiters than the
7b8d334a 2398parentheses shown here; braces are also frequently used.)
bbce6d69 2399
774d564b
PP
2400You probably wrote something like this:
2401
54310121 2402 @list = qw(
774d564b 2403 a # a comment
bbce6d69 2404 b # another comment
774d564b 2405 );
bbce6d69
PP
2406
2407when you should have written this:
2408
774d564b 2409 @list = qw(
54310121
PP
2410 a
2411 b
774d564b
PP
2412 );
2413
2414If you really want comments, build your list the
2415old-fashioned way, with quotes and commas:
2416
2417 @list = (
2418 'a', # a comment
2419 'b', # another comment
2420 );
bbce6d69
PP
2421
2422=item Possible attempt to separate words with commas
2423
774d564b 2424(W) qw() lists contain items separated by whitespace; therefore commas
68dc0745 2425aren't needed to separate the items. (You may have used different
774d564b
PP
2426delimiters than the parentheses shown here; braces are also frequently
2427used.)
bbce6d69 2428
54310121 2429You probably wrote something like this:
bbce6d69 2430
774d564b
PP
2431 qw! a, b, c !;
2432
2433which puts literal commas into some of the list items. Write it without
2434commas if you don't want them to appear in your data:
bbce6d69 2435
774d564b 2436 qw! a b c !;
bbce6d69 2437
a0d0e21e
LW
2438=item Possible memory corruption: %s overflowed 3rd argument
2439
2440(F) An ioctl() or fcntl() returned more than Perl was bargaining for.
2441Perl guesses a reasonable buffer size, but puts a sentinel byte at the
2442end of the buffer just in case. This sentinel byte got clobbered, and
2443Perl assumes that memory is now corrupted. See L<perlfunc/ioctl>.
2444
2445=item Precedence problem: open %s should be open(%s)
2446
2447(S) The old irregular construct
cb1a09d0 2448
a0d0e21e
LW
2449 open FOO || die;
2450
2451is now misinterpreted as
2452
2453 open(FOO || die);
2454
68dc0745
PP
2455because of the strict regularization of Perl 5's grammar into unary
2456and list operators. (The old open was a little of both.) You must
2457put parentheses around the filehandle, or use the new "or" operator
2458instead of "||".
a0d0e21e 2459
3cdd684c
TP
2460=item Premature end of script headers
2461
2462See Server error.
2463
a0d0e21e
LW
2464=item print on closed filehandle %s
2465
2466(W) The filehandle you're printing on got itself closed sometime before now.
2467Check your logic flow.
2468
2469=item printf on closed filehandle %s
2470
2471(W) The filehandle you're writing to got itself closed sometime before now.
2472Check your logic flow.
2473
2474=item Probable precedence problem on %s
2475
54310121 2476(W) The compiler found a bareword where it expected a conditional,
a0d0e21e
LW
2477which often indicates that an || or && was parsed as part of the
2478last argument of the previous construct, for example:
2479
2480 open FOO || die;
2481
3fe9a6f1 2482=item Prototype mismatch: %s vs %s
4633a7c4 2483
3fe9a6f1
PP
2484(S) The subroutine being declared or defined had previously been declared
2485or defined with a different function prototype.
4633a7c4 2486
89ea2908
GA
2487=item Range iterator outside integer range
2488
2489(F) One (or both) of the numeric arguments to the range operator ".."
2490are outside the range which can be represented by integers internally.
2491One possible workaround is to force Perl to use magical string
2492increment by prepending "0" to your numbers.
2493
af8c498a 2494=item Read on closed filehandle %s
a0d0e21e
LW
2495
2496(W) The filehandle you're reading from got itself closed sometime before now.
2497Check your logic flow.
2498
4ad56ec9
IZ
2499=item realloc() of freed memory ignored
2500
2501(S) An internal routine called realloc() on something that had already
2502been freed.
2503
a0d0e21e
LW
2504=item Reallocation too large: %lx
2505
54310121 2506(F) You can't allocate more than 64K on an MS-DOS machine.
a0d0e21e
LW
2507
2508=item Recompile perl with B<-D>DEBUGGING to use B<-D> switch
2509
2510(F) You can't use the B<-D> option unless the code to produce the
2511desired output is compiled into Perl, which entails some overhead,
2512which is why it's currently left out of your copy.
2513
3e0ccd42 2514=item Recursive inheritance detected in package '%s'
a0d0e21e
LW
2515
2516(F) More than 100 levels of inheritance were used. Probably indicates
2517an unintended loop in your inheritance hierarchy.
2518
3e0ccd42
JP
2519=item Recursive inheritance detected while looking for method '%s' in package '%s'
2520
2521(F) More than 100 levels of inheritance were encountered while invoking a
2522method. Probably indicates an unintended loop in your inheritance hierarchy.
2523
1930e939
TP
2524=item Reference found where even-sized list expected
2525
2526(W) You gave a single reference where Perl was expecting a list with
2527an even number of elements (for assignment to a hash). This
2528usually means that you used the anon hash constructor when you meant
2529to use parens. In any case, a hash requires key/value B<pairs>.
7b8d334a
GS
2530
2531 %hash = { one => 1, two => 2, }; # WRONG
2532 %hash = [ qw/ an anon array / ]; # WRONG
2533 %hash = ( one => 1, two => 2, ); # right
2534 %hash = qw( one 1 two 2 ); # also fine
2535
810b8aa5
GS
2536=item Reference is already weak
2537
2538(W) You have attempted to weaken a reference that is already weak.
2539Doing so has no effect.
2540
a0d0e21e
LW
2541=item Reference miscount in sv_replace()
2542
2543(W) The internal sv_replace() function was handed a new SV with a
2544reference count of other than 1.
2545
fb73857a
PP
2546=item regexp *+ operand could be empty
2547
2548(F) The part of the regexp subject to either the * or + quantifier
2549could match an empty string.
2550
a0d0e21e
LW
2551=item regexp memory corruption
2552
2553(P) The regular expression engine got confused by what the regular
2554expression compiler gave it.
2555
2556=item regexp out of space
2557
2558(P) A "can't happen" error, because safemalloc() should have caught it earlier.
2559
a0d0e21e
LW
2560=item Reversed %s= operator
2561
2562(W) You wrote your assignment operator backwards. The = must always
2563comes last, to avoid ambiguity with subsequent unary operators.
2564
2565=item Runaway format
2566
2567(F) Your format contained the ~~ repeat-until-blank sequence, but it
2568produced 200 lines at once, and the 200th line looked exactly like the
2569199th line. Apparently you didn't arrange for the arguments to exhaust
2570themselves, either by using ^ instead of @ (for scalar variables), or by
2571shifting or popping (for array variables). See L<perlform>.
2572
2573=item Scalar value @%s[%s] better written as $%s[%s]
2574
a6006777 2575(W) You've used an array slice (indicated by @) to select a single element of
a0d0e21e 2576an array. Generally it's better to ask for a scalar value (indicated by $).
8b1a09fc
PP
2577The difference is that C<$foo[&bar]> always behaves like a scalar, both when
2578assigning to it and when evaluating its argument, while C<@foo[&bar]> behaves
a0d0e21e 2579like a list when you assign to it, and provides a list context to its
5f05dabc 2580subscript, which can do weird things if you're expecting only one subscript.
a0d0e21e 2581
748a9306 2582On the other hand, if you were actually hoping to treat the array
5f05dabc 2583element as a list, you need to look into how references work, because
748a9306
LW
2584Perl will not magically convert between scalars and lists for you. See
2585L<perlref>.
2586
a6006777
PP
2587=item Scalar value @%s{%s} better written as $%s{%s}
2588
2589(W) You've used a hash slice (indicated by @) to select a single element of
2590a hash. Generally it's better to ask for a scalar value (indicated by $).
2591The difference is that C<$foo{&bar}> always behaves like a scalar, both when
2592assigning to it and when evaluating its argument, while C<@foo{&bar}> behaves
2593like a list when you assign to it, and provides a list context to its
2594subscript, which can do weird things if you're expecting only one subscript.
2595
2596On the other hand, if you were actually hoping to treat the hash
2597element as a list, you need to look into how references work, because
2598Perl will not magically convert between scalars and lists for you. See
2599L<perlref>.
2600
a0d0e21e
LW
2601=item Script is not setuid/setgid in suidperl
2602
54310121
PP
2603(F) Oddly, the suidperl program was invoked on a script without a setuid
2604or setgid bit set. This doesn't make much sense.
a0d0e21e
LW
2605
2606=item Search pattern not terminated
2607
2608(F) The lexer couldn't find the final delimiter of a // or m{}
2609construct. Remember that bracketing delimiters count nesting level.
fb73857a 2610Missing the leading C<$> from a variable C<$m> may cause this error.
a0d0e21e 2611
96e4d5b1 2612=item %sseek() on unopened file
a0d0e21e 2613
96e4d5b1
PP
2614(W) You tried to use the seek() or sysseek() function on a filehandle that
2615was either never opened or has since been closed.
a0d0e21e
LW
2616
2617=item select not implemented
2618
2619(F) This machine doesn't implement the select() system call.
2620
2621=item sem%s not implemented
2622
2623(F) You don't have System V semaphore IPC on your system.
2624
2625=item semi-panic: attempt to dup freed string
2626
2627(S) The internal newSVsv() routine was called to duplicate a scalar
2628that had previously been marked as free.
2629
2630=item Semicolon seems to be missing
2631
2632(W) A nearby syntax error was probably caused by a missing semicolon,
2633or possibly some other missing operator, such as a comma.
2634
2635=item Send on closed socket
2636
2637(W) The filehandle you're sending to got itself closed sometime before now.
2638Check your logic flow.
2639
1b1626e4 2640=item Sequence (? incomplete
7b8d334a 2641
1b1626e4
G
2642(F) A regular expression ended with an incomplete extension (?.
2643See L<perlre>.
2644
a0d0e21e
LW
2645=item Sequence (?#... not terminated
2646
2647(F) A regular expression comment must be terminated by a closing
5f05dabc 2648parenthesis. Embedded parentheses aren't allowed. See L<perlre>.
a0d0e21e
LW
2649
2650=item Sequence (?%s...) not implemented
2651
2652(F) A proposed regular expression extension has the character reserved
2653but has not yet been written. See L<perlre>.
2654
2655=item Sequence (?%s...) not recognized
2656
2657(F) You used a regular expression extension that doesn't make sense.
2658See L<perlre>.
2659
a5f75d66
AD
2660=item Server error
2661
3cdd684c
TP
2662This is the error message generally seen in a browser window when trying
2663to run a CGI program (including SSI) over the web. The actual error
2664text varies widely from server to server. The most frequently-seen
2665variants are "500 Server error", "Method (something) not permitted",
2666"Document contains no data", "Premature end of script headers", and
2667"Did not produce a valid header".
9607fc9c
PP
2668
2669B<This is a CGI error, not a Perl error>.
2670
2671You need to make sure your script is executable, is accessible by the user
2672CGI is running the script under (which is probably not the user account you
2673tested it under), does not rely on any environment variables (like PATH)
2674from the user it isn't running under, and isn't in a location where the CGI
2675server can't find it, basically, more or less. Please see the following
2676for more information:
2677
be94a901
GS
2678 http://www.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html
2679 http://www.perl.com/CPAN/doc/FAQs/cgi/perl-cgi-faq.html
9607fc9c
PP
2680 ftp://rtfm.mit.edu/pub/usenet/news.answers/www/cgi-faq
2681 http://hoohoo.ncsa.uiuc.edu/cgi/interface.html
2682 http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html
a5f75d66 2683
be94a901
GS
2684You should also look at L<perlfaq9>.
2685
a0d0e21e
LW
2686=item setegid() not implemented
2687
8b1a09fc 2688(F) You tried to assign to C<$)>, and your operating system doesn't support
a0d0e21e
LW
2689the setegid() system call (or equivalent), or at least Configure didn't
2690think so.
2691
2692=item seteuid() not implemented
2693
8b1a09fc 2694(F) You tried to assign to C<$E<gt>>, and your operating system doesn't support
a0d0e21e
LW
2695the seteuid() system call (or equivalent), or at least Configure didn't
2696think so.
2697
81777298
GS
2698=item setpgrp can't take arguments
2699
2700(F) Your system has the setpgrp() from BSD 4.2, which takes no arguments,
2701unlike POSIX setpgid(), which takes a process ID and process group ID.
2702
a0d0e21e
LW
2703=item setrgid() not implemented
2704
8b1a09fc 2705(F) You tried to assign to C<$(>, and your operating system doesn't support
a0d0e21e
LW
2706the setrgid() system call (or equivalent), or at least Configure didn't
2707think so.
2708
2709=item setruid() not implemented
2710
1f8d2005 2711(F) You tried to assign to C<$E<lt>>, and your operating system doesn't support
a0d0e21e
LW
2712the setruid() system call (or equivalent), or at least Configure didn't
2713think so.
2714
2715=item Setuid/gid script is writable by world
2716
2717(F) The setuid emulator won't run a script that is writable by the world,
2718because the world might have written on it already.
2719
2720=item shm%s not implemented
2721
2722(F) You don't have System V shared memory IPC on your system.
2723
2724=item shutdown() on closed fd
2725
2726(W) You tried to do a shutdown on a closed socket. Seems a bit superfluous.
2727
f86702cc 2728=item SIG%s handler "%s" not defined
a0d0e21e
LW
2729
2730(W) The signal handler named in %SIG doesn't, in fact, exist. Perhaps you
2731put it into the wrong package?
2732
2733=item sort is now a reserved word
2734
2735(F) An ancient error message that almost nobody ever runs into anymore.
2736But before sort was a keyword, people sometimes used it as a filehandle.
2737
2738=item Sort subroutine didn't return a numeric value
2739
2740(F) A sort comparison routine must return a number. You probably blew
4633a7c4 2741it by not using C<E<lt>=E<gt>> or C<cmp>, or by not using them correctly.
a0d0e21e
LW
2742See L<perlfunc/sort>.
2743
2744=item Sort subroutine didn't return single value
2745
2746(F) A sort comparison subroutine may not return a list value with more
2747or less than one element. See L<perlfunc/sort>.
2748
2749=item Split loop
2750
2751(P) The split was looping infinitely. (Obviously, a split shouldn't iterate
2752more times than there are characters of input, which is what happened.)
2753See L<perlfunc/split>.
2754
8b1a09fc 2755=item Stat on unopened file E<lt>%sE<gt>
a0d0e21e
LW
2756
2757(W) You tried to use the stat() function (or an equivalent file test)
54310121 2758on a filehandle that was either never opened or has since been closed.
a0d0e21e
LW
2759
2760=item Statement unlikely to be reached
2761
2762(W) You did an exec() with some statement after it other than a die().
2763This is almost always an error, because exec() never returns unless
2764there was a failure. You probably wanted to use system() instead,
2765which does return. To suppress this warning, put the exec() in a block
2766by itself.
2767
17feb5d5
DD
2768=item Strange *+?{} on zero-length expression
2769
2770(W) You applied a regular expression quantifier in a place where it
2771makes no sense, such as on a zero-width assertion.
2772Try putting the quantifier inside the assertion instead. For example,
2773the way to match "abc" provided that it is followed by three
2774repetitions of "xyz" is C</abc(?=(?:xyz){3})/>, not C</abc(?=xyz){3}/>.
2775
e7ea3e70
IZ
2776=item Stub found while resolving method `%s' overloading `%s' in package `%s'
2777
2778(P) Overloading resolution over @ISA tree may be broken by importation stubs.
2779Stubs should never be implicitely created, but explicit calls to C<can>
2780may break this.
2781
a0d0e21e
LW
2782=item Subroutine %s redefined
2783
2784(W) You redefined a subroutine. To suppress this warning, say
2785
2786 {
4438c4b7 2787 no warnings;
a0d0e21e
LW
2788 eval "sub name { ... }";
2789 }
2790
2791=item Substitution loop
2792
2793(P) The substitution was looping infinitely. (Obviously, a
2794substitution shouldn't iterate more times than there are characters of
68dc0745 2795input, which is what happened.) See the discussion of substitution in
5f05dabc 2796L<perlop/"Quote and Quote-like Operators">.
a0d0e21e
LW
2797
2798=item Substitution pattern not terminated
2799
2800(F) The lexer couldn't find the interior delimiter of a s/// or s{}{}
2801construct. Remember that bracketing delimiters count nesting level.
fb73857a 2802Missing the leading C<$> from variable C<$s> may cause this error.
a0d0e21e
LW
2803
2804=item Substitution replacement not terminated
2805
2806(F) The lexer couldn't find the final delimiter of a s/// or s{}{}
2807construct. Remember that bracketing delimiters count nesting level.
fb73857a 2808Missing the leading C<$> from variable C<$s> may cause this error.
a0d0e21e
LW
2809
2810=item substr outside of string
2811
3e3baf6d
TB
2812(S),(W) You tried to reference a substr() that pointed outside of a
2813string. That is, the absolute value of the offset was larger than the
2814length of the string. See L<perlfunc/substr>. This warning is
2815mandatory if substr is used in an lvalue context (as the left hand side
2816of an assignment or as a subroutine argument for example).
a0d0e21e 2817
f86702cc 2818=item suidperl is no longer needed since %s
a0d0e21e
LW
2819
2820(F) Your Perl was compiled with B<-D>SETUID_SCRIPTS_ARE_SECURE_NOW, but a
2821version of the setuid emulator somehow got run anyway.
2822
85ab1d1d
JH
2823=item switching effective %s is not implemented
2824
2825(F) While under the C<use filetest> pragma, we cannot switch the
2826real and effective uids or gids.
2827
a0d0e21e
LW
2828=item syntax error
2829
2830(F) Probably means you had a syntax error. Common reasons include:
2831
2832 A keyword is misspelled.
2833 A semicolon is missing.
2834 A comma is missing.
2835 An opening or closing parenthesis is missing.
2836 An opening or closing brace is missing.
2837 A closing quote is missing.
2838
2839Often there will be another error message associated with the syntax
2840error giving more information. (Sometimes it helps to turn on B<-w>.)
2841The error message itself often tells you where it was in the line when
2842it decided to give up. Sometimes the actual error is several tokens
5f05dabc 2843before this, because Perl is good at understanding random input.
a0d0e21e
LW
2844Occasionally the line number may be misleading, and once in a blue moon
2845the only way to figure out what's triggering the error is to call
2846C<perl -c> repeatedly, chopping away half the program each time to see
2847if the error went away. Sort of the cybernetic version of S<20 questions>.
2848
cb1a09d0
AD
2849=item syntax error at line %d: `%s' unexpected
2850
8b1a09fc 2851(A) You've accidentally run your script through the Bourne shell
3a52c276 2852instead of Perl. Check the #! line, or manually feed your script
cb1a09d0
AD
2853into Perl yourself.
2854
6087ac44 2855=item System V %s is not implemented on this machine
a0d0e21e 2856
6087ac44
JH
2857(F) You tried to do something with a function beginning with "sem",
2858"shm", or "msg" but that System V IPC is not implemented in your
2859machine. In some machines the functionality can exist but be
2860unconfigured. Consult your system support.
a0d0e21e
LW
2861
2862=item Syswrite on closed filehandle
2863
2864(W) The filehandle you're writing to got itself closed sometime before now.
2865Check your logic flow.
2866
fc36a67e
PP
2867=item Target of goto is too deeply nested
2868
2869(F) You tried to use C<goto> to reach a label that was too deeply
2870nested for Perl to reach. Perl is doing you a favor by refusing.
2871
8903cb82 2872=item tell() on unopened file
a0d0e21e 2873
8903cb82
PP
2874(W) You tried to use the tell() function on a filehandle that was either
2875never opened or has since been closed.
a0d0e21e 2876
8b1a09fc 2877=item Test on unopened file E<lt>%sE<gt>
a0d0e21e
LW
2878
2879(W) You tried to invoke a file test operator on a filehandle that isn't
2880open. Check your logic. See also L<perlfunc/-X>.
2881
2882=item That use of $[ is unsupported
2883
8b1a09fc 2884(F) Assignment to C<$[> is now strictly circumscribed, and interpreted as
5f05dabc 2885a compiler directive. You may say only one of
a0d0e21e
LW
2886
2887 $[ = 0;
2888 $[ = 1;
2889 ...
2890 local $[ = 0;
2891 local $[ = 1;
2892 ...
2893
2894This is to prevent the problem of one module changing the array base
2895out from under another module inadvertently. See L<perlvar/$[>.
2896
2897=item The %s function is unimplemented
2898
2899The function indicated isn't implemented on this architecture, according
2900to the probings of Configure.
2901
f86702cc 2902=item The crypt() function is unimplemented due to excessive paranoia
a0d0e21e
LW
2903
2904(F) Configure couldn't find the crypt() function on your machine,
2905probably because your vendor didn't supply it, probably because they
8b1a09fc 2906think the U.S. Government thinks it's a secret, or at least that they
a0d0e21e
LW
2907will continue to pretend that it is. And if you quote me on that, I
2908will deny it.
2909
2910=item The stat preceding C<-l _> wasn't an lstat
2911
2912(F) It makes no sense to test the current stat buffer for symbolic linkhood
2913if the last stat that wrote to the stat buffer already went past
2914the symlink to get to the real file. Use an actual filename instead.
2915
437784d6 2916=item This Perl can't reset CRTL environ elements (%s)
f675dbe5
CB
2917
2918=item This Perl can't set CRTL environ elements (%s=%s)
2919
2920(W) Warnings peculiar to VMS. You tried to change or delete an element
2921of the CRTL's internal environ array, but your copy of Perl wasn't
2922built with a CRTL that contained the setenv() function. You'll need to
2923rebuild Perl with a CRTL that does, or redefine F<PERL_ENV_TABLES> (see
2924L<perlvms>) so that the environ array isn't the target of the change to
2925%ENV which produced the warning.
2926
a0d0e21e
LW
2927=item times not implemented
2928
2929(F) Your version of the C library apparently doesn't do times(). I suspect
2930you're not running on Unix.
2931
2932=item Too few args to syscall
2933
2934(F) There has to be at least one argument to syscall() to specify the
2935system call to call, silly dilly.
2936
9607fc9c
PP
2937=item Too late for "B<-T>" option
2938
2939(X) The #! line (or local equivalent) in a Perl script contains the
8cc95fdb
PP
2940B<-T> option, but Perl was not invoked with B<-T> in its command line.
2941This is an error because, by the time Perl discovers a B<-T> in a
2942script, it's too late to properly taint everything from the environment.
2943So Perl gives up.
f86702cc 2944
9607fc9c
PP
2945If the Perl script is being executed as a command using the #!
2946mechanism (or its local equivalent), this error can usually be fixed
2947by editing the #! line so that the B<-T> option is a part of Perl's
2948first argument: e.g. change C<perl -n -T> to C<perl -T -n>.
f86702cc 2949
9607fc9c
PP
2950If the Perl script is being executed as C<perl scriptname>, then the
2951B<-T> option must appear on the command line: C<perl -T scriptname>.
f86702cc 2952
8cc95fdb
PP
2953=item Too late for "-%s" option
2954
2955(X) The #! line (or local equivalent) in a Perl script contains the
2956B<-M> or B<-m> option. This is an error because B<-M> and B<-m> options
2957are not intended for use inside scripts. Use the C<use> pragma instead.
2958
cb1a09d0
AD
2959=item Too many ('s
2960
2961=item Too many )'s
2962
2963(A) You've accidentally run your script through B<csh> instead
3a52c276
CS
2964of Perl. Check the #! line, or manually feed your script into
2965Perl yourself.
cb1a09d0 2966
a0d0e21e
LW
2967=item Too many args to syscall
2968
5f05dabc 2969(F) Perl supports a maximum of only 14 args to syscall().
a0d0e21e
LW
2970
2971=item Too many arguments for %s
2972
2973(F) The function requires fewer arguments than you specified.
2974
2975=item trailing \ in regexp
2976
2977(F) The regular expression ends with an unbackslashed backslash. Backslash
2978it. See L<perlre>.
2979
2c268ad5 2980=item Transliteration pattern not terminated
a0d0e21e
LW
2981
2982(F) The lexer couldn't find the interior delimiter of a tr/// or tr[][]
fb73857a
PP
2983or y/// or y[][] construct. Missing the leading C<$> from variables
2984C<$tr> or C<$y> may cause this error.
a0d0e21e 2985
2c268ad5 2986=item Transliteration replacement not terminated
a0d0e21e
LW
2987
2988(F) The lexer couldn't find the final delimiter of a tr/// or tr[][]
2989construct.
2990
2991=item truncate not implemented
2992
2993(F) Your machine doesn't implement a file truncation mechanism that
2994Configure knows about.
2995
2996=item Type of arg %d to %s must be %s (not %s)
2997
2998(F) This function requires the argument in that position to be of a
8b1a09fc
PP
2999certain type. Arrays must be @NAME or C<@{EXPR}>. Hashes must be
3000%NAME or C<%{EXPR}>. No implicit dereferencing is allowed--use the
a0d0e21e
LW
3001{EXPR} forms as an explicit dereference. See L<perlref>.
3002
3003=item umask: argument is missing initial 0
3004
eec2d3df
GS
3005(W) A umask of 222 is incorrect. It should be 0222, because octal
3006literals always start with 0 in Perl, as in C.
3007
3008=item umask not implemented
3009
3010(F) Your machine doesn't implement the umask function and you tried
3011to use it to restrict permissions for yourself (EXPR & 0700).
a0d0e21e 3012
4633a7c4
LW
3013=item Unable to create sub named "%s"
3014
3015(F) You attempted to create or access a subroutine with an illegal name.
3016
a0d0e21e
LW
3017=item Unbalanced context: %d more PUSHes than POPs
3018
3019(W) The exit code detected an internal inconsistency in how many execution
3020contexts were entered and left.
3021
3022=item Unbalanced saves: %d more saves than restores
3023
3024(W) The exit code detected an internal inconsistency in how many
3025values were temporarily localized.
3026
3027=item Unbalanced scopes: %d more ENTERs than LEAVEs
3028
3029(W) The exit code detected an internal inconsistency in how many blocks
3030were entered and left.
3031
3032=item Unbalanced tmps: %d more allocs than frees
3033
3034(W) The exit code detected an internal inconsistency in how many mortal
3035scalars were allocated and freed.
3036
3037=item Undefined format "%s" called
3038
3039(F) The format indicated doesn't seem to exist. Perhaps it's really in
3040another package? See L<perlform>.
3041
3042=item Undefined sort subroutine "%s" called
3043
3044(F) The sort comparison routine specified doesn't seem to exist. Perhaps
3045it's in a different package? See L<perlfunc/sort>.
3046
3047=item Undefined subroutine &%s called
3048
3049(F) The subroutine indicated hasn't been defined, or if it was, it
3050has since been undefined.
3051
3052=item Undefined subroutine called
3053
3054(F) The anonymous subroutine you're trying to call hasn't been defined,
3055or if it was, it has since been undefined.
3056
3057=item Undefined subroutine in sort
3058
3059(F) The sort comparison routine specified is declared but doesn't seem to
3060have been defined yet. See L<perlfunc/sort>.
3061
4633a7c4
LW
3062=item Undefined top format "%s" called
3063
3064(F) The format indicated doesn't seem to exist. Perhaps it's really in
3065another package? See L<perlform>.
3066
20408e3c
GS
3067=item Undefined value assigned to typeglob
3068
3069(W) An undefined value was assigned to a typeglob, a la C<*foo = undef>.
3070This does nothing. It's possible that you really mean C<undef *foo>.
3071
a0d0e21e
LW
3072=item unexec of %s into %s failed!
3073
3074(F) The unexec() routine failed for some reason. See your local FSF
3075representative, who probably put it there in the first place.
3076
3077=item Unknown BYTEORDER
3078
5f05dabc 3079(F) There are no byte-swapping functions for a machine with this byte order.
a0d0e21e 3080
6170680b
IZ
3081=item Unknown open() mode '%s'
3082
437784d6
GS
3083(F) The second argument of 3-argument open() is not among the list
3084of valid modes: C<L<lt>>, C<L<gt>>, C<E<gt>E<gt>>, C<+L<lt>>,
3085C<+L<gt>>, C<+E<gt>E<gt>>, C<-|>, C<|->.
6170680b 3086
f675dbe5
CB
3087=item Unknown process %x sent message to prime_env_iter: %s
3088
3089(P) An error peculiar to VMS. Perl was reading values for %ENV before
3090iterating over it, and someone else stuck a message in the stream of
3091data Perl expected. Someone's very confused, or perhaps trying to
3092subvert Perl's population of %ENV for nefarious purposes.
3093
a0d0e21e
LW
3094=item unmatched () in regexp
3095
3096(F) Unbackslashed parentheses must always be balanced in regular
3097expressions. If you're a vi user, the % key is valuable for finding
5f05dabc 3098the matching parenthesis. See L<perlre>.
a0d0e21e 3099
d98d5fff 3100=item Unmatched right %s bracket
a0d0e21e 3101
d98d5fff
GS
3102(F) The lexer counted more closing curly or square brackets than
3103opening ones, so you're probably missing a matching opening bracket.
3104As a general rule, you'll find the missing one (so to speak) near the
3105place you were last editing.
a0d0e21e
LW
3106
3107=item unmatched [] in regexp
3108
3109(F) The brackets around a character class must match. If you wish to
3110include a closing bracket in a character class, backslash it or put it first.
3111See L<perlre>.
3112
3113=item Unquoted string "%s" may clash with future reserved word
3114
54310121 3115(W) You used a bareword that might someday be claimed as a reserved word.
a0d0e21e
LW
3116It's best to put such a word in quotes, or capitalize it somehow, or insert
3117an underbar into it. You might also declare it as a subroutine.
3118
54310121 3119=item Unrecognized character %s
a0d0e21e 3120
54310121
PP
3121(F) The Perl parser has no idea what to do with the specified character
3122in your Perl script (or eval). Perhaps you tried to run a compressed
3123script, a binary program, or a directory as a Perl program.
a0d0e21e 3124
c9f97d15
IZ
3125=item Unrecognized escape \\%c passed through
3126
3127(W) You used a backslash-character combination which is not recognized
3128by Perl.
3129
a0d0e21e
LW
3130=item Unrecognized signal name "%s"
3131
3132(F) You specified a signal name to the kill() function that was not recognized.
3133Say C<kill -l> in your shell to see the valid signal names on your system.
3134
90248788 3135=item Unrecognized switch: -%s (-h will show valid options)
a0d0e21e
LW
3136
3137(F) You specified an illegal option to Perl. Don't do that.
3138(If you think you didn't do that, check the #! line to see if it's
3139supplying the bad switch on your behalf.)
3140
3141=item Unsuccessful %s on filename containing newline
3142
3143(W) A file operation was attempted on a filename, and that operation
3144failed, PROBABLY because the filename contained a newline, PROBABLY
54310121 3145because you forgot to chop() or chomp() it off. See L<perlfunc/chomp>.
a0d0e21e
LW
3146
3147=item Unsupported directory function "%s" called
3148
3149(F) Your machine doesn't support opendir() and readdir().
3150
54310121
PP
3151=item Unsupported function fork
3152
3153(F) Your version of executable does not support forking.
3154
3155Note that under some systems, like OS/2, there may be different flavors of
3156Perl executables, some of which may support fork, some not. Try changing
3157the name you call Perl by to C<perl_>, C<perl__>, and so on.
3158
a0d0e21e
LW
3159=item Unsupported function %s
3160
7b8d334a 3161(F) This machine doesn't implement the indicated function, apparently.
a0d0e21e
LW
3162At least, Configure doesn't think so.
3163
3164=item Unsupported socket function "%s" called
3165
3166(F) Your machine doesn't support the Berkeley socket mechanism, or at
3167least that's what Configure thought.
3168
8b1a09fc 3169=item Unterminated E<lt>E<gt> operator
a0d0e21e
LW
3170
3171(F) The lexer saw a left angle bracket in a place where it was expecting
3172a term, so it's looking for the corresponding right angle bracket, and not
3173finding it. Chances are you left some needed parentheses out earlier in
3174the line, and you really meant a "less than".
3175
09bef843
SB
3176=item Unterminated attribute parameter in attribute list
3177
3178(F) The lexer saw an opening (left) parenthesis character while parsing an
3179attribute list, but the matching closing (right) parenthesis
3180character was not found. You may need to add (or remove) a backslash
3181character to get your parentheses to balance. See L<attributes>.
3182
3183=item Unterminated attribute list
3184
3185(F) The lexer found something other than a simple identifier at the start
3186of an attribute, and it wasn't a semicolon or the start of a
3187block. Perhaps you terminated the parameter list of the previous attribute
3188too soon. See L<attributes>.
3189
a0d0e21e
LW
3190=item Use of $# is deprecated
3191
8b1a09fc 3192(D) This was an ill-advised attempt to emulate a poorly defined B<awk> feature.
a0d0e21e
LW
3193Use an explicit printf() or sprintf() instead.
3194
3195=item Use of $* is deprecated
3196
4a6725af 3197(D) This variable magically turned on multi-line pattern matching, both for
a0d0e21e
LW
3198you and for any luckless subroutine that you happen to call. You should
3199use the new C<//m> and C<//s> modifiers now to do that without the dangerous
3200action-at-a-distance effects of C<$*>.
3201
748a9306
LW
3202=item Use of %s in printf format not supported
3203
5f05dabc
PP
3204(F) You attempted to use a feature of printf that is accessible from
3205only C. This usually means there's a better way to do it in Perl.
748a9306 3206
8b1a09fc 3207=item Use of bare E<lt>E<lt> to mean E<lt>E<lt>"" is deprecated
4633a7c4
LW
3208
3209(D) You are now encouraged to use the explicitly quoted form if you
3fe9a6f1 3210wish to use an empty line as the terminator of the here-document.
4633a7c4 3211
a0d0e21e
LW
3212=item Use of implicit split to @_ is deprecated
3213
3214(D) It makes a lot of work for the compiler when you clobber a
3215subroutine's argument list, so it's better if you assign the results of
3216a split() explicitly to an array (or list).
3217
dc848c6f
PP
3218=item Use of inherited AUTOLOAD for non-method %s() is deprecated
3219
5cd24f17
PP
3220(D) As an (ahem) accidental feature, C<AUTOLOAD> subroutines are looked
3221up as methods (using the C<@ISA> hierarchy) even when the subroutines to
3222be autoloaded were called as plain functions (e.g. C<Foo::bar()>), not
7b8d334a 3223as methods (e.g. C<Foo-E<gt>bar()> or C<$obj-E<gt>bar()>).
dc848c6f
PP
3224
3225This bug will be rectified in Perl 5.005, which will use method lookup
3226only for methods' C<AUTOLOAD>s. However, there is a significant base
3227of existing code that may be using the old behavior. So, as an
3228interim step, Perl 5.004 issues an optional warning when non-methods
3229use inherited C<AUTOLOAD>s.
3230
3231The simple rule is: Inheritance will not work when autoloading
3232non-methods. The simple fix for old code is: In any module that used to
3233depend on inheriting C<AUTOLOAD> for non-methods from a base class named
3234C<BaseClass>, execute C<*AUTOLOAD = \&BaseClass::AUTOLOAD> during startup.
3235
fb73857a
PP
3236In code that currently says C<use AutoLoader; @ISA = qw(AutoLoader);> you
3237should remove AutoLoader from @ISA and change C<use AutoLoader;> to
7b8d334a 3238C<use AutoLoader 'AUTOLOAD';>.
fb73857a 3239
85b81015
LW
3240=item Use of reserved word "%s" is deprecated
3241
3242(D) The indicated bareword is a reserved word. Future versions of perl
3243may use it as a keyword, so you're better off either explicitly quoting
3244the word in a manner appropriate for its context of use, or using a
3245different name altogether. The warning can be suppressed for subroutine
3246names by either adding a C<&> prefix, or using a package qualifier,
3247e.g. C<&our()>, or C<Foo::our()>.
3248
dc848c6f
PP
3249=item Use of %s is deprecated
3250
3251(D) The construct indicated is no longer recommended for use, generally
3252because there's a better way to do it, and also because the old way has
3253bad side effects.
3254
a0d0e21e
LW
3255=item Use of uninitialized value
3256
3257(W) An undefined value was used as if it were already defined. It was
3258interpreted as a "" or a 0, but maybe it was a mistake. To suppress this
5311ebfa 3259warning assign a defined value to your variables.
a0d0e21e 3260
8202fd39
G
3261=item Useless use of "re" pragma
3262
3263(W) You did C<use re;> without any arguments. That isn't very useful.
3264
a0d0e21e
LW
3265=item Useless use of %s in void context
3266
3267(W) You did something without a side effect in a context that does nothing
3268with the return value, such as a statement that doesn't return a value
3269from a block, or the left side of a scalar comma operator. Very often
3270this points not to stupidity on your part, but a failure of Perl to parse
3271your program the way you thought it would. For example, you'd get this
3272if you mixed up your C precedence with Python precedence and said
3273
3274 $one, $two = 1, 2;
3275
3276when you meant to say
3277
3278 ($one, $two) = (1, 2);
3279
748a9306
LW
3280Another common error is to use ordinary parentheses to construct a list
3281reference when you should be using square or curly brackets, for
3282example, if you say
3283
3284 $array = (1,2);
3285
3286when you should have said
3287
3288 $array = [1,2];
3289
3290The square brackets explicitly turn a list value into a scalar value,
3291while parentheses do not. So when a parenthesized list is evaluated in
3292a scalar context, the comma is treated like C's comma operator, which
3293throws away the left argument, which is not what you want. See
3294L<perlref> for more on this.
3295
55497cff
PP
3296=item untie attempted while %d inner references still exist
3297
3298(W) A copy of the object returned from C<tie> (or C<tied>) was still
3299valid when C<untie> was called.
3300
68dc0745 3301=item Value of %s can be "0"; test with defined()
a6006777 3302
68dc0745
PP
3303(W) In a conditional expression, you used <HANDLE>, <*> (glob), C<each()>,
3304or C<readdir()> as a boolean value. Each of these constructs can return a
3305value of "0"; that would make the conditional expression false, which is
3306probably not what you intended. When using these constructs in conditional
3307expressions, test their values with the C<defined> operator.
a6006777 3308
f675dbe5
CB
3309=item Value of CLI symbol "%s" too long
3310
3311(W) A warning peculiar to VMS. Perl tried to read the value of an %ENV
3312element from a CLI symbol table, and found a resultant string longer
3313than 1024 characters. The return value has been truncated to 1024
3314characters.
3315
9607fc9c 3316=item Variable "%s" is not imported%s
4633a7c4
LW
3317
3318(F) While "use strict" in effect, you referred to a global variable
3319that you apparently thought was imported from another module, because
3320something else of the same name (usually a subroutine) is exported
3321by that module. It usually means you put the wrong funny character
3322on the front of your variable.
3323
44a8e56a
PP
3324=item Variable "%s" may be unavailable
3325
3326(W) An inner (nested) I<anonymous> subroutine is inside a I<named>
3327subroutine, and outside that is another subroutine; and the anonymous
3328(innermost) subroutine is referencing a lexical variable defined in
3329the outermost subroutine. For example:
3330
3331 sub outermost { my $a; sub middle { sub { $a } } }
3332
3333If the anonymous subroutine is called or referenced (directly or
3334indirectly) from the outermost subroutine, it will share the variable
3335as you would expect. But if the anonymous subroutine is called or
3336referenced when the outermost subroutine is not active, it will see
3337the value of the shared variable as it was before and during the
3338*first* call to the outermost subroutine, which is probably not what
3339you want.
3340
3341In these circumstances, it is usually best to make the middle
3342subroutine anonymous, using the C<sub {}> syntax. Perl has specific
3343support for shared variables in nested anonymous subroutines; a named
3344subroutine in between interferes with this feature.
3345
3346=item Variable "%s" will not stay shared
3347
3348(W) An inner (nested) I<named> subroutine is referencing a lexical
3349variable defined in an outer subroutine.
3350
3351When the inner subroutine is called, it will probably see the value of
3352the outer subroutine's variable as it was before and during the
3353*first* call to the outer subroutine; in this case, after the first
3354call to the outer subroutine is complete, the inner and outer
3355subroutines will no longer share a common value for the variable. In
3356other words, the variable will no longer be shared.
3357
3358Furthermore, if the outer subroutine is anonymous and references a
3359lexical variable outside itself, then the outer and inner subroutines
3360will I<never> share the given variable.
3361
3362This problem can usually be solved by making the inner subroutine
3363anonymous, using the C<sub {}> syntax. When inner anonymous subs that
3364reference variables in outer subroutines are called or referenced,
54310121 3365they are automatically rebound to the current values of such
44a8e56a
PP
3366variables.
3367
f86702cc 3368=item Variable syntax
cb1a09d0
AD
3369
3370(A) You've accidentally run your script through B<csh> instead
3a52c276
CS
3371of Perl. Check the #! line, or manually feed your script into
3372Perl yourself.
cb1a09d0 3373
084610c0
GS
3374=item Version number must be a constant number
3375
3376(P) The attempt to translate a C<use Module n.n LIST> statement into
3377its equivalent C<BEGIN> block found an internal inconsistency with
3378the version number.
3379
3e6e419a
JH
3380=item perl: warning: Setting locale failed.
3381
3382(S) The whole warning message will look something like:
3383
3384 perl: warning: Setting locale failed.
3385 perl: warning: Please check that your locale settings:
3386 LC_ALL = "En_US",
3387 LANG = (unset)
3388 are supported and installed on your system.
3389 perl: warning: Falling back to the standard locale ("C").
3390
3391Exactly what were the failed locale settings varies. In the above the
3392settings were that the LC_ALL was "En_US" and the LANG had no value.
3393This error means that Perl detected that you and/or your system
3394administrator have set up the so-called variable system but Perl could
3395not use those settings. This was not dead serious, fortunately: there
3396is a "default locale" called "C" that Perl can and will use, the
3397script will be run. Before you really fix the problem, however, you
3398will get the same error message each time you run Perl. How to really
3399fix the problem can be found in L<perllocale> section B<LOCALE PROBLEMS>.
3400
7e1af8bc 3401=item Warning: something's wrong
5f05dabc
PP
3402
3403(W) You passed warn() an empty string (the equivalent of C<warn "">) or
3404you called it with no args and C<$_> was empty.
3405
f86702cc 3406=item Warning: unable to close filehandle %s properly
a0d0e21e 3407
8b1a09fc 3408(S) The implicit close() done by an open() got an error indication on the
5f05dabc 3409close(). This usually indicates your file system ran out of disk space.
a0d0e21e 3410
5f05dabc 3411=item Warning: Use of "%s" without parentheses is ambiguous
a0d0e21e
LW
3412
3413(S) You wrote a unary operator followed by something that looks like a
3414binary operator that could also have been interpreted as a term or
3415unary operator. For instance, if you know that the rand function
3416has a default argument of 1.0, and you write
3417
3418 rand + 5;
3419
3420you may THINK you wrote the same thing as
3421
3422 rand() + 5;
3423
3424but in actual fact, you got
3425
3426 rand(+5);
3427
5f05dabc 3428So put in parentheses to say what you really mean.
a0d0e21e 3429
af8c498a 3430=item Write on closed filehandle %s
a0d0e21e
LW
3431
3432(W) The filehandle you're writing to got itself closed sometime before now.
3433Check your logic flow.
3434
3435=item X outside of string
3436
3437(F) You had a pack template that specified a relative position before
3438the beginning of the string being unpacked. See L<perlfunc/pack>.
3439
3440=item x outside of string
3441
3442(F) You had a pack template that specified a relative position after
3443the end of the string being unpacked. See L<perlfunc/pack>.
3444
3445=item Xsub "%s" called in sort
3446
3447(F) The use of an external subroutine as a sort comparison is not yet supported.
3448
3449=item Xsub called in sort
3450
3451(F) The use of an external subroutine as a sort comparison is not yet supported.
3452
3453=item You can't use C<-l> on a filehandle
3454
3455(F) A filehandle represents an opened file, and when you opened the file it
3456already went past any symlink you are presumably trying to look for.
3457Use a filename instead.
3458
3459=item YOU HAVEN'T DISABLED SET-ID SCRIPTS IN THE KERNEL YET!
3460
5f05dabc 3461(F) And you probably never will, because you probably don't have the
a0d0e21e
LW
3462sources to your kernel, and your vendor probably doesn't give a rip
3463about what you want. Your best bet is to use the wrapsuid script in
3464the eg directory to put a setuid C wrapper around your script.
3465
3466=item You need to quote "%s"
3467
3468(W) You assigned a bareword as a signal handler name. Unfortunately, you
3469already have a subroutine of that name declared, which means that Perl 5
3470will try to call the subroutine when the assignment is executed, which is
3471probably not what you want. (If it IS what you want, put an & in front.)
3472
3473=item [gs]etsockopt() on closed fd
3474
3475(W) You tried to get or set a socket option on a closed socket.
3476Did you forget to check the return value of your socket() call?
3477See L<perlfunc/getsockopt>.
3478
3479=item \1 better written as $1
3480
3481(W) Outside of patterns, backreferences live on as variables. The use
5f05dabc 3482of backslashes is grandfathered on the right-hand side of a
a0d0e21e
LW
3483substitution, but stylistically it's better to use the variable form
3484because other Perl programmers will expect it, and it works better
3485if there are more than 9 backreferences.
3486
8b1a09fc 3487=item '|' and 'E<lt>' may not both be specified on command line
748a9306
LW
3488
3489(F) An error peculiar to VMS. Perl does its own command line redirection, and
3490found that STDIN was a pipe, and that you also tried to redirect STDIN using
8b1a09fc 3491'E<lt>'. Only one STDIN stream to a customer, please.
748a9306 3492
8b1a09fc 3493=item '|' and 'E<gt>' may not both be specified on command line
748a9306
LW
3494
3495(F) An error peculiar to VMS. Perl does its own command line redirection, and
3496thinks you tried to redirect stdout both to a file and into a pipe to another
3497command. You need to choose one or the other, though nothing's stopping you
3498from piping into a program or Perl script which 'splits' output into two
3499streams, such as
3500
3501 open(OUT,">$ARGV[0]") or die "Can't write to $ARGV[0]: $!";
3502 while (<STDIN>) {
3503 print;
3504 print OUT;
3505 }
3506 close OUT;
3507
774d564b 3508=item Got an error from DosAllocMem
33c8a3fe 3509
774d564b
PP
3510(P) An error peculiar to OS/2. Most probably you're using an obsolete
3511version of Perl, and this should not happen anyway.
33c8a3fe
IZ
3512
3513=item Malformed PERLLIB_PREFIX
3514
dc848c6f 3515(F) An error peculiar to OS/2. PERLLIB_PREFIX should be of the form
33c8a3fe
IZ
3516
3517 prefix1;prefix2
3518
3519or
3520
3521 prefix1 prefix2
3522
dc848c6f
PP
3523with nonempty prefix1 and prefix2. If C<prefix1> is indeed a prefix
3524of a builtin library search path, prefix2 is substituted. The error
3525may appear if components are not found, or are too long. See
3526"PERLLIB_PREFIX" in F<README.os2>.
33c8a3fe
IZ
3527
3528=item PERL_SH_DIR too long
3529
54310121 3530(F) An error peculiar to OS/2. PERL_SH_DIR is the directory to find the
dc848c6f 3531C<sh>-shell in. See "PERL_SH_DIR" in F<README.os2>.
33c8a3fe
IZ
3532
3533=item Process terminated by SIG%s
3534
3535(W) This is a standard message issued by OS/2 applications, while *nix
dc848c6f
PP
3536applications die in silence. It is considered a feature of the OS/2
3537port. One can easily disable this by appropriate sighandlers, see
3538L<perlipc/"Signals">. See also "Process terminated by SIGTERM/SIGINT"
3539in F<README.os2>.
33c8a3fe 3540
a0d0e21e
LW
3541=back
3542