3 perldiag - various Perl diagnostics
7 These messages are classified as follows (listed in increasing order of
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).
15 (X) A very fatal error (non-trappable).
16 (A) An alien error message (not generated by Perl).
18 Optional warnings are enabled by using the B<-w> switch. Warnings may
19 be captured by setting C<$^Q> to a reference to a routine that will be
20 called on each warning instead of printing it. See L<perlvar>.
21 Trappable errors may be trapped using the eval operator. See
24 Some of these messages are generic. Spots that vary are denoted with a %s,
25 just as in a printf format. Note that some messages start with a %s!
26 The symbols C<"%-?@> sort before the letters, while C<[> and C<\> sort after.
30 =item "my" variable %s can't be in a package
32 (F) Lexically scoped variables aren't in a package, so it doesn't make sense
33 to try to declare one with a package qualifier on the front. Use local()
34 if you want to localize a package variable.
36 =item "my" variable %s masks earlier declaration in same scope
38 (S) A lexical variable has been redeclared in the same scope, effectively
39 eliminating all access to the previous instance. This is almost always
40 a typographical error. Note that the earlier variable will still exist
41 until the end of the scope or until all closure referents to it are
44 =item "no" not allowed in expression
46 (F) The "no" keyword is recognized and executed at compile time, and returns
47 no useful value. See L<perlmod>.
49 =item "use" not allowed in expression
51 (F) The "use" keyword is recognized and executed at compile time, and returns
52 no useful value. See L<perlmod>.
54 =item % may only be used in unpack
56 (F) You can't pack a string by supplying a checksum, since the
57 checksumming process loses information, and you can't go the other
58 way. See L<perlfunc/unpack>.
60 =item %s (...) interpreted as function
62 (W) You've run afoul of the rule that says that any list operator followed
63 by parentheses turns into a function, with all the list operators arguments
64 found inside the parens. See L<perlop/Terms and List Operators (Leftward)>.
66 =item %s argument is not a HASH element
68 (F) The argument to delete() or exists() must be a hash element, such as
73 =item %s did not return a true value
75 (F) A required (or used) file must return a true value to indicate that
76 it compiled correctly and ran its initialization code correctly. It's
77 traditional to end such a file with a "1;", though any true value would
78 do. See L<perlfunc/require>.
80 =item %s found where operator expected
82 (S) The Perl lexer knows whether to expect a term or an operator. If it
83 sees what it knows to be a term when it was expecting to see an operator,
84 it gives you this warning. Usually it indicates that an operator or
85 delimiter was omitted, such as a semicolon.
87 =item %s had compilation errors.
89 (F) The final summary message when a C<perl -c> fails.
91 =item %s has too many errors.
93 (F) The parser has given up trying to parse the program after 10 errors.
94 Further error messages would likely be uninformative.
96 =item %s matches null string many times
98 (W) The pattern you've specified would be an infinite loop if the
99 regular expression engine didn't specifically check for that. See L<perlre>.
101 =item %s never introduced
103 (S) The symbol in question was declared but somehow went out of scope
104 before it could possibly have been used.
108 (F) The final summary message when a C<perl -c> succeeds.
110 =item %s: Command not found.
112 (A) You've accidentally run your script through B<csh> instead
113 of Perl. Check the <#!> line, or manually feed your script
116 =item %s: Expression syntax.
118 (A) You've accidentally run your script through B<csh> instead
119 of Perl. Check the <#!> line, or manually feed your script
122 =item %s: Undefined variable.
124 (A) You've accidentally run your script through B<csh> instead
125 of Perl. Check the <#!> line, or manually feed your script
130 (A) You've accidentally run your script through the Bourne shell
131 instead of Perl. Check the <#!> line, or manually feed your script
134 =item B<-P> not allowed for setuid/setgid script
136 (F) The script would have to be opened by the C preprocessor by name,
137 which provides a race condition that breaks security.
139 =item C<-T> and C<-B> not implemented on filehandles
141 (F) Perl can't peek at the stdio buffer of filehandles when it doesn't
142 know about your kind of stdio. You'll have to use a filename instead.
144 =item 500 Server error
148 =item ?+* follows nothing in regexp
150 (F) You started a regular expression with a quantifier. Backslash it
151 if you meant it literally. See L<perlre>.
153 =item @ outside of string
155 (F) You had a pack template that specified an absolute position outside
156 the string being unpacked. See L<perlfunc/pack>.
158 =item accept() on closed fd
160 (W) You tried to do an accept on a closed socket. Did you forget to check
161 the return value of your socket() call? See L<perlfunc/accept>.
163 =item Allocation too large: %lx
165 (F) You can't allocate more than 64K on an MSDOS machine.
167 =item Arg too short for msgsnd
169 (F) msgsnd() requires a string at least as long as sizeof(long).
171 =item Ambiguous use of %s resolved as %s
173 (W)(S) You said something that may not be interpreted the way
174 you thought. Normally it's pretty easy to disambiguate it by supplying
175 a missing quote, operator, paren pair or declaration.
177 =item Args must match #! line
179 (F) The setuid emulator requires that the arguments Perl was invoked
180 with match the arguments specified on the #! line.
182 =item Argument "%s" isn't numeric
184 (W) The indicated string was fed as an argument to an operator that
185 expected a numeric value instead. If you're fortunate the message
186 will identify which operator was so unfortunate.
188 =item Array @%s missing the @ in argument %d of %s()
190 (D) Really old Perl let you omit the @ on array names in some spots. This
191 is now heavily deprecated.
193 =item assertion botched: %s
195 (P) The malloc package that comes with Perl had an internal failure.
197 =item Assertion failed: file "%s"
199 (P) A general assertion failed. The file in question must be examined.
201 =item Assignment to both a list and a scalar
203 (F) If you assign to a conditional operator, the 2nd and 3rd arguments
204 must either both be scalars or both be lists. Otherwise Perl won't
205 know which context to supply to the right side.
207 =item Attempt to free non-arena SV: 0x%lx
209 (P) All SV objects are supposed to be allocated from arenas that will
210 be garbage collected on exit. An SV was discovered to be outside any
213 =item Attempt to free temp prematurely
215 (W) Mortalized values are supposed to be freed by the free_tmps()
216 routine. This indicates that something else is freeing the SV before
217 the free_tmps() routine gets a chance, which means that the free_tmps()
218 routine will be freeing an unreferenced scalar when it does try to free
221 =item Attempt to free unreferenced glob pointers
223 (P) The reference counts got screwed up on symbol aliases.
225 =item Attempt to free unreferenced scalar
227 (W) Perl went to decrement the reference count of a scalar to see if it
228 would go to 0, and discovered that it had already gone to 0 earlier,
229 and should have been freed, and in fact, probably was freed. This
230 could indicate that SvREFCNT_dec() was called too many times, or that
231 SvREFCNT_inc() was called too few times, or that the SV was mortalized
232 when it shouldn't have been, or that memory has been corrupted.
234 =item Bad arg length for %s, is %d, should be %d
236 (F) You passed a buffer of the wrong size to one of msgctl(), semctl() or
237 shmctl(). In C parlance, the correct sizes are, respectively,
238 S<sizeof(struct msqid_ds *)>, S<sizeof(struct semid_ds *)> and
239 S<sizeof(struct shmid_ds *)>.
241 =item Bad associative array
243 (P) One of the internal hash routines was passed a null HV pointer.
245 =item Bad filehandle: %s
247 (F) A symbol was passed to something wanting a filehandle, but the symbol
248 has no filehandle associated with it. Perhaps you didn't do an open(), or
249 did it in another package.
251 =item Bad free() ignored
253 (S) An internal routine called free() on something that had never been
254 malloc()ed in the first place.
256 =item Bad name after %s::
258 (F) You started to name a symbol by using a package prefix, and then didn't
259 finish the symbol. In particular, you can't interpolate outside of quotes,
268 $sym = "mypack::$var";
270 =item Bad symbol for array
272 (P) An internal request asked to add an array entry to something that
273 wasn't a symbol table entry.
275 =item Bad symbol for filehandle
277 (P) An internal request asked to add a filehandle entry to something that
278 wasn't a symbol table entry.
280 =item Bad symbol for hash
282 (P) An internal request asked to add a hash entry to something that
283 wasn't a symbol table entry.
285 =item Badly places ()'s
287 (A) You've accidentally run your script through B<csh> instead
288 of Perl. Check the <#!> line, or manually feed your script
291 =item BEGIN failed--compilation aborted
293 (F) An untrapped exception was raised while executing a BEGIN subroutine.
294 Compilation stops immediately and the interpreter is exited.
296 =item bind() on closed fd
298 (W) You tried to do a bind on a closed socket. Did you forget to check
299 the return value of your socket() call? See L<perlfunc/bind>.
301 =item Bizarre copy of %s in %s
303 (P) Perl detected an attempt to copy an internal value that is not copiable.
305 =item Callback called exit
307 (F) A subroutine invoked from an external package via perl_call_sv()
308 exited by calling exit.
310 =item Can't "last" outside a block
312 (F) A "last" statement was executed to break out of the current block,
313 except that there's this itty bitty problem called there isn't a
314 current block. Note that an "if" or "else" block doesn't count as a
315 "loopish" block. You can usually double the curlies to get the same
316 effect though, since the inner curlies will be considered a block
317 that loops once. See L<perlfunc/last>.
319 =item Can't "next" outside a block
321 (F) A "next" statement was executed to reiterate the current block, but
322 there isn't a current block. Note that an "if" or "else" block doesn't
323 count as a "loopish" block. You can usually double the curlies to get
324 the same effect though, since the inner curlies will be considered a block
325 that loops once. See L<perlfunc/last>.
327 =item Can't "redo" outside a block
329 (F) A "redo" statement was executed to restart the current block, but
330 there isn't a current block. Note that an "if" or "else" block doesn't
331 count as a "loopish" block. You can usually double the curlies to get
332 the same effect though, since the inner curlies will be considered a block
333 that loops once. See L<perlfunc/last>.
335 =item Can't bless non-reference value
337 (F) Only hard references may be blessed. This is how Perl "enforces"
338 encapsulation of objects. See L<perlobj>.
340 =item Can't break at that line
342 (S) A warning intended for while running within the debugger, indicating
343 the line number specified wasn't the location of a statement that could
346 =item Can't call method "%s" in empty package "%s"
348 (F) You called a method correctly, and it correctly indicated a package
349 functioning as a class, but that package doesn't have ANYTHING defined
350 in it, let alone methods. See L<perlobj>.
352 =item Can't call method "%s" on unblessed reference
354 (F) A method call must know what package it's supposed to run in. It
355 ordinarily finds this out from the object reference you supply, but
356 you didn't supply an object reference in this case. A reference isn't
357 an object reference until it has been blessed. See L<perlobj>.
359 =item Can't call method "%s" without a package or object reference
361 (F) You used the syntax of a method call, but the slot filled by the
362 object reference or package name contains an expression that returns
363 neither an object reference nor a package name. (Perhaps it's null?)
364 Something like this will reproduce the error:
367 process $BADREF 1,2,3;
368 $BADREF->process(1,2,3);
370 =item Can't chdir to %s
372 (F) You called C<perl -x/foo/bar>, but C</foo/bar> is not a directory
373 that you can chdir to, possibly because it doesn't exist.
375 =item Can't coerce %s to integer in %s
377 (F) Certain types of SVs, in particular real symbol table entries
378 (type GLOB), can't be forced to stop being what they are. So you can't
388 but then $foo no longer contains a glob.
390 =item Can't coerce %s to number in %s
392 (F) Certain types of SVs, in particular real symbol table entries
393 (type GLOB), can't be forced to stop being what they are.
395 =item Can't coerce %s to string in %s
397 (F) Certain types of SVs, in particular real symbol table entries
398 (type GLOB), can't be forced to stop being what they are.
400 =item Can't create pipe mailbox
402 (P) An error peculiar to VMS. The process is suffering from exhausted quotas
403 or other plumbing problems.
405 =item Can't declare %s in my
407 (F) Only scalar, array and hash variables may be declared as lexical variables.
408 They must have ordinary identifiers as names.
410 =item Can't do inplace edit on %s: %s
412 (S) The creation of the new file failed for the indicated reason.
414 =item Can't do inplace edit without backup
416 (F) You're on a system such as MSDOS that gets confused if you try reading
417 from a deleted (but still opened) file. You have to say B<-i>C<.bak>, or some
420 =item Can't do inplace edit: %s > 14 characters
422 (S) There isn't enough room in the filename to make a backup name for the file.
424 =item Can't do inplace edit: %s is not a regular file
426 (S) You tried to use the B<-i> switch on a special file, such as a file in
427 /dev, or a FIFO. The file was ignored.
429 =item Can't do setegid!
431 (P) The setegid() call failed for some reason in the setuid emulator
434 =item Can't do seteuid!
436 (P) The setuid emulator of suidperl failed for some reason.
438 =item Can't do setuid
440 (F) This typically means that ordinary perl tried to exec suidperl to
441 do setuid emulation, but couldn't exec it. It looks for a name of the
442 form sperl5.000 in the same directory that the perl executable resides
443 under the name perl5.000, typically /usr/local/bin on Unix machines.
444 If the file is there, check the execute permissions. If it isn't, ask
445 your sysadmin why he and/or she removed it.
447 =item Can't do waitpid with flags
449 (F) This machine doesn't have either waitpid() or wait4(), so only waitpid()
450 without flags is emulated.
452 =item Can't do {n,m} with n > m
454 (F) Minima must be less than or equal to maxima. If you really want
455 your regexp to match something 0 times, just put {0}. See L<perlre>.
457 =item Can't emulate -%s on #! line
459 (F) The #! line specifies a switch that doesn't make sense at this point.
460 For example, it'd be kind of silly to put a B<-x> on the #! line.
462 =item Can't exec "%s": %s
464 (W) An system(), exec() or piped open call could not execute the named
465 program for the indicated reason. Typical reasons include: the permissions
466 were wrong on the file, the file wasn't found in C<$ENV{PATH}>, the
467 executable in question was compiled for another architecture, or the
468 #! line in a script points to an interpreter that can't be run for
469 similar reasons. (Or maybe your system doesn't support #! at all.)
473 (F) Perl was trying to execute the indicated program for you because that's
474 what the #! line said. If that's not what you wanted, you may need to
475 mention "perl" on the #! line somewhere.
477 =item Can't execute %s
479 (F) You used the B<-S> switch, but the script to execute could not be found
480 in the PATH, or at least not with the correct permissions.
482 =item Can't find label %s
484 (F) You said to goto a label that isn't mentioned anywhere that it's possible
485 for us to go to. See L<perlfunc/goto>.
487 =item Can't find string terminator %s anywhere before EOF
489 (F) Perl strings can stretch over multiple lines. This message means that
490 the closing delimiter was omitted. Since bracketed quotes count nesting
491 levels, the following is missing its final parenthesis:
493 print q(The character '(' starts a side comment.)
497 (F) A fatal error occurred while trying to fork while opening a pipeline.
499 =item Can't get filespec - stale stat buffer?
501 (S) A warning peculiar to VMS. This arises because of the difference between
502 access checks under VMS and under the Unix model Perl assumes. Under VMS,
503 access checks are done by filename, rather than by bits in the stat buffer, so
504 that ACLs and other protections can be taken into account. Unfortunately, Perl
505 assumes that the stat buffer contains all the necessary information, and passes
506 it, instead of the filespec, to the access checking routine. It will try to
507 retrieve the filespec using the device name and FID present in the stat buffer,
508 but this works only if you haven't made a subsequent call to the CRTL stat()
509 routine, since the device name is overwritten with each call. If this warning
510 appears, the name lookup failed, and the access checking routine gave up and
511 returned FALSE, just to be conservative. (Note: The access checking routine
512 knows about the Perl C<stat> operator and file tests, so you shouldn't ever
513 see this warning in response to a Perl command; it arises only if some internal
514 code takes stat buffers lightly.)
516 =item Can't get pipe mailbox device name
518 (P) An error peculiar to VMS. After creating a mailbox to act as a pipe, Perl
519 can't retrieve its name for later use.
521 =item Can't get SYSGEN parameter value for MAXBUF
523 (P) An error peculiar to VMS. Perl asked $GETSYI how big you want your
524 mailbox buffers to be, and didn't get an answer.
526 =item Can't goto subroutine outside a subroutine
528 (F) The deeply magical "goto subroutine" call can only replace one subroutine
529 call for another. It can't manufacture one out of whole cloth. In general
530 you should only be calling it out of an AUTOLOAD routine anyway. See
533 =item Can't localize a reference
535 (F) You said something like C<local $$ref>, which is not allowed because
536 the compiler can't determine whether $ref will end up pointing to anything
537 with a symbol table entry, and a symbol table entry is necessary to
540 =item Can't localize lexical variable %s
542 (F) You used local on a variable name that was previously declared as a
543 lexical variable using "my". This is not allowed. If you want to
544 localize a package variable of the same name, qualify it with the
547 =item Can't locate %s in @INC
549 (F) You said to do (or require, or use) a file that couldn't be found
550 in any of the libraries mentioned in @INC. Perhaps you need to set
551 the PERL5LIB environment variable to say where the extra library is,
552 or maybe the script needs to add the library name to @INC. Or maybe
553 you just misspelled the name of the file. See L<perlfunc/require>.
555 =item Can't locate object method "%s" via package "%s"
557 (F) You called a method correctly, and it correctly indicated a package
558 functioning as a class, but that package doesn't define that particular
559 method, nor does any of its base classes. See L<perlobj>.
561 =item Can't locate package %s for @%s::ISA
563 (W) The @ISA array contained the name of another package that doesn't seem
568 (F) The mktemp() routine failed for some reason while trying to process
569 a B<-e> switch. Maybe your /tmp partition is full, or clobbered.
571 =item Can't modify %s in %s
573 (F) You aren't allowed to assign to the item indicated, or otherwise try to
574 change it, such as with an autoincrement.
576 =item Can't modify non-existent substring
578 (P) The internal routine that does assignment to a substr() was handed
581 =item Can't msgrcv to readonly var
583 (F) The target of a msgrcv must be modifiable in order to be used as a receive
586 =item Can't open %s: %s
588 (S) An inplace edit couldn't open the original file for the indicated reason.
589 Usually this is because you don't have read permission for the file.
591 =item Can't open bidirectional pipe
593 (W) You tried to say C<open(CMD, "|cmd|")>, which is not supported. You can
594 try any of several modules in the Perl library to do this, such as
595 "open2.pl". Alternately, direct the pipe's output to a file using ">",
596 and then read it in under a different file handle.
598 =item Can't open error file %s as stderr
600 (F) An error peculiar to VMS. Perl does its own command line redirection, and
601 couldn't open the file specified after '2>' or '2>>' on the command line for
604 =item Can't open input file %s as stdin
606 (F) An error peculiar to VMS. Perl does its own command line redirection, and
607 couldn't open the file specified after '<' on the command line for reading.
609 =item Can't open output file %s as stdout
611 (F) An error peculiar to VMS. Perl does its own command line redirection, and
612 couldn't open the file specified after '>' or '>>' on the command line for
615 =item Can't open output pipe (name: %s)
617 (P) An error peculiar to VMS. Perl does its own command line redirection, and
618 couldn't open the pipe into which to send data destined for stdout.
620 =item Can't open perl script "%s": %s
622 (F) The script you specified can't be opened for the indicated reason.
624 =item Can't rename %s to %s: %s, skipping file
626 (S) The rename done by the B<-i> switch failed for some reason, probably because
627 you don't have write permission to the directory.
629 =item Can't reopen input pipe (name: %s) in binary mode
631 (P) An error peculiar to VMS. Perl thought stdin was a pipe, and tried to
632 reopen it to accept binary data. Alas, it failed.
634 =item Can't reswap uid and euid
636 (P) The setreuid() call failed for some reason in the setuid emulator
639 =item Can't return outside a subroutine
641 (F) The return statement was executed in mainline code, that is, where
642 there was no subroutine call to return out of. See L<perlsub>.
644 =item Can't stat script "%s"
646 (P) For some reason you can't fstat() the script even though you have
647 it open already. Bizarre.
649 =item Can't swap uid and euid
651 (P) The setreuid() call failed for some reason in the setuid emulator
654 =item Can't take log of %g
656 (F) Logarithms are only defined on positive real numbers.
658 =item Can't take sqrt of %g
660 (F) For ordinary real numbers, you can't take the square root of a
661 negative number. There's a Complex package available for Perl, though,
662 if you really want to do that.
664 =item Can't undef active subroutine
666 (F) You can't undefine a routine that's currently running. You can,
667 however, redefine it while it's running, and you can even undef the
668 redefined subroutine while the old routine is running. Go figure.
672 (F) You tried to unshift an "unreal" array that can't be unshifted, such
673 as the main Perl stack.
675 =item Can't untie: %d inner references still exist
677 (F) With "use strict untie" in effect, a copy of the object returned
678 from C<tie> (or C<tied>) was still valid when C<untie> was called.
680 =item Can't upgrade that kind of scalar
682 (P) The internal sv_upgrade routine adds "members" to an SV, making
683 it into a more specialized kind of SV. The top several SV types are
684 so specialized, however, that they cannot be interconverted. This
685 message indicates that such a conversion was attempted.
687 =item Can't upgrade to undef
689 (P) The undefined SV is the bottom of the totem pole, in the scheme
690 of upgradability. Upgrading to undef indicates an error in the
691 code calling sv_upgrade.
693 =item Can't use "my %s" in sort comparison
695 (F) The global variables $a and $b are reserved for sort comparisons.
696 You mentioned $a or $b in the same line as the <=> or cmp operator,
697 and the variable had earlier been declared as a lexical variable.
698 Either qualify the sort variable with the package name, or rename the
701 =item Can't use %s for loop variable
703 (F) Only a simple scalar variable may be used as a loop variable on a foreach.
705 =item Can't use %s ref as %s ref
707 (F) You've mixed up your reference types. You have to dereference a
708 reference of the type needed. You can use the ref() function to
709 test the type of the reference, if need be.
711 =item Can't use \1 to mean $1 in expression
713 (W) In an ordinary expression, backslash is a unary operator that creates
714 a reference to its argument. The use of backslash to indicate a backreference
715 to a matched substring is only valid as part of a regular expression pattern.
716 Trying to do this in ordinary Perl code produces a value that prints
717 out looking like SCALAR(0xdecaf). Use the $1 form instead.
719 =item Can't use string ("%s") as %s ref while "strict refs" in use
721 (F) Only hard references are allowed by "strict refs". Symbolic references
722 are disallowed. See L<perlref>.
724 =item Can't use an undefined value as %s reference
726 (F) A value used as either a hard reference or a symbolic reference must
727 be a defined value. This helps to de-lurk some insidious errors.
729 =item Can't use global %s in "my"
731 (F) You tried to declare a magical variable as a lexical variable. This is
732 not allowed, because the magic can only be tied to one location (namely
733 the global variable) and it would be incredibly confusing to have
734 variables in your program that looked like magical variables but
737 =item Can't use subscript on %s
739 (F) The compiler tried to interpret a bracketed expression as a
740 subscript. But to the left of the brackets was an expression that
741 didn't look like an array reference, or anything else subscriptable.
743 =item Can't write to temp file for B<-e>: %s
745 (F) The write routine failed for some reason while trying to process
746 a B<-e> switch. Maybe your /tmp partition is full, or clobbered.
748 =item Can't x= to readonly value
750 (F) You tried to repeat a constant value (often the undefined value) with
751 an assignment operator, which implies modifying the value itself.
752 Perhaps you need to copy the value to a temporary, and repeat that.
754 =item Cannot open temporary file
756 (F) The create routine failed for some reaon while trying to process
757 a B<-e> switch. Maybe your /tmp partition is full, or clobbered.
759 =item chmod: mode argument is missing initial 0
761 (W) A novice will sometimes say
765 not realizing that 777 will be interpreted as a decimal number, equivalent
766 to 01411. Octal constants are introduced with a leading 0 in Perl, as in C.
768 =item Close on unopened file <%s>
770 (W) You tried to close a filehandle that was never opened.
772 =item connect() on closed fd
774 (W) You tried to do a connect on a closed socket. Did you forget to check
775 the return value of your socket() call? See L<perlfunc/connect>.
777 =item Corrupt malloc ptr 0x%lx at 0x%lx
779 (P) The malloc package that comes with Perl had an internal failure.
781 =item corrupted regexp pointers
783 (P) The regular expression engine got confused by what the regular
784 expression compiler gave it.
786 =item corrupted regexp program
788 (P) The regular expression engine got passed a regexp program without
789 a valid magic number.
791 =item Deep recursion on subroutine "%s"
793 (W) This subroutine has called itself (directly or indirectly) 100
794 times than it has returned. This probably indicates an infinite
795 recursion, unless you're writing strange benchmark programs, in which
796 case it indicates something else.
798 =item Did you mean &%s instead?
800 (W) You probably referred to an imported subroutine &FOO as $FOO or some such.
802 =item Did you mean $ or @ instead of %?
804 (W) You probably said %hash{$key} when you meant $hash{$key} or @hash{@keys}.
805 On the other hand, maybe you just meant %hash and got carried away.
807 =item Do you need to predeclare %s?
809 (S) This is an educated guess made in conjunction with the message "%s
810 found where operator expected". It often means a subroutine or module
811 name is being referenced that hasn't been declared yet. This may be
812 because of ordering problems in your file, or because of a missing
813 "sub", "package", "require", or "use" statement. If you're
814 referencing something that isn't defined yet, you don't actually have
815 to define the subroutine or package before the current location. You
816 can use an empty "sub foo;" or "package FOO;" to enter a "forward"
819 =item Don't know how to handle magic of type '%s'
821 (P) The internal handling of magical variables has been cursed.
823 =item do_study: out of memory
825 (P) This should have been caught by safemalloc() instead.
827 =item Duplicate free() ignored
829 (S) An internal routine called free() on something that had already
832 =item elseif should be elsif
834 (S) There is no keyword "elseif" in Perl because Larry thinks it's
835 ugly. Your code will be interpreted as an attempt to call a method
836 named "elseif" for the class returned by the following block. This is
837 unlikely to be what you want.
839 =item END failed--cleanup aborted
841 (F) An untrapped exception was raised while executing an END subroutine.
842 The interpreter is immediately exited.
844 =item Error converting file specification %s
846 (F) An error peculiar to VMS. Since Perl may have to deal with file
847 specifications in either VMS or Unix syntax, it converts them to a
848 single form when it must operate on them directly. Either you've
849 passed an invalid file specification to Perl, or you've found a
850 case the conversion routines don't handle. Drat.
852 =item Execution of %s aborted due to compilation errors.
854 (F) The final summary message when a Perl compilation fails.
856 =item Exiting eval via %s
858 (W) You are exiting an eval by unconventional means, such as a
859 a goto, or a loop control statement.
861 =item Exiting subroutine via %s
863 (W) You are exiting a subroutine by unconventional means, such as a
864 a goto, or a loop control statement.
866 =item Exiting substitution via %s
868 (W) You are exiting a substitution by unconventional means, such as a
869 a return, a goto, or a loop control statement.
871 =item Fatal VMS error at %s, line %d
873 (P) An error peculiar to VMS. Something untoward happened in a VMS system
874 service or RTL routine; Perl's exit status should provide more details. The
875 filename in "at %s" and the line number in "line %d" tell you which section of
876 the Perl source code is distressed.
878 =item fcntl is not implemented
880 (F) Your machine apparently doesn't implement fcntl(). What is this, a
883 =item Filehandle %s never opened
885 (W) An I/O operation was attempted on a filehandle that was never initialized.
886 You need to do an open() or a socket() call, or call a constructor from
887 the FileHandle package.
889 =item Filehandle %s opened only for input
891 (W) You tried to write on a read-only filehandle. If you
892 intended it to be a read-write filehandle, you needed to open it with
893 "+<" or "+>" or "+>>" instead of with "<" or nothing. If you only
894 intended to write the file, use ">" or ">>". See L<perlfunc/open>.
896 =item Filehandle only opened for input
898 (W) You tried to write on a read-only filehandle. If you
899 intended it to be a read-write filehandle, you needed to open it with
900 "+<" or "+>" or "+>>" instead of with "<" or nothing. If you only
901 intended to write the file, use ">" or ">>". See L<perlfunc/open>.
903 =item Final $ should be \$ or $name
905 (F) You must now decide whether the final $ in a string was meant to be
906 a literal dollar sign, or was meant to introduce a variable name
907 that happens to be missing. So you have to put either the backslash or
910 =item Final @ should be \@ or @name
912 (F) You must now decide whether the final @ in a string was meant to be
913 a literal "at" sign, or was meant to introduce a variable name
914 that happens to be missing. So you have to put either the backslash or
917 =item Format %s redefined
919 (W) You redefined a format. To suppress this warning, say
923 eval "format NAME =...";
926 =item Format not terminated
928 (F) A format must be terminated by a line with a solitary dot. Perl got
929 to the end of your file without finding such a line.
931 =item Found = in conditional, should be ==
941 (or something like that).
943 =item gdbm store returned %d, errno %d, key "%s"
945 (S) A warning from the GDBM_File extension that a store failed.
947 =item gethostent not implemented
949 (F) Your C library apparently doesn't implement gethostent(), probably
950 because if it did, it'd feel morally obligated to return every hostname
953 =item get{sock,peer}name() on closed fd
955 (W) You tried to get a socket or peer socket name on a closed socket.
956 Did you forget to check the return value of your socket() call?
958 =item getpwnam returned invalid UIC %#o for user "%s"
960 (S) A warning peculiar to VMS. The call to C<sys$getuai> underlying the
961 C<getpwnam> operator returned an invalid UIC.
964 =item Glob not terminated
966 (F) The lexer saw a left angle bracket in a place where it was expecting
967 a term, so it's looking for the corresponding right angle bracket, and not
968 finding it. Chances are you left some needed parentheses out earlier in
969 the line, and you really meant a "less than".
971 =item Global symbol "%s" requires explicit package name
973 (F) You've said "use strict vars", which indicates that all variables must
974 either be lexically scoped (using "my"), or explicitly qualified to
975 say which package the global variable is in (using "::").
977 =item goto must have label
979 (F) Unlike with "next" or "last", you're not allowed to goto an
980 unspecified destination. See L<perlfunc/goto>.
982 =item Had to create %s unexpectedly
984 (S) A routine asked for a symbol from a symbol table that ought to have
985 existed already, but for some reason it didn't, and had to be created on
986 an emergency basis to prevent a core dump.
988 =item Hash %%s missing the % in argument %d of %s()
990 (D) Really old Perl let you omit the % on hash names in some spots. This
991 is now heavily deprecated.
993 =item Name "%s::%s" used only once: possible typo
995 (W) Typographical errors often show up as unique variable names. If you
996 had a good reason for having a unique name, then just mention it
997 again somehow to suppress the message (the C<use vars> pragma is
998 provided for just this purpose).
1000 =item Illegal division by zero
1002 (F) You tried to divide a number by 0. Either something was wrong in your
1003 logic, or you need to put a conditional in to guard against meaningless input.
1005 =item Illegal modulus zero
1007 (F) You tried to divide a number by 0 to get the remainder. Most numbers
1008 don't take to this kindly.
1010 =item Illegal octal digit
1012 (F) You used an 8 or 9 in a octal number.
1014 =item Illegal octal digit ignored
1016 (W) You may have tried to use an 8 or 9 in a octal number. Interpretation
1017 of the octal number stopped before the 8 or 9.
1019 =item Insecure dependency in %s
1021 (F) You tried to do something that the tainting mechanism didn't like.
1022 The tainting mechanism is turned on when you're running setuid or setgid,
1023 or when you specify B<-T> to turn it on explicitly. The tainting mechanism
1024 labels all data that's derived directly or indirectly from the user,
1025 who is considered to be unworthy of your trust. If any such data is
1026 used in a "dangerous" operation, you get this error. See L<perlsec>
1027 for more information.
1029 =item Insecure directory in %s
1031 (F) You can't use system(), exec(), or a piped open in a setuid or setgid
1032 script if $ENV{PATH} contains a directory that is writable by the world.
1037 (F) You can't use system(), exec(), or a piped open in a setuid or
1038 setgid script if $ENV{PATH} is derived from data supplied (or
1039 potentially supplied) by the user. The script must set the path to a
1040 known value, using trustworthy data. See L<perlsec>.
1042 =item Internal inconsistency in tracking vforks
1044 (S) A warning peculiar to VMS. Perl keeps track of the number
1045 of times you've called C<fork> and C<exec>, in order to determine
1046 whether the current call to C<exec> should affect the current
1047 script or a subprocess (see L<perlvms/exec>). Somehow, this count
1048 has become scrambled, so Perl is making a guess and treating
1049 this C<exec> as a request to terminate the Perl script
1050 and execute the specified command.
1052 =item internal disaster in regexp
1054 (P) Something went badly wrong in the regular expression parser.
1056 =item internal urp in regexp at /%s/
1058 (P) Something went badly awry in the regular expression parser.
1060 =item invalid [] range in regexp
1062 (F) The range specified in a character class had a minimum character
1063 greater than the maximum character. See L<perlre>.
1065 =item ioctl is not implemented
1067 (F) Your machine apparently doesn't implement ioctl(), which is pretty
1068 strange for a machine that supports C.
1070 =item junk on end of regexp
1072 (P) The regular expression parser is confused.
1074 =item Label not found for "last %s"
1076 (F) You named a loop to break out of, but you're not currently in a
1077 loop of that name, not even if you count where you were called from.
1078 See L<perlfunc/last>.
1080 =item Label not found for "next %s"
1082 (F) You named a loop to continue, but you're not currently in a loop of
1083 that name, not even if you count where you were called from. See
1086 =item Label not found for "redo %s"
1088 (F) You named a loop to restart, but you're not currently in a loop of
1089 that name, not even if you count where you were called from. See
1092 =item listen() on closed fd
1094 (W) You tried to do a listen on a closed socket. Did you forget to check
1095 the return value of your socket() call? See L<perlfunc/listen>.
1097 =item Literal @%s now requires backslash
1099 (F) It used to be that Perl would try to guess whether you wanted an
1100 array interpolated or a literal @. It did this when the string was
1101 first used at runtime. Now strings are parsed at compile time, and
1102 ambiguous instances of @ must be disambiguated, either by putting a
1103 backslash to indicate a literal, or by declaring (or using) the array
1104 within the program before the string (lexically). (Someday it will simply
1105 assume that an unbackslashed @ interpolates an array.)
1107 =item Method for operation %s not found in package %s during blessing
1109 (F) An attempt was made to specify an entry in an overloading table that
1110 doesn't somehow point to a valid method. See L<perlovl>.
1112 =item Might be a runaway multi-line %s string starting on line %d
1114 (S) An advisory indicating that the previous error may have been caused
1115 by a missing delimiter on a string or pattern, because it eventually
1116 ended earlier on the current line.
1118 =item Misplaced _ in number
1120 (W) An underline in a decimal constant wasn't on a 3-digit boundary.
1122 =item Missing $ on loop variable
1124 (F) Apparently you've been programming in csh too much. Variables are always
1125 mentioned with the $ in Perl, unlike in the shells, where it can vary from
1126 one line to the next.
1128 =item Missing comma after first argument to %s function
1130 (F) While certain functions allow you to specify a filehandle or an
1131 "indirect object" before the argument list, this ain't one of them.
1133 =item Missing operator before %s?
1135 (S) This is an educated guess made in conjunction with the message "%s
1136 found where operator expected". Often the missing operator is a comma.
1138 =item Missing right bracket
1140 (F) The lexer counted more opening curly brackets (braces) than closing ones.
1141 As a general rule, you'll find it's missing near the place you were last
1144 =item Missing semicolon on previous line?
1146 (S) This is an educated guess made in conjunction with the message "%s
1147 found where operator expected". Don't automatically put a semicolon on
1148 the previous line just because you saw this message.
1150 =item Modification of a read-only value attempted
1152 (F) You tried, directly or indirectly, to change the value of a
1153 constant. You didn't, of course, try "2 = 1", since the compiler
1154 catches that. But an easy way to do the same thing is:
1156 sub mod { $_[0] = 1 }
1159 Another way is to assign to a substr() that's off the end of the string.
1161 =item Modification of non-creatable array value attempted, subscript %d
1163 (F) You tried to make an array value spring into existence, and the
1164 subscript was probably negative, even counting from end of the array
1167 =item Modification of non-creatable hash value attempted, subscript "%s"
1169 (F) You tried to make a hash value spring into existence, and it couldn't
1170 be created for some peculiar reason.
1172 =item Module name must be constant
1174 (F) Only a bare module name is allowed as the first argument to a "use".
1176 =item msg%s not implemented
1178 (F) You don't have System V message IPC on your system.
1180 =item Multidimensional syntax %s not supported
1182 (W) Multidimensional arrays aren't written like $foo[1,2,3]. They're written
1183 like $foo[1][2][3], as in C.
1185 =item Negative length
1187 (F) You tried to do a read/write/send/recv operation with a buffer length
1188 that is less than 0. This is difficult to imagine.
1190 =item nested *?+ in regexp
1192 (F) You can't quantify a quantifier without intervening parens. So
1193 things like ** or +* or ?* are illegal.
1195 Note, however, that the minimal matching quantifiers, *?, +? and ?? appear
1196 to be nested quantifiers, but aren't. See L<perlre>.
1200 (F) The setuid emulator requires that scripts have a well-formed #! line
1201 even on machines that don't support the #! construct.
1203 =item No %s allowed while running setuid
1205 (F) Certain operations are deemed to be too insecure for a setuid or setgid
1206 script to even be allowed to attempt. Generally speaking there will be
1207 another way to do what you want that is, if not secure, at least securable.
1210 =item No B<-e> allowed in setuid scripts
1212 (F) A setuid script can't be specified by the user.
1214 =item No comma allowed after %s
1216 (F) A list operator that has a filehandle or "indirect object" is not
1217 allowed to have a comma between that and the following arguments.
1218 Otherwise it'd be just another one of the arguments.
1220 =item No command into which to pipe on command line
1222 (F) An error peculiar to VMS. Perl handles its own command line redirection,
1223 and found a '|' at the end of the command line, so it doesn't know whither you
1224 want to pipe the output from this command.
1226 =item No DB::DB routine defined
1228 (F) The currently executing code was compiled with the B<-d> switch,
1229 but for some reason the perl5db.pl file (or some facsimile thereof)
1230 didn't define a routine to be called at the beginning of each
1231 statement. Which is odd, because the file should have been required
1232 automatically, and should have blown up the require if it didn't parse
1235 =item No dbm on this machine
1237 (P) This is counted as an internal error, because every machine should
1238 supply dbm nowadays, since Perl comes with SDBM. See L<SDBM_File>.
1240 =item No DBsub routine
1242 (F) The currently executing code was compiled with the B<-d> switch,
1243 but for some reason the perl5db.pl file (or some facsimile thereof)
1244 didn't define a DB::sub routine to be called at the beginning of each
1245 ordinary subroutine call.
1247 =item No error file after 2> or 2>> on command line
1249 (F) An error peculiar to VMS. Perl handles its own command line redirection,
1250 and found a '2>' or a '2>>' on the command line, but can't find the name of the
1251 file to which to write data destined for stderr.
1253 =item No input file after < on command line
1255 (F) An error peculiar to VMS. Perl handles its own command line redirection,
1256 and found a '<' on the command line, but can't find the name of the file from
1257 which to read data for stdin.
1259 =item No output file after > on command line
1261 (F) An error peculiar to VMS. Perl handles its own command line redirection,
1262 and found a lone '>' at the end of the command line, so it doesn't know whither
1263 you wanted to redirect stdout.
1265 =item No output file after > or >> on command line
1267 (F) An error peculiar to VMS. Perl handles its own command line redirection,
1268 and found a '>' or a '>>' on the command line, but can't find the name of the
1269 file to which to write data destined for stdout.
1271 =item No Perl script found in input
1273 (F) You called C<perl -x>, but no line was found in the file beginning
1274 with #! and containing the word "perl".
1276 =item No setregid available
1278 (F) Configure didn't find anything resembling the setregid() call for
1281 =item No setreuid available
1283 (F) Configure didn't find anything resembling the setreuid() call for
1286 =item No space allowed after B<-I>
1288 (F) The argument to B<-I> must follow the B<-I> immediately with no
1291 =item No such pipe open
1293 (P) An error peculiar to VMS. The internal routine my_pclose() tried to
1294 close a pipe which hadn't been opened. This should have been caught earlier as
1295 an attempt to close an unopened filehandle.
1297 =item No such signal: SIG%s
1299 (W) You specified a signal name as a subscript to %SIG that was not recognized.
1300 Say C<kill -l> in your shell to see the valid signal names on your system.
1302 =item Not a CODE reference
1304 (F) Perl was trying to evaluate a reference to a code value (that is, a
1305 subroutine), but found a reference to something else instead. You can
1306 use the ref() function to find out what kind of ref it really was.
1307 See also L<perlref>.
1309 =item Not a format reference
1311 (F) I'm not sure how you managed to generate a reference to an anonymous
1312 format, but this indicates you did, and that it didn't exist.
1314 =item Not a GLOB reference
1316 (F) Perl was trying to evaluate a reference to a "type glob" (that is,
1317 a symbol table entry that looks like C<*foo>), but found a reference to
1318 something else instead. You can use the ref() function to find out
1319 what kind of ref it really was. See L<perlref>.
1321 =item Not a HASH reference
1323 (F) Perl was trying to evaluate a reference to a hash value, but
1324 found a reference to something else instead. You can use the ref()
1325 function to find out what kind of ref it really was. See L<perlref>.
1327 =item Not a perl script
1329 (F) The setuid emulator requires that scripts have a well-formed #! line
1330 even on machines that don't support the #! construct. The line must
1333 =item Not a SCALAR reference
1335 (F) Perl was trying to evaluate a reference to a scalar value, but
1336 found a reference to something else instead. You can use the ref()
1337 function to find out what kind of ref it really was. See L<perlref>.
1339 =item Not a subroutine reference
1341 (F) Perl was trying to evaluate a reference to a code value (that is, a
1342 subroutine), but found a reference to something else instead. You can
1343 use the ref() function to find out what kind of ref it really was.
1344 See also L<perlref>.
1346 =item Not a subroutine reference in %OVERLOAD
1348 (F) An attempt was made to specify an entry in an overloading table that
1349 doesn't somehow point to a valid subroutine. See L<perlovl>.
1351 =item Not an ARRAY reference
1353 (F) Perl was trying to evaluate a reference to an array value, but
1354 found a reference to something else instead. You can use the ref()
1355 function to find out what kind of ref it really was. See L<perlref>.
1357 =item Not enough arguments for %s
1359 (F) The function requires more arguments than you specified.
1361 =item Not enough format arguments
1363 (W) A format specified more picture fields than the next line supplied.
1366 =item Null filename used
1368 (F) You can't require the null filename, especially since on many machines
1369 that means the current directory! See L<perlfunc/require>.
1371 =item NULL OP IN RUN
1373 (P) Some internal routine called run() with a null opcode pointer.
1377 (P) An attempt was made to realloc NULL.
1379 =item NULL regexp argument
1381 (P) The internal pattern matching routines blew it bigtime.
1383 =item NULL regexp parameter
1385 (P) The internal pattern matching routines are out of their gourd.
1387 =item Odd number of elements in hash list
1389 (S) You specified an odd number of elements to a hash list, which is odd,
1390 since hash lists come in key/value pairs.
1394 (S) An internal warning that the grammar is screwed up.
1398 (S) An internal warning that the grammar is screwed up.
1400 =item Operation `%s' %s: no method found,
1402 (F) An attempt was made to use an entry in an overloading table that
1403 somehow no longer points to a valid method. See L<perlovl>.
1405 =item Operator or semicolon missing before %s
1407 (S) You used a variable or subroutine call where the parser was
1408 expecting an operator. The parser has assumed you really meant
1409 to use an operator, but this is highly likely to be incorrect.
1410 For example, if you say "*foo *foo" it will be interpreted as
1411 if you said "*foo * 'foo'".
1413 =item Out of memory for yacc stack
1415 (F) The yacc parser wanted to grow its stack so it could continue parsing,
1416 but realloc() wouldn't give it more memory, virtual or otherwise.
1418 =item Out of memory!
1420 (X) The malloc() function returned 0, indicating there was insufficient
1421 remaining memory (or virtual memory) to satisfy the request.
1425 (W) A single call to write() produced more lines than can fit on a page.
1428 =item panic: ck_grep
1430 (P) Failed an internal consistency check trying to compile a grep.
1432 =item panic: ck_split
1434 (P) Failed an internal consistency check trying to compile a split.
1436 =item panic: corrupt saved stack index
1438 (P) The savestack was requested to restore more localized values than there
1439 are in the savestack.
1443 (P) We popped the context stack to an eval context, and then discovered
1444 it wasn't an eval context.
1446 =item panic: do_match
1448 (P) The internal pp_match() routine was called with invalid operational data.
1450 =item panic: do_split
1452 (P) Something terrible went wrong in setting up for the split.
1454 =item panic: do_subst
1456 (P) The internal pp_subst() routine was called with invalid operational data.
1458 =item panic: do_trans
1460 (P) The internal do_trans() routine was called with invalid operational data.
1464 (P) We popped the context stack to a context with the specified label,
1465 and then discovered it wasn't a context we know how to do a goto in.
1467 =item panic: INTERPCASEMOD
1469 (P) The lexer got into a bad state at a case modifier.
1471 =item panic: INTERPCONCAT
1473 (P) The lexer got into a bad state parsing a string with brackets.
1477 (P) We popped the context stack to a block context, and then discovered
1478 it wasn't a block context.
1480 =item panic: leave_scope clearsv
1482 (P) A writable lexical variable became readonly somehow within the scope.
1484 =item panic: leave_scope inconsistency
1486 (P) The savestack probably got out of sync. At least, there was an
1487 invalid enum on the top of it.
1491 (P) Something requested a negative number of bytes of malloc.
1493 =item panic: mapstart
1495 (P) The compiler is screwed up with respect to the map() function.
1497 =item panic: null array
1499 (P) One of the internal array routines was passed a null AV pointer.
1501 =item panic: pad_alloc
1503 (P) The compiler got confused about which scratch pad it was allocating
1504 and freeing temporaries and lexicals from.
1506 =item panic: pad_free curpad
1508 (P) The compiler got confused about which scratch pad it was allocating
1509 and freeing temporaries and lexicals from.
1511 =item panic: pad_free po
1513 (P) An invalid scratch pad offset was detected internally.
1515 =item panic: pad_reset curpad
1517 (P) The compiler got confused about which scratch pad it was allocating
1518 and freeing temporaries and lexicals from.
1520 =item panic: pad_sv po
1522 (P) An invalid scratch pad offset was detected internally.
1524 =item panic: pad_swipe curpad
1526 (P) The compiler got confused about which scratch pad it was allocating
1527 and freeing temporaries and lexicals from.
1529 =item panic: pad_swipe po
1531 (P) An invalid scratch pad offset was detected internally.
1533 =item panic: pp_iter
1535 (P) The foreach iterator got called in a non-loop context frame.
1537 =item panic: realloc
1539 (P) Something requested a negative number of bytes of realloc.
1541 =item panic: restartop
1543 (P) Some internal routine requested a goto (or something like it), and
1544 didn't supply the destination.
1548 (P) We popped the context stack to a subroutine or eval context, and
1549 then discovered it wasn't a subroutine or eval context.
1551 =item panic: scan_num
1553 (P) scan_num() got called on something that wasn't a number.
1555 =item panic: sv_insert
1557 (P) The sv_insert() routine was told to remove more string than there
1560 =item panic: top_env
1562 (P) The compiler attempted to do a goto, or something weird like that.
1566 (P) The lexer got into a bad state while processing a case modifier.
1568 =item Parens missing around "%s" list
1570 (W) You said something like
1576 my ($foo, $bar) = @_;
1578 Remember that "my" and "local" bind closer than comma.
1580 =item Perl %3.3f required--this is only version %s, stopped
1582 (F) The module in question uses features of a version of Perl more recent
1583 than the currently running version. How long has it been since you upgraded,
1584 anyway? See L<perlfunc/require>.
1586 =item Permission denied
1588 (F) The setuid emulator in suidperl decided you were up to no good.
1590 =item pid %d not a child
1592 (W) A warning peculiar to VMS. Waitpid() was asked to wait for a process which
1593 isn't a subprocess of the current process. While this is fine from VMS'
1594 perspective, it's probably not what you intended.
1596 =item POSIX getpgrp can't take an argument
1598 (F) Your C compiler uses POSIX getpgrp(), which takes no argument, unlike
1599 the BSD version, which takes a pid.
1601 =item Possible memory corruption: %s overflowed 3rd argument
1603 (F) An ioctl() or fcntl() returned more than Perl was bargaining for.
1604 Perl guesses a reasonable buffer size, but puts a sentinel byte at the
1605 end of the buffer just in case. This sentinel byte got clobbered, and
1606 Perl assumes that memory is now corrupted. See L<perlfunc/ioctl>.
1608 =item Precedence problem: open %s should be open(%s)
1610 (S) The old irregular construct
1614 is now misinterpreted as
1618 because of the strict regularization of Perl 5's grammar into unary and
1619 list operators. (The old open was a little of both.) You must put
1620 parens around the filehandle, or use the new "or" operator instead of "||".
1622 =item print on closed filehandle %s
1624 (W) The filehandle you're printing on got itself closed sometime before now.
1625 Check your logic flow.
1627 =item printf on closed filehandle %s
1629 (W) The filehandle you're writing to got itself closed sometime before now.
1630 Check your logic flow.
1632 =item Probable precedence problem on %s
1634 (W) The compiler found a bare word where it expected a conditional,
1635 which often indicates that an || or && was parsed as part of the
1636 last argument of the previous construct, for example:
1640 =item Prototype mismatch: (%s) vs (%s)
1642 (S) The subroutine being defined had a predeclared (forward) declaration
1643 with a different function prototype.
1645 =item Read on closed filehandle <%s>
1647 (W) The filehandle you're reading from got itself closed sometime before now.
1648 Check your logic flow.
1650 =item Reallocation too large: %lx
1652 (F) You can't allocate more than 64K on an MSDOS machine.
1654 =item Recompile perl with B<-D>DEBUGGING to use B<-D> switch
1656 (F) You can't use the B<-D> option unless the code to produce the
1657 desired output is compiled into Perl, which entails some overhead,
1658 which is why it's currently left out of your copy.
1660 =item Recursive inheritance detected
1662 (F) More than 100 levels of inheritance were used. Probably indicates
1663 an unintended loop in your inheritance hierarchy.
1665 =item Reference miscount in sv_replace()
1667 (W) The internal sv_replace() function was handed a new SV with a
1668 reference count of other than 1.
1670 =item regexp memory corruption
1672 (P) The regular expression engine got confused by what the regular
1673 expression compiler gave it.
1675 =item regexp out of space
1677 (P) A "can't happen" error, because safemalloc() should have caught it earlier.
1679 =item regexp too big
1681 (F) The current implementation of regular expressions uses shorts as
1682 address offsets within a string. Unfortunately this means that if
1683 the regular expression compiles to longer than 32767, it'll blow up.
1684 Usually when you want a regular expression this big, there is a better
1685 way to do it with multiple statements. See L<perlre>.
1687 =item Reversed %s= operator
1689 (W) You wrote your assignment operator backwards. The = must always
1690 comes last, to avoid ambiguity with subsequent unary operators.
1692 =item Runaway format
1694 (F) Your format contained the ~~ repeat-until-blank sequence, but it
1695 produced 200 lines at once, and the 200th line looked exactly like the
1696 199th line. Apparently you didn't arrange for the arguments to exhaust
1697 themselves, either by using ^ instead of @ (for scalar variables), or by
1698 shifting or popping (for array variables). See L<perlform>.
1700 =item Scalar value @%s[%s] better written as $%s[%s]
1702 (W) You've used an array slice (indicated by @) to select a single value of
1703 an array. Generally it's better to ask for a scalar value (indicated by $).
1704 The difference is that $foo[&bar] always behaves like a scalar, both when
1705 assigning to it and when evaluating its argument, while @foo[&bar] behaves
1706 like a list when you assign to it, and provides a list context to its
1707 subscript, which can do weird things if you're only expecting one subscript.
1709 On the other hand, if you were actually hoping to treat the array
1710 element as a list, you need to look into how references work, since
1711 Perl will not magically convert between scalars and lists for you. See
1714 =item Script is not setuid/setgid in suidperl
1716 (F) Oddly, the suidperl program was invoked on a script with its setuid
1717 or setgid bit set. This doesn't make much sense.
1719 =item Search pattern not terminated
1721 (F) The lexer couldn't find the final delimiter of a // or m{}
1722 construct. Remember that bracketing delimiters count nesting level.
1724 =item seek() on unopened file
1726 (W) You tried to use the seek() function on a filehandle that was either
1727 never opened or has been closed since.
1729 =item select not implemented
1731 (F) This machine doesn't implement the select() system call.
1733 =item sem%s not implemented
1735 (F) You don't have System V semaphore IPC on your system.
1737 =item semi-panic: attempt to dup freed string
1739 (S) The internal newSVsv() routine was called to duplicate a scalar
1740 that had previously been marked as free.
1742 =item Semicolon seems to be missing
1744 (W) A nearby syntax error was probably caused by a missing semicolon,
1745 or possibly some other missing operator, such as a comma.
1747 =item Send on closed socket
1749 (W) The filehandle you're sending to got itself closed sometime before now.
1750 Check your logic flow.
1752 =item Sequence (?#... not terminated
1754 (F) A regular expression comment must be terminated by a closing
1755 parenthesis. Embedded parens aren't allowed. See L<perlre>.
1757 =item Sequence (?%s...) not implemented
1759 (F) A proposed regular expression extension has the character reserved
1760 but has not yet been written. See L<perlre>.
1762 =item Sequence (?%s...) not recognized
1764 (F) You used a regular expression extension that doesn't make sense.
1769 Also known as "500 Server error". This is a CGI error, not a Perl
1770 error. You need to make sure your script is executable, is accessible
1771 by the user CGI is running the script under (which is probably not
1772 the user account you tested it under), does not rely on any environment
1773 variables (like PATH) from the user it isn't running under, and isn't
1774 in a location where the CGI server can't find it, basically, more or less.
1776 =item setegid() not implemented
1778 (F) You tried to assign to $), and your operating system doesn't support
1779 the setegid() system call (or equivalent), or at least Configure didn't
1782 =item seteuid() not implemented
1784 (F) You tried to assign to $>, and your operating system doesn't support
1785 the seteuid() system call (or equivalent), or at least Configure didn't
1788 =item setrgid() not implemented
1790 (F) You tried to assign to $(, and your operating system doesn't support
1791 the setrgid() system call (or equivalent), or at least Configure didn't
1794 =item setruid() not implemented
1796 (F) You tried to assign to $<, and your operating system doesn't support
1797 the setruid() system call (or equivalent), or at least Configure didn't
1800 =item Setuid/gid script is writable by world
1802 (F) The setuid emulator won't run a script that is writable by the world,
1803 because the world might have written on it already.
1805 =item shm%s not implemented
1807 (F) You don't have System V shared memory IPC on your system.
1809 =item shutdown() on closed fd
1811 (W) You tried to do a shutdown on a closed socket. Seems a bit superfluous.
1813 =item SIG%s handler "%s" not defined.
1815 (W) The signal handler named in %SIG doesn't, in fact, exist. Perhaps you
1816 put it into the wrong package?
1818 =item sort is now a reserved word
1820 (F) An ancient error message that almost nobody ever runs into anymore.
1821 But before sort was a keyword, people sometimes used it as a filehandle.
1823 =item Sort subroutine didn't return a numeric value
1825 (F) A sort comparison routine must return a number. You probably blew
1826 it by not using C<E<lt>=E<gt>> or C<cmp>, or by not using them correctly.
1827 See L<perlfunc/sort>.
1829 =item Sort subroutine didn't return single value
1831 (F) A sort comparison subroutine may not return a list value with more
1832 or less than one element. See L<perlfunc/sort>.
1836 (P) The split was looping infinitely. (Obviously, a split shouldn't iterate
1837 more times than there are characters of input, which is what happened.)
1838 See L<perlfunc/split>.
1840 =item Stat on unopened file <%s>
1842 (W) You tried to use the stat() function (or an equivalent file test)
1843 on a filehandle that was either never opened or has been closed since.
1845 =item Statement unlikely to be reached
1847 (W) You did an exec() with some statement after it other than a die().
1848 This is almost always an error, because exec() never returns unless
1849 there was a failure. You probably wanted to use system() instead,
1850 which does return. To suppress this warning, put the exec() in a block
1853 =item Subroutine %s redefined
1855 (W) You redefined a subroutine. To suppress this warning, say
1859 eval "sub name { ... }";
1862 =item Substitution loop
1864 (P) The substitution was looping infinitely. (Obviously, a
1865 substitution shouldn't iterate more times than there are characters of
1866 input, which is what happened.) See the discussion of substitution in
1867 L<perlop/"Quote and Quotelike Operators">.
1869 =item Substitution pattern not terminated
1871 (F) The lexer couldn't find the interior delimiter of a s/// or s{}{}
1872 construct. Remember that bracketing delimiters count nesting level.
1874 =item Substitution replacement not terminated
1876 (F) The lexer couldn't find the final delimiter of a s/// or s{}{}
1877 construct. Remember that bracketing delimiters count nesting level.
1879 =item substr outside of string
1881 (W) You tried to reference a substr() that pointed outside of a string.
1882 That is, the absolute value of the offset was larger than the length of
1883 the string. See L<perlfunc/substr>.
1885 =item suidperl is no longer needed since...
1887 (F) Your Perl was compiled with B<-D>SETUID_SCRIPTS_ARE_SECURE_NOW, but a
1888 version of the setuid emulator somehow got run anyway.
1892 (F) Probably means you had a syntax error. Common reasons include:
1894 A keyword is misspelled.
1895 A semicolon is missing.
1897 An opening or closing parenthesis is missing.
1898 An opening or closing brace is missing.
1899 A closing quote is missing.
1901 Often there will be another error message associated with the syntax
1902 error giving more information. (Sometimes it helps to turn on B<-w>.)
1903 The error message itself often tells you where it was in the line when
1904 it decided to give up. Sometimes the actual error is several tokens
1905 before this, since Perl is good at understanding random input.
1906 Occasionally the line number may be misleading, and once in a blue moon
1907 the only way to figure out what's triggering the error is to call
1908 C<perl -c> repeatedly, chopping away half the program each time to see
1909 if the error went away. Sort of the cybernetic version of S<20 questions>.
1911 =item syntax error at line %d: `%s' unexpected
1913 (A) You've accidentally run your script through the Bourne shell
1914 instead of Perl. Check the <#!> line, or manually feed your script
1917 =item System V IPC is not implemented on this machine
1919 (F) You tried to do something with a function beginning with "sem", "shm"
1920 or "msg". See L<perlfunc/semctl>, for example.
1922 =item Syswrite on closed filehandle
1924 (W) The filehandle you're writing to got itself closed sometime before now.
1925 Check your logic flow.
1927 =item tell() on unopened file
1929 (W) You tried to use the tell() function on a filehandle that was either
1930 never opened or has been closed since.
1932 =item Test on unopened file <%s>
1934 (W) You tried to invoke a file test operator on a filehandle that isn't
1935 open. Check your logic. See also L<perlfunc/-X>.
1937 =item That use of $[ is unsupported
1939 (F) Assignment to $[ is now strictly circumscribed, and interpreted as
1940 a compiler directive. You may only say one of
1949 This is to prevent the problem of one module changing the array base
1950 out from under another module inadvertently. See L<perlvar/$[>.
1952 =item The %s function is unimplemented
1954 The function indicated isn't implemented on this architecture, according
1955 to the probings of Configure.
1957 =item The crypt() function is unimplemented due to excessive paranoia.
1959 (F) Configure couldn't find the crypt() function on your machine,
1960 probably because your vendor didn't supply it, probably because they
1961 think the U.S. Govermnment thinks it's a secret, or at least that they
1962 will continue to pretend that it is. And if you quote me on that, I
1965 =item The stat preceding C<-l _> wasn't an lstat
1967 (F) It makes no sense to test the current stat buffer for symbolic linkhood
1968 if the last stat that wrote to the stat buffer already went past
1969 the symlink to get to the real file. Use an actual filename instead.
1971 =item times not implemented
1973 (F) Your version of the C library apparently doesn't do times(). I suspect
1974 you're not running on Unix.
1976 =item Too few args to syscall
1978 (F) There has to be at least one argument to syscall() to specify the
1979 system call to call, silly dilly.
1985 (A) You've accidentally run your script through B<csh> instead
1986 of Perl. Check the <#!> line, or manually feed your script
1989 =item Too many args to syscall
1991 (F) Perl only supports a maximum of 14 args to syscall().
1993 =item Too many arguments for %s
1995 (F) The function requires fewer arguments than you specified.
1997 =item trailing \ in regexp
1999 (F) The regular expression ends with an unbackslashed backslash. Backslash
2002 =item Translation pattern not terminated
2004 (F) The lexer couldn't find the interior delimiter of a tr/// or tr[][]
2007 =item Translation replacement not terminated
2009 (F) The lexer couldn't find the final delimiter of a tr/// or tr[][]
2012 =item truncate not implemented
2014 (F) Your machine doesn't implement a file truncation mechanism that
2015 Configure knows about.
2017 =item Type of arg %d to %s must be %s (not %s)
2019 (F) This function requires the argument in that position to be of a
2020 certain type. Arrays must be @NAME or @{EXPR}. Hashes must be
2021 %NAME or %{EXPR}. No implicit dereferencing is allowed--use the
2022 {EXPR} forms as an explicit dereference. See L<perlref>.
2024 =item umask: argument is missing initial 0
2026 (W) A umask of 222 is incorrect. It should be 0222, since octal literals
2027 always start with 0 in Perl, as in C.
2029 =item Unable to create sub named "%s"
2031 (F) You attempted to create or access a subroutine with an illegal name.
2033 =item Unbalanced context: %d more PUSHes than POPs
2035 (W) The exit code detected an internal inconsistency in how many execution
2036 contexts were entered and left.
2038 =item Unbalanced saves: %d more saves than restores
2040 (W) The exit code detected an internal inconsistency in how many
2041 values were temporarily localized.
2043 =item Unbalanced scopes: %d more ENTERs than LEAVEs
2045 (W) The exit code detected an internal inconsistency in how many blocks
2046 were entered and left.
2048 =item Unbalanced tmps: %d more allocs than frees
2050 (W) The exit code detected an internal inconsistency in how many mortal
2051 scalars were allocated and freed.
2053 =item Undefined format "%s" called
2055 (F) The format indicated doesn't seem to exist. Perhaps it's really in
2056 another package? See L<perlform>.
2058 =item Undefined sort subroutine "%s" called
2060 (F) The sort comparison routine specified doesn't seem to exist. Perhaps
2061 it's in a different package? See L<perlfunc/sort>.
2063 =item Undefined subroutine &%s called
2065 (F) The subroutine indicated hasn't been defined, or if it was, it
2066 has since been undefined.
2068 =item Undefined subroutine called
2070 (F) The anonymous subroutine you're trying to call hasn't been defined,
2071 or if it was, it has since been undefined.
2073 =item Undefined subroutine in sort
2075 (F) The sort comparison routine specified is declared but doesn't seem to
2076 have been defined yet. See L<perlfunc/sort>.
2078 =item Undefined top format "%s" called
2080 (F) The format indicated doesn't seem to exist. Perhaps it's really in
2081 another package? See L<perlform>.
2083 =item unexec of %s into %s failed!
2085 (F) The unexec() routine failed for some reason. See your local FSF
2086 representative, who probably put it there in the first place.
2088 =item Unknown BYTEORDER
2090 (F) There are no byteswapping functions for a machine with this byte order.
2092 =item unmatched () in regexp
2094 (F) Unbackslashed parentheses must always be balanced in regular
2095 expressions. If you're a vi user, the % key is valuable for finding
2096 the matching paren. See L<perlre>.
2098 =item Unmatched right bracket
2100 (F) The lexer counted more closing curly brackets (braces) than opening
2101 ones, so you're probably missing an opening bracket. As a general
2102 rule, you'll find the missing one (so to speak) near the place you were
2105 =item unmatched [] in regexp
2107 (F) The brackets around a character class must match. If you wish to
2108 include a closing bracket in a character class, backslash it or put it first.
2111 =item Unquoted string "%s" may clash with future reserved word
2113 (W) You used a bare word that might someday be claimed as a reserved word.
2114 It's best to put such a word in quotes, or capitalize it somehow, or insert
2115 an underbar into it. You might also declare it as a subroutine.
2117 =item Unrecognized character \%03o ignored
2119 (S) A garbage character was found in the input, and ignored, in case it's
2120 a weird control character on an EBCDIC machine, or some such.
2122 =item Unrecognized signal name "%s"
2124 (F) You specified a signal name to the kill() function that was not recognized.
2125 Say C<kill -l> in your shell to see the valid signal names on your system.
2127 =item Unrecognized switch: -%s
2129 (F) You specified an illegal option to Perl. Don't do that.
2130 (If you think you didn't do that, check the #! line to see if it's
2131 supplying the bad switch on your behalf.)
2133 =item Unsuccessful %s on filename containing newline
2135 (W) A file operation was attempted on a filename, and that operation
2136 failed, PROBABLY because the filename contained a newline, PROBABLY
2137 because you forgot to chop() or chomp() it off. See L<perlfunc/chop>.
2139 =item Unsupported directory function "%s" called
2141 (F) Your machine doesn't support opendir() and readdir().
2143 =item Unsupported function %s
2145 (F) This machines doesn't implement the indicated function, apparently.
2146 At least, Configure doesn't think so.
2148 =item Unsupported socket function "%s" called
2150 (F) Your machine doesn't support the Berkeley socket mechanism, or at
2151 least that's what Configure thought.
2153 =item Unterminated <> operator
2155 (F) The lexer saw a left angle bracket in a place where it was expecting
2156 a term, so it's looking for the corresponding right angle bracket, and not
2157 finding it. Chances are you left some needed parentheses out earlier in
2158 the line, and you really meant a "less than".
2160 =item Use of $# is deprecated
2162 (D) This was an ill-advised attempt to emulate a poorly defined awk feature.
2163 Use an explicit printf() or sprintf() instead.
2165 =item Use of $* is deprecated
2167 (D) This variable magically turned on multiline pattern matching, both for
2168 you and for any luckless subroutine that you happen to call. You should
2169 use the new C<//m> and C<//s> modifiers now to do that without the dangerous
2170 action-at-a-distance effects of C<$*>.
2172 =item Use of %s in printf format not supported
2174 (F) You attempted to use a feature of printf that is accessible only
2175 from C. This usually means there's a better way to do it in Perl.
2177 =item Use of %s is deprecated
2179 (D) The construct indicated is no longer recommended for use, generally
2180 because there's a better way to do it, and also because the old way has
2183 =item Use of bare << to mean <<"" is deprecated
2185 (D) You are now encouraged to use the explicitly quoted form if you
2186 wish to use a blank line as the terminator of the here-document.
2188 =item Use of implicit split to @_ is deprecated
2190 (D) It makes a lot of work for the compiler when you clobber a
2191 subroutine's argument list, so it's better if you assign the results of
2192 a split() explicitly to an array (or list).
2194 =item Use of uninitialized value
2196 (W) An undefined value was used as if it were already defined. It was
2197 interpreted as a "" or a 0, but maybe it was a mistake. To suppress this
2198 warning assign an initial value to your variables.
2200 =item Useless use of %s in void context
2202 (W) You did something without a side effect in a context that does nothing
2203 with the return value, such as a statement that doesn't return a value
2204 from a block, or the left side of a scalar comma operator. Very often
2205 this points not to stupidity on your part, but a failure of Perl to parse
2206 your program the way you thought it would. For example, you'd get this
2207 if you mixed up your C precedence with Python precedence and said
2211 when you meant to say
2213 ($one, $two) = (1, 2);
2215 Another common error is to use ordinary parentheses to construct a list
2216 reference when you should be using square or curly brackets, for
2221 when you should have said
2225 The square brackets explicitly turn a list value into a scalar value,
2226 while parentheses do not. So when a parenthesized list is evaluated in
2227 a scalar context, the comma is treated like C's comma operator, which
2228 throws away the left argument, which is not what you want. See
2229 L<perlref> for more on this.
2231 =item Variable "%s" is not exported
2233 (F) While "use strict" in effect, you referred to a global variable
2234 that you apparently thought was imported from another module, because
2235 something else of the same name (usually a subroutine) is exported
2236 by that module. It usually means you put the wrong funny character
2237 on the front of your variable.
2239 =item Variable syntax.
2241 (A) You've accidentally run your script through B<csh> instead
2242 of Perl. Check the <#!> line, or manually feed your script
2245 =item Warning: unable to close filehandle %s properly.
2247 (S) The implicit close() done by an open() got an error indication on the
2248 close(). This usually indicates your filesystem ran out of disk space.
2250 =item Warning: Use of "%s" without parens is ambiguous
2252 (S) You wrote a unary operator followed by something that looks like a
2253 binary operator that could also have been interpreted as a term or
2254 unary operator. For instance, if you know that the rand function
2255 has a default argument of 1.0, and you write
2259 you may THINK you wrote the same thing as
2263 but in actual fact, you got
2267 So put in parens to say what you really mean.
2269 =item Write on closed filehandle
2271 (W) The filehandle you're writing to got itself closed sometime before now.
2272 Check your logic flow.
2274 =item X outside of string
2276 (F) You had a pack template that specified a relative position before
2277 the beginning of the string being unpacked. See L<perlfunc/pack>.
2279 =item x outside of string
2281 (F) You had a pack template that specified a relative position after
2282 the end of the string being unpacked. See L<perlfunc/pack>.
2284 =item Xsub "%s" called in sort
2286 (F) The use of an external subroutine as a sort comparison is not yet supported.
2288 =item Xsub called in sort
2290 (F) The use of an external subroutine as a sort comparison is not yet supported.
2292 =item You can't use C<-l> on a filehandle
2294 (F) A filehandle represents an opened file, and when you opened the file it
2295 already went past any symlink you are presumably trying to look for.
2296 Use a filename instead.
2298 =item YOU HAVEN'T DISABLED SET-ID SCRIPTS IN THE KERNEL YET!
2300 (F) And you probably never will, since you probably don't have the
2301 sources to your kernel, and your vendor probably doesn't give a rip
2302 about what you want. Your best bet is to use the wrapsuid script in
2303 the eg directory to put a setuid C wrapper around your script.
2305 =item You need to quote "%s"
2307 (W) You assigned a bareword as a signal handler name. Unfortunately, you
2308 already have a subroutine of that name declared, which means that Perl 5
2309 will try to call the subroutine when the assignment is executed, which is
2310 probably not what you want. (If it IS what you want, put an & in front.)
2312 =item [gs]etsockopt() on closed fd
2314 (W) You tried to get or set a socket option on a closed socket.
2315 Did you forget to check the return value of your socket() call?
2316 See L<perlfunc/getsockopt>.
2318 =item \1 better written as $1
2320 (W) Outside of patterns, backreferences live on as variables. The use
2321 of backslashes is grandfathered on the righthand side of a
2322 substitution, but stylistically it's better to use the variable form
2323 because other Perl programmers will expect it, and it works better
2324 if there are more than 9 backreferences.
2326 =item '|' and '<' may not both be specified on command line
2328 (F) An error peculiar to VMS. Perl does its own command line redirection, and
2329 found that STDIN was a pipe, and that you also tried to redirect STDIN using
2330 '<'. Only one STDIN stream to a customer, please.
2332 =item '|' and '>' may not both be specified on command line
2334 (F) An error peculiar to VMS. Perl does its own command line redirection, and
2335 thinks you tried to redirect stdout both to a file and into a pipe to another
2336 command. You need to choose one or the other, though nothing's stopping you
2337 from piping into a program or Perl script which 'splits' output into two
2340 open(OUT,">$ARGV[0]") or die "Can't write to $ARGV[0]: $!";