perlman
gods
<HR>
<P>
<H1><A NAME="NAME">NAME</A></H1>
<P>
perldiag - various Perl diagnostics
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
These messages are classified as follows (listed in increasing order of
desperation):
<P>
<PRE> (W) A warning (optional).
(D) A deprecation (optional).
(S) A severe warning (mandatory).
(F) A fatal error (trappable).
(P) An internal error you should never see (trappable).
(X) A very fatal error (nontrappable).
(A) An alien error message (not generated by Perl).
</PRE>
<P>
Optional warnings are enabled by using the <STRONG>-w</STRONG> switch. Warnings may be captured by setting <CODE>$SIG{__WARN__}</CODE> to a reference to a routine that will be called on each warning instead of
printing it. See [perlman:perlvar|the perlvar manpage]. Trappable errors may be trapped using the eval operator. See
[perlfunc:eval|eval].
<P>
Some of these messages are generic. Spots that vary are denoted with a %s,
just as in a printf format. Note that some messages start with a %s! The
symbols <CODE>"%(-?@</CODE> sort before the letters, while <CODE>[</CODE> and <CODE>\</CODE> sort after.
<DL>
<DT><STRONG><A NAME="item__my_">"my" variable %s can't be in a package</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Lexically scoped variables aren't in a package, so it doesn't make sense to try to declare one with a package qualifier on the front. Use
<CODE>local()</CODE> if you want to localize a package variable.
<P><DT><STRONG>"my" variable %s masks earlier declaration in same scope</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT>
<FONT SIZE=-1>A</FONT> lexical variable has been redeclared in the same scope, effectively eliminating all access to the previous instance. This is almost always a typographical error. Note that the earlier variable will still exist until the end of the scope or until all closure referents to it are destroyed.
<P><DT><STRONG><A NAME="item__no_">"no" not allowed in expression</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The ``no'' keyword is recognized and executed at
compile time, and returns no useful value. See [perlman:perlmod|the perlmod manpage].
<P><DT><STRONG><A NAME="item__use_">"use" not allowed in expression</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The ``use'' keyword is recognized and executed at
compile time, and returns no useful value. See [perlman:perlmod|the perlmod manpage].
<P><DT><STRONG><A NAME="item__">% may only be used in unpack</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You can't pack a string by supplying a checksum,
because the checksumming process loses information, and you can't go the
other way. See [perlfunc:unpack|unpack].
<P><DT><STRONG><A NAME="item__s">%s (...) interpreted as function</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You've run afoul of the rule that says that any
list operator followed by parentheses turns into a function, with all the
list operators arguments found inside the parentheses. See [perlman:perlop].
<P><DT><STRONG>%s argument is not a HASH element</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The argument to
<CODE>exists()</CODE> must be a hash element, such as
<P>
<PRE> $foo{$bar}
$ref->[12]->{"susie"}
</PRE>
<DT><STRONG>%s argument is not a HASH element or slice</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The argument to
<CODE>delete()</CODE> must be either a hash element, such as
<P>
<PRE> $foo{$bar}
$ref->[12]->{"susie"}
</PRE>
<P>
or a hash slice, such as
<P>
<PRE> @foo{$bar, $baz, $xyzzy}
@{$ref->[12]}{"susie", "queue"}
</PRE>
<DT><STRONG>%s did not return a true value</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT>
<FONT SIZE=-1>A</FONT> required (or used) file must return a true value to indicate that it compiled correctly and ran its initialization code correctly. It's traditional to end such a file with a ``1;'', though any true value would do. See
[perlfunc:require|require].
<P><DT><STRONG>%s found where operator expected</STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT> The Perl lexer knows whether to expect a term or
an operator. If it sees what it knows to be a term when it was expecting to
see an operator, it gives you this warning. Usually it indicates that an
operator or delimiter was omitted, such as a semicolon.
<P><DT><STRONG>%s had compilation errors</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The final summary message when a <CODE>perl -c</CODE> fails.
<P><DT><STRONG>%s has too many errors</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The parser has given up trying to parse the
program after 10 errors. Further error messages would likely be
uninformative.
<P><DT><STRONG>%s matches null string many times</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> The pattern you've specified would be an infinite
loop if the regular expression engine didn't specifically check for that.
See [perlman:perlre|the perlre manpage].
<P><DT><STRONG>%s never introduced</STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT> The symbol in question was declared but somehow
went out of scope before it could possibly have been used.
<P><DT><STRONG>%s syntax OK</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The final summary message when a <CODE>perl -c</CODE> succeeds.
<P><DT><STRONG><A NAME="item__s_">%s: Command not found</A></STRONG><P>
<DD>
<FONT SIZE=-1>(A)</FONT> You've accidentally run your script through <STRONG>csh</STRONG> instead of Perl. Check the #! line, or manually feed your script into Perl
yourself.
<P><DT><STRONG>%s: Expression syntax</STRONG><P>
<DD>
<FONT SIZE=-1>(A)</FONT> You've accidentally run your script through <STRONG>csh</STRONG> instead of Perl. Check the #! line, or manually feed your script into Perl
yourself.
<P><DT><STRONG>%s: Undefined variable</STRONG><P>
<DD>
<FONT SIZE=-1>(A)</FONT> You've accidentally run your script through <STRONG>csh</STRONG> instead of Perl. Check the #! line, or manually feed your script into Perl
yourself.
<P><DT><STRONG>%s: not found</STRONG><P>
<DD>
<FONT SIZE=-1>(A)</FONT> You've accidentally run your script through the
Bourne shell instead of Perl. Check the #! line, or manually feed your
script into Perl yourself.
<P><DT><STRONG><A NAME="item__Missing">(Missing semicolon on previous line?)</A></STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT> This is an educated guess made in conjunction with
the message ``%s found where operator expected''. Don't automatically put a
semicolon on the previous line just because you saw this message.
<P><DT><STRONG><A NAME="item__P">-P not allowed for setuid/setgid script</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The script would have to be opened by the
<FONT SIZE=-1>C</FONT> preprocessor by name, which provides a race condition that breaks security.
<P><DT><STRONG><A NAME="item__T">-T and -B not implemented on filehandles</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Perl can't peek at the stdio buffer of filehandles
when it doesn't know about your kind of stdio. You'll have to use a
filename instead.
<P><DT><STRONG><A NAME="item__p">-p destination: %s</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> An error occurred during the implicit output
invoked by the <CODE>-p</CODE>
command-line switch. (This output goes to
<FONT SIZE=-1>STDOUT</FONT> unless you've redirected it with
<CODE>select().)</CODE>
<P><LI><STRONG><A NAME="item_Server_error">Server error</A></STRONG>
See Server error.
<P><DT><STRONG><A NAME="item__">?+* follows nothing in regexp</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You started a regular expression with a
quantifier. Backslash it if you meant it literally. See [perlman:perlre|the perlre manpage].
<P><DT><STRONG><A NAME="item__">@ outside of string</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You had a pack template that specified an absolute
position outside the string being unpacked. See [perlfunc:pack|pack].
<P><DT><STRONG><A NAME="item_accept">accept() on closed fd</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You tried to do an accept on a closed socket. Did you forget to check the return value of your
<CODE>socket()</CODE> call? See
[perlfunc:accept|accept].
<P><DT><STRONG><A NAME="item_Allocation">Allocation too large: %lx</A></STRONG><P>
<DD>
<FONT SIZE=-1>(X)</FONT> You can't allocate more than
<FONT SIZE=-1>64K</FONT> on an
<FONT SIZE=-1>MS-DOS</FONT> machine.
<P><DT><STRONG><A NAME="item_Applying">Applying %s to %s will act on scalar(%s)</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> The pattern match (//), substitution (s///), and
transliteration (tr///) operators work on scalar values. If you apply one
of them to an array or a hash, it will convert the array or hash to a
scalar value -- the length of an array, or the population info of a hash --
and then work on that scalar value. This is probably not what you meant to
do. See
[perlfunc:grep|grep] and [perlfunc:map|map] for alternatives.
<P><DT><STRONG><A NAME="item_Arg">Arg too short for msgsnd</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT>
<CODE>msgsnd()</CODE> requires a string at least as long as
<CODE>sizeof(long).</CODE>
<P><DT><STRONG><A NAME="item_Ambiguous">Ambiguous use of %s resolved as %s</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)(S)</FONT> You said something that may not be interpreted
the way you thought. Normally it's pretty easy to disambiguate it by
supplying a missing quote, operator, parenthesis pair or declaration.
<P><DT><STRONG>Ambiguous call resolved as CORE::%s(), qualify as such or use &</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT>
<FONT SIZE=-1>A</FONT> subroutine you have declared has the same name as a Perl keyword, and you have used the name without qualification for calling one or the other. Perl decided to call the builtin because the subroutine is not imported.
<P>
To force interpretation as a subroutine call, either put an ampersand
before the subroutine name, or qualify the name with its package.
Alternatively, you can import the subroutine (or pretend that it's imported
with the <CODE>use subs</CODE> pragma).
<P>
To silently interpret it as the Perl operator, use the <CODE>CORE::</CODE> prefix on the operator (e.g. <CODE>CORE::log($x)</CODE>) or by declaring the subroutine to be an object method (see <U>the attrs manpage</U><!--../lib/attrs.html-->).
<P><DT><STRONG><A NAME="item_Args">Args must match #! line</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The setuid emulator requires that the arguments
Perl was invoked with match the arguments specified on the #! line. Since
some systems impose a one-argument limit on the #! line, try combining
switches; for example, turn <CODE>-w -U</CODE> into <CODE>-wU</CODE>.
<P><DT><STRONG><A NAME="item_Argument">Argument "%s" isn't numeric%s</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> The indicated string was fed as an argument to an
operator that expected a numeric value instead. If you're fortunate the
message will identify which operator was so unfortunate.
<P><DT><STRONG><A NAME="item_Array">Array @%s missing the @ in argument %d of %s()</A></STRONG><P>
<DD>
<FONT SIZE=-1>(D)</FONT> Really old Perl let you omit the @ on array names
in some spots. This is now heavily deprecated.
<P><DT><STRONG><A NAME="item_assertion">assertion botched: %s</A></STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> The malloc package that comes with Perl had an
internal failure.
<P><DT><STRONG><A NAME="item_Assertion">Assertion failed: file "%s"</A></STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT>
<FONT SIZE=-1>A</FONT> general assertion failed. The file in question must be examined.
<P><DT><STRONG><A NAME="item_Assignment">Assignment to both a list and a scalar</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> If you assign to a conditional operator, the 2nd
and 3rd arguments must either both be scalars or both be lists. Otherwise
Perl won't know which context to supply to the right side.
<P><DT><STRONG><A NAME="item_Attempt">Attempt to free non-arena SV: 0x%lx</A></STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> All
<FONT SIZE=-1>SV</FONT> objects are supposed to be allocated from arenas that will be garbage collected on exit. An
<FONT SIZE=-1>SV</FONT> was discovered to be outside any of those arenas.
<P><DT><STRONG>Attempt to free nonexistent shared string</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> Perl maintains a reference counted internal table
of strings to optimize the storage and access of hash keys and other
strings. This indicates someone tried to decrement the reference count of a
string that can no longer be found in the table.
<P><DT><STRONG>Attempt to free temp prematurely</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> Mortalized values are supposed to be freed by the
<CODE>free_tmps()</CODE> routine. This indicates that something else is freeing the
<FONT SIZE=-1>SV</FONT> before the
<CODE>free_tmps()</CODE> routine gets a chance, which means that the
<CODE>free_tmps()</CODE> routine will be freeing an unreferenced scalar when it does try to free it.
<P><DT><STRONG>Attempt to free unreferenced glob pointers</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> The reference counts got screwed up on symbol
aliases.
<P><DT><STRONG>Attempt to free unreferenced scalar</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> Perl went to decrement the reference count of a scalar to see if it would go to 0, and discovered that it had already gone to 0 earlier, and should have been freed, and in fact, probably was freed. This could indicate that
<CODE>SvREFCNT_dec()</CODE> was called too many times, or that
<CODE>SvREFCNT_inc()</CODE> was called too few times, or that the
<FONT SIZE=-1>SV</FONT> was mortalized when it shouldn't have been, or that memory has been corrupted.
<P><DT><STRONG>Attempt to pack pointer to temporary value</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You tried to pass a temporary value (like the result of a function, or a computed expression) to the ``p''
<CODE>pack()</CODE> template. This means the result contains a pointer to a location that could become invalid anytime, even before the end of the current statement. Use literals or global values as arguments to the ``p''
<CODE>pack()</CODE> template to avoid this warning.
<P><DT><STRONG>Attempt to use reference as lvalue in substr</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You supplied a reference as the first argument to
<CODE>substr()</CODE> used as an lvalue, which is pretty strange. Perhaps you forgot to dereference it first. See
[perlfunc:substr|substr].
<P><DT><STRONG><A NAME="item_Bad">Bad arg length for %s, is %d, should be %d</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You passed a buffer of the wrong size to one of
<CODE>msgctl(),</CODE>
<CODE>semctl()</CODE> or
<CODE>shmctl().</CODE> In
<FONT SIZE=-1>C</FONT> parlance, the correct sizes are, respectively,
sizeof(struct msqid_ds *), sizeof(struct semid_ds *), and
sizeof(struct shmid_ds *).
<P><DT><STRONG>Bad filehandle: %s</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT>
<FONT SIZE=-1>A</FONT> symbol was passed to something wanting a filehandle, but the symbol has no filehandle associated with it. Perhaps you didn't do an
<CODE>open(),</CODE> or did it in another package.
<P><DT><STRONG>Bad free() ignored</STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT> An internal routine called
<CODE>free()</CODE> on something that had never been
<CODE>malloc()ed</CODE> in the first place. Mandatory, but can be disabled by setting environment variable
<CODE>PERL_BADFREE</CODE> to 1.
<P>
This message can be quite often seen with DB_File on systems with ``hard''
dynamic linking, like <CODE>AIX</CODE> and <CODE>OS/2</CODE>. It is a bug of
<CODE>Berkeley DB</CODE> which is left unnoticed if <CODE>DB</CODE> uses <EM>forgiving</EM>
system
<CODE>malloc().</CODE>
<P><DT><STRONG>Bad hash</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> One of the internal hash routines was passed a null
<FONT SIZE=-1>HV</FONT> pointer.
<P><DT><STRONG>Bad index while coercing array into hash</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The index looked up in the hash found as the 0'th
element of a pseudo-hash is not legal. Index values must be at 1 or
greater. See [perlman:perlref|the perlref manpage].
<P><DT><STRONG>Bad name after %s::</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You started to name a symbol by using a package
prefix, and then didn't finish the symbol. In particular, you can't
interpolate outside of quotes, so
<P>
<PRE> $var = 'myvar';
$sym = mypack::$var;
</PRE>
<P>
is not the same as
<P>
<PRE> $var = 'myvar';
$sym = "mypack::$var";
</PRE>
<DT><STRONG>Bad symbol for array</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> An internal request asked to add an array entry to
something that wasn't a symbol table entry.
<P><DT><STRONG>Bad symbol for filehandle</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> An internal request asked to add a filehandle
entry to something that wasn't a symbol table entry.
<P><DT><STRONG>Bad symbol for hash</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> An internal request asked to add a hash entry to
something that wasn't a symbol table entry.
<P><DT><STRONG><A NAME="item_Badly">Badly placed ()'s</A></STRONG><P>
<DD>
<FONT SIZE=-1>(A)</FONT> You've accidentally run your script through <STRONG>csh</STRONG> instead of Perl. Check the #! line, or manually feed your script into Perl
yourself.
<P><DT><STRONG><A NAME="item_Bareword">Bareword "%s" not allowed while "strict subs" in use</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> With ``strict subs'' in use, a bareword is only
allowed as a subroutine identifier, in curly braces or to the left of the
``=>'' symbol. Perhaps you need to predeclare a subroutine?
<P><DT><STRONG>Bareword "%s" refers to nonexistent package</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You used a qualified bareword of the form <CODE>Foo::</CODE>, but the compiler saw no other uses of that namespace before that point.
Perhaps you need to predeclare a package?
<P><DT><STRONG><A NAME="item_BEGIN">BEGIN failed--compilation aborted</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> An untrapped exception was raised while executing a
<FONT SIZE=-1>BEGIN</FONT> subroutine. Compilation stops immediately and the interpreter is exited.
<P><DT><STRONG>BEGIN not safe after errors--compilation aborted</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Perl found a <CODE>BEGIN {}</CODE> subroutine (or a [perlfunc:use|use] directive, which implies a <CODE>BEGIN {}</CODE>) after one or more compilation errors had already occurred. Since the
intended environment for the <CODE>BEGIN {}</CODE>
could not be guaranteed (due to the errors), and since subsequent code
likely depends on its correct operation, Perl just gave up.
<P><DT><STRONG><A NAME="item_bind">bind() on closed fd</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You tried to do a bind on a closed socket. Did you forget to check the return value of your
<CODE>socket()</CODE> call? See
[perlfunc:bind|bind].
<P><DT><STRONG><A NAME="item_Bizarre">Bizarre copy of %s in %s</A></STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> Perl detected an attempt to copy an internal value
that is not copiable.
<P><DT><STRONG><A NAME="item_Callback">Callback called exit</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT>
<FONT SIZE=-1>A</FONT> subroutine invoked from an external package via
<CODE>perl_call_sv()</CODE> exited by calling exit.
<P><DT><STRONG><A NAME="item_Can">Can't "goto" outside a block</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT>
<FONT SIZE=-1>A</FONT> ``goto'' statement was executed to jump out of what might look like a block, except that it isn't a proper block. This usually occurs if you tried to jump out of a
<CODE>sort()</CODE> block or subroutine, which is a no-no. See
[perlfunc:goto|goto].
<P><DT><STRONG>Can't "goto" into the middle of a foreach loop</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT>
<FONT SIZE=-1>A</FONT> ``goto'' statement was executed to jump into the middle of a foreach loop. You can't get there from here. See
[perlfunc:goto|goto].
<P><DT><STRONG>Can't "last" outside a block</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT>
<FONT SIZE=-1>A</FONT> ``last'' statement was executed to break out of the current block, except that there's this itty bitty problem called there isn't a current block. Note that an ``if'' or ``else'' block doesn't count as a ``loopish'' block, as doesn't a block given to
<CODE>sort().</CODE> You can usually double the curlies to get the same effect though, because the inner curlies will be considered a block that loops once. See
[perlfunc:last|last].
<P><DT><STRONG>Can't "next" outside a block</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT>
<FONT SIZE=-1>A</FONT> ``next'' statement was executed to reiterate the current block, but there isn't a current block. Note that an ``if'' or ``else'' block doesn't count as a ``loopish'' block, as doesn't a block given to
<CODE>sort().</CODE> You can usually double the curlies to get the same effect though, because the inner curlies will be considered a block that loops once. See
[perlfunc:next|next].
<P><DT><STRONG>Can't "redo" outside a block</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT>
<FONT SIZE=-1>A</FONT> ``redo'' statement was executed to restart the current block, but there isn't a current block. Note that an ``if'' or ``else'' block doesn't count as a ``loopish'' block, as doesn't a block given to
<CODE>sort().</CODE> You can usually double the curlies to get the same effect though, because the inner curlies will be considered a block that loops once. See
[perlfunc:redo|redo].
<P><DT><STRONG>Can't bless non-reference value</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Only hard references may be blessed. This is how
Perl ``enforces'' encapsulation of objects. See [perlman:perlobj|the perlobj manpage].
<P><DT><STRONG>Can't break at that line</STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT>
<FONT SIZE=-1>A</FONT> warning intended to only be printed while running within the debugger, indicating the line number specified wasn't the location of a statement that could be stopped at.
<P><DT><STRONG>Can't call method "%s" in empty package "%s"</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You called a method correctly, and it correctly indicated a package functioning as a class, but that package doesn't have
<FONT SIZE=-1>ANYTHING</FONT> defined in it, let alone methods. See
[perlman:perlobj|the perlobj manpage].
<P><DT><STRONG>Can't call method "%s" on unblessed reference</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT>
<FONT SIZE=-1>A</FONT> method call must know in what package it's supposed to run. It ordinarily finds this out from the object reference you supply, but you didn't supply an object reference in this case.
<FONT SIZE=-1>A</FONT> reference isn't an object reference until it has been blessed. See
[perlman:perlobj|the perlobj manpage].
<P><DT><STRONG>Can't call method "%s" without a package or object reference</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You used the syntax of a method call, but the slot
filled by the object reference or package name contains an expression that
returns a defined value which is neither an object reference nor a package
name. Something like this will reproduce the error:
<P>
<PRE> $BADREF = 42;
process $BADREF 1,2,3;
$BADREF->process(1,2,3);
</PRE>
<DT><STRONG>Can't call method "%s" on an undefined value</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You used the syntax of a method call, but the slot
filled by the object reference or package name contains an undefined value.
Something like this will reproduce the error:
<P>
<PRE> $BADREF = undef;
process $BADREF 1,2,3;
$BADREF->process(1,2,3);
</PRE>
<DT><STRONG>Can't chdir to %s</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You called <CODE>perl -x/foo/bar</CODE>, but <CODE>/foo/bar</CODE> is not a directory that you can chdir to, possibly because it doesn't
exist.
<P><DT><STRONG>Can't coerce %s to integer in %s</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Certain types of SVs, in particular real symbol
table entries (typeglobs), can't be forced to stop being what they are. So
you can't say things like:
<P>
<PRE> *foo += 1;
</PRE>
<P>
You
<FONT SIZE=-1>CAN</FONT> say
<P>
<PRE> $foo = *foo;
$foo += 1;
</PRE>
<P>
but then <CODE>$foo</CODE> no longer contains a glob.
<P><DT><STRONG>Can't coerce %s to number in %s</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Certain types of SVs, in particular real symbol
table entries (typeglobs), can't be forced to stop being what they are.
<P><DT><STRONG>Can't coerce %s to string in %s</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Certain types of SVs, in particular real symbol
table entries (typeglobs), can't be forced to stop being what they are.
<P><DT><STRONG>Can't coerce array into hash</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You used an array where a hash was expected, but
the array has no information on how to map from keys to array indices. You
can do that only with arrays that have a hash reference at index 0.
<P><DT><STRONG>Can't create pipe mailbox</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> An error peculiar to
<FONT SIZE=-1>VMS.</FONT> The process is suffering from exhausted quotas or other plumbing problems.
<P><DT><STRONG>Can't declare %s in my</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Only scalar, array, and hash variables may be
declared as lexical variables. They must have ordinary identifiers as
names.
<P><DT><STRONG>Can't do inplace edit on %s: %s</STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT> The creation of the new file failed for the
indicated reason.
<P><DT><STRONG>Can't do inplace edit without backup</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You're on a system such as
<FONT SIZE=-1>MS-DOS</FONT> that gets confused if you try reading from a deleted (but still opened) file. You have to say
<CODE>-i.bak</CODE>, or some such.
<P><DT><STRONG>Can't do inplace edit: %s gt 14 characters</STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT> There isn't enough room in the filename to make a
backup name for the file.
<P><DT><STRONG>Can't do inplace edit: %s is not a regular file</STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT> You tried to use the <STRONG>-i</STRONG> switch on a special file, such as a file in /dev, or a
<FONT SIZE=-1>FIFO.</FONT> The file was ignored.
<P><DT><STRONG>Can't do setegid!</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> The
<CODE>setegid()</CODE> call failed for some reason in the setuid emulator of suidperl.
<P><DT><STRONG>Can't do seteuid!</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> The setuid emulator of suidperl failed for some
reason.
<P><DT><STRONG>Can't do setuid</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> This typically means that ordinary perl tried to
exec suidperl to do setuid emulation, but couldn't exec it. It looks for a
name of the form sperl5.000 in the same directory that the perl executable
resides under the name perl5.000, typically /usr/local/bin on Unix
machines. If the file is there, check the execute permissions. If it isn't,
ask your sysadmin why he and/or she removed it.
<P><DT><STRONG>Can't do waitpid with flags</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> This machine doesn't have either
<CODE>waitpid()</CODE> or
<CODE>wait4(),</CODE> so only
<CODE>waitpid()</CODE> without flags is emulated.
<P><DT><STRONG>Can't do {n,m} with n gt m</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Minima must be less than or equal to maxima. If
you really want your regexp to match something 0 times, just put {0}. See [perlman:perlre|the perlre manpage].
<P><DT><STRONG>Can't emulate -%s on #! line</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The #! line specifies a switch that doesn't make
sense at this point. For example, it'd be kind of silly to put a <STRONG>-x</STRONG> on the #! line.
<P><DT><STRONG>Can't exec "%s": %s</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> An
<CODE>system(),</CODE>
<CODE>exec(),</CODE> or piped open call could not execute the named program for the indicated reason. Typical reasons include: the permissions were wrong on the file, the file wasn't found in
<CODE>$ENV{PATH}</CODE>, the executable in question was compiled for another architecture, or the
#! line in a script points to an interpreter that can't be run for similar
reasons. (Or maybe your system doesn't support #! at all.)
<P><DT><STRONG>Can't exec %s</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Perl was trying to execute the indicated program
for you because that's what the #! line said. If that's not what you
wanted, you may need to mention ``perl'' on the #! line somewhere.
<P><DT><STRONG>Can't execute %s</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You used the <STRONG>-S</STRONG> switch, but the copies of the script to execute found in the
<FONT SIZE=-1>PATH</FONT> did not have correct permissions.
<P><DT><STRONG>Can't find %s on PATH, '.' not in PATH</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You used the <STRONG>-S</STRONG> switch, but the script to execute could not be found in the
<FONT SIZE=-1>PATH,</FONT> or at least not with the correct permissions. The script exists in the current directory, but
<FONT SIZE=-1>PATH</FONT> prohibits running it.
<P><DT><STRONG>Can't find %s on PATH</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You used the <STRONG>-S</STRONG> switch, but the script to execute could not be found in the
<FONT SIZE=-1>PATH.</FONT>
<P><DT><STRONG>Can't find label %s</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You said to goto a label that isn't mentioned
anywhere that it's possible for us to go to. See [perlfunc:goto|goto].
<P><DT><STRONG>Can't find string terminator %s anywhere before EOF</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Perl strings can stretch over multiple lines. This
message means that the closing delimiter was omitted. Because bracketed
quotes count nesting levels, the following is missing its final
parenthesis:
<P>
<PRE> print q(The character '(' starts a side comment.);
</PRE>
<P>
If you're getting this error from a here-document, you may have included unseen whitespace before or after your closing tag.
<FONT SIZE=-1>A</FONT> good programmer's editor will have a way to help you find these characters.
<P><DT><STRONG>Can't fork</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT>
<FONT SIZE=-1>A</FONT> fatal error occurred while trying to fork while opening a pipeline.
<P><DT><STRONG>Can't get filespec - stale stat buffer?</STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT>
<FONT SIZE=-1>A</FONT> warning peculiar to
<FONT SIZE=-1>VMS.</FONT> This arises because of the difference between access checks under
<FONT SIZE=-1>VMS</FONT> and under the Unix model Perl assumes. Under
<FONT SIZE=-1>VMS,</FONT> access checks are done by filename, rather than by bits in the stat buffer, so that ACLs and other protections can be taken into account. Unfortunately, Perl assumes that the stat buffer contains all the necessary information, and passes it, instead of the filespec, to the access checking routine. It will try to retrieve the filespec using the device name and
<FONT SIZE=-1>FID</FONT> present in the stat buffer, but this works only if you haven't made a subsequent call to the
<FONT SIZE=-1>CRTL</FONT>
<CODE>stat()</CODE> routine, because the device name is overwritten with each call. If this warning appears, the name lookup failed, and the access checking routine gave up and returned
<FONT SIZE=-1>FALSE,</FONT> just to be conservative. (Note: The access checking routine knows about the Perl
[perlfunc:stat|stat] operator and file tests, so you shouldn't ever see this warning in response
to a Perl command; it arises only if some internal code takes stat buffers
lightly.)
<P><DT><STRONG>Can't get pipe mailbox device name</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> An error peculiar to
<FONT SIZE=-1>VMS.</FONT> After creating a mailbox to act as a pipe, Perl can't retrieve its name for later use.
<P><DT><STRONG>Can't get SYSGEN parameter value for MAXBUF</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> An error peculiar to
<FONT SIZE=-1>VMS.</FONT> Perl asked <CODE>$GETSYI</CODE> how big you want your mailbox buffers to be, and didn't get an answer.
<P><DT><STRONG>Can't goto subroutine outside a subroutine</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The deeply magical ``goto subroutine'' call can only replace one subroutine call for another. It can't manufacture one out of whole cloth. In general you should be calling it out of only an
<FONT SIZE=-1>AUTOLOAD</FONT> routine anyway. See
[perlfunc:goto|goto].
<P><DT><STRONG>Can't goto subroutine from an eval-string</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The ``goto subroutine'' call can't be used to jump out of an eval ``string''. (You can use it to jump out of an eval
<FONT SIZE=-1>{BLOCK},</FONT> but you probably don't want to.)
<P><DT><STRONG>Can't localize through a reference</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You said something like <CODE>local $$ref</CODE>, which Perl can't currently handle, because when it goes to restore the old value of whatever [perlfunc:ref] pointed to after the scope of the
<CODE>local()</CODE> is finished, it can't be sure that [perlfunc:ref] will still be a reference.
<P><DT><STRONG>Can't localize lexical variable %s</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You used local on a variable name that was
previously declared as a lexical variable using ``my''. This is not
allowed. If you want to localize a package variable of the same name,
qualify it with the package name.
<P><DT><STRONG>Can't localize pseudo-hash element</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You said something like <CODE>local $ar->{'key'}</CODE>, where <CODE>$ar</CODE> is a reference to a pseudo-hash. That hasn't been
implemented yet, but you can get a similar effect by localizing the
corresponding array element directly -- <CODE>local $ar->[$ar->[0]{'key'}]</CODE>.
<P><DT><STRONG>Can't locate auto/%s.al in @INC</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT>
<FONT SIZE=-1>A</FONT> function (or method) was called in a package which allows autoload, but there is no function to autoload. Most probable causes are a misprint in a function/method name or a failure to
<CODE>AutoSplit</CODE> the file, say, by doing <CODE>make install</CODE>.
<P><DT><STRONG>Can't locate %s in @INC</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You said to do (or require, or use) a file that couldn't be found in any of the libraries mentioned in
<FONT SIZE=-1>@INC.</FONT> Perhaps you need to set the
<FONT SIZE=-1>PERL5LIB</FONT> or
<FONT SIZE=-1>PERL5OPT</FONT> environment variable to say where the extra library is, or maybe the script needs to add the library name to
<FONT SIZE=-1>@INC.</FONT> Or maybe you just misspelled the name of the file. See
[perlfunc:require|require].
<P><DT><STRONG>Can't locate object method "%s" via package "%s"</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You called a method correctly, and it correctly
indicated a package functioning as a class, but that package doesn't define
that particular method, nor does any of its base classes. See [perlman:perlobj|the perlobj manpage].
<P><DT><STRONG>Can't locate package %s for @%s::ISA</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> The <CODE>@ISA</CODE> array contained the name of
another package that doesn't seem to exist.
<P><DT><STRONG>Can't make list assignment to \%ENV on this system</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> List assignment to <CODE>%ENV</CODE> is not supported on some systems, notably
<FONT SIZE=-1>VMS.</FONT>
<P><DT><STRONG>Can't modify %s in %s</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You aren't allowed to assign to the item
indicated, or otherwise try to change it, such as with an auto-increment.
<P><DT><STRONG>Can't modify nonexistent substring</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> The internal routine that does assignment to a
<CODE>substr()</CODE> was handed a
<FONT SIZE=-1>NULL.</FONT>
<P><DT><STRONG>Can't msgrcv to read-only var</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The target of a msgrcv must be modifiable to be
used as a receive buffer.
<P><DT><STRONG>Can't open %s: %s</STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT> The implicit opening of a file through use of the <CODE><></CODE>
filehandle, either implicitly under the <CODE>-n</CODE> or <CODE>-p</CODE> command-line switches, or explicitly, failed for the indicated reason.
Usually this is because you don't have read permission for a file which you
named on the command line.
<P><DT><STRONG>Can't open bidirectional pipe</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You tried to say [perlfunc:open|open(CMD, "|cmd|")], which is not supported. You can try any of several modules in the Perl
library to do this, such as IPC::Open2. Alternately, direct the pipe's
output to a file using ``>'', and then read it in under a different
file handle.
<P><DT><STRONG>Can't open error file %s as stderr</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> An error peculiar to
<FONT SIZE=-1>VMS.</FONT> Perl does its own command line redirection, and couldn't open the file specified after '2>' or '2>>' on the command line for writing.
<P><DT><STRONG>Can't open input file %s as stdin</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> An error peculiar to
<FONT SIZE=-1>VMS.</FONT> Perl does its own command line redirection, and couldn't open the file specified after '<' on the command line for reading.
<P><DT><STRONG>Can't open output file %s as stdout</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> An error peculiar to
<FONT SIZE=-1>VMS.</FONT> Perl does its own command line redirection, and couldn't open the file specified after '>' or '>>' on the command line for writing.
<P><DT><STRONG>Can't open output pipe (name: %s)</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> An error peculiar to
<FONT SIZE=-1>VMS.</FONT> Perl does its own command line redirection, and couldn't open the pipe into which to send data destined for stdout.
<P><DT><STRONG>Can't open perl script "%s": %s</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The script you specified can't be opened for the
indicated reason.
<P><DT><STRONG>Can't redefine active sort subroutine %s</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Perl optimizes the internal handling of sort
subroutines and keeps pointers into them. You tried to redefine one such
sort subroutine when it was currently active, which is not allowed. If you
really want to do this, you should write <CODE>sort { &func } @x</CODE> instead of <CODE>sort func @x</CODE>.
<P><DT><STRONG>Can't rename %s to %s: %s, skipping file</STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT> The rename done by the <STRONG>-i</STRONG> switch failed for some reason, probably because you don't have write
permission to the directory.
<P><DT><STRONG>Can't reopen input pipe (name: %s) in binary mode</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> An error peculiar to
<FONT SIZE=-1>VMS.</FONT> Perl thought stdin was a pipe, and tried to reopen it to accept binary data. Alas, it failed.
<P><DT><STRONG>Can't reswap uid and euid</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> The
<CODE>setreuid()</CODE> call failed for some reason in the setuid emulator of suidperl.
<P><DT><STRONG>Can't return outside a subroutine</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The return statement was executed in mainline
code, that is, where there was no subroutine call to return out of. See [perlman:perlsub|the perlsub manpage].
<P><DT><STRONG>Can't stat script "%s"</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> For some reason you can't
<CODE>fstat()</CODE> the script even though you have it open already. Bizarre.
<P><DT><STRONG>Can't swap uid and euid</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> The
<CODE>setreuid()</CODE> call failed for some reason in the setuid emulator of suidperl.
<P><DT><STRONG>Can't take log of %g</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> For ordinary real numbers, you can't take the
logarithm of a negative number or zero. There's a Math::Complex package
that comes standard with Perl, though, if you really want to do that for
the negative numbers.
<P><DT><STRONG>Can't take sqrt of %g</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> For ordinary real numbers, you can't take the
square root of a negative number. There's a Math::Complex package that
comes standard with Perl, though, if you really want to do that.
<P><DT><STRONG>Can't undef active subroutine</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You can't undefine a routine that's currently
running. You can, however, redefine it while it's running, and you can even
undef the redefined subroutine while the old routine is running. Go figure.
<P><DT><STRONG>Can't unshift</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You tried to unshift an ``unreal'' array that
can't be unshifted, such as the main Perl stack.
<P><DT><STRONG>Can't upgrade that kind of scalar</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> The internal sv_upgrade routine adds ``members'' to an
<FONT SIZE=-1>SV,</FONT> making it into a more specialized kind of
<FONT SIZE=-1>SV.</FONT> The top several
<FONT SIZE=-1>SV</FONT> types are so specialized, however, that they cannot be interconverted. This message indicates that such a conversion was attempted.
<P><DT><STRONG>Can't upgrade to undef</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> The undefined
<FONT SIZE=-1>SV</FONT> is the bottom of the totem pole, in the scheme of upgradability. Upgrading to undef indicates an error in the code calling sv_upgrade.
<P><DT><STRONG>Can't use %%! because Errno.pm is not available</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The first time the %! hash is used, perl
automatically loads the Errno.pm module. The Errno module is expected to
tie the %! hash to provide symbolic names for <CODE>$!</CODE> errno values.
<P><DT><STRONG>Can't use "my %s" in sort comparison</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The global variables <CODE>$a</CODE> and
<CODE>$b</CODE> are reserved for sort comparisons. You mentioned
<CODE>$a</CODE> or <CODE>$b</CODE> in the same line as the <=> or
cmp operator, and the variable had earlier been declared as a lexical
variable. Either qualify the sort variable with the package name, or rename
the lexical variable.
<P><DT><STRONG>Can't use %s for loop variable</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Only a simple scalar variable may be used as a
loop variable on a foreach.
<P><DT><STRONG>Can't use %s ref as %s ref</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You've mixed up your reference types. You have to dereference a reference of the type needed. You can use the
<CODE>ref()</CODE> function to test the type of the reference, if need be.
<P><DT><STRONG>Can't use \1 to mean $1 in expression</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> In an ordinary expression, backslash is a unary operator that creates a reference to its argument. The use of backslash to indicate a backreference to a matched substring is valid only as part of a regular expression pattern. Trying to do this in ordinary Perl code produces a value that prints out looking like
<CODE>SCALAR(0xdecaf).</CODE> Use the <CODE>$1</CODE> form instead.
<P><DT><STRONG>Can't use bareword ("%s") as %s ref while \"strict refs\" in use</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Only hard references are allowed by ``strict
refs''. Symbolic references are disallowed. See [perlman:perlref|the perlref manpage].
<P><DT><STRONG>Can't use string ("%s") as %s ref while "strict refs" in use</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Only hard references are allowed by ``strict
refs''. Symbolic references are disallowed. See [perlman:perlref|the perlref manpage].
<P><DT><STRONG>Can't use an undefined value as %s reference</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT>
<FONT SIZE=-1>A</FONT> value used as either a hard reference or a symbolic reference must be a defined value. This helps to delurk some insidious errors.
<P><DT><STRONG>Can't use global %s in "my"</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You tried to declare a magical variable as a
lexical variable. This is not allowed, because the magic can be tied to
only one location (namely the global variable) and it would be incredibly
confusing to have variables in your program that looked like magical
variables but weren't.
<P><DT><STRONG>Can't use subscript on %s</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The compiler tried to interpret a bracketed
expression as a subscript. But to the left of the brackets was an
expression that didn't look like an array reference, or anything else
subscriptable.
<P><DT><STRONG>Can't x= to read-only value</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You tried to repeat a constant value (often the
undefined value) with an assignment operator, which implies modifying the
value itself. Perhaps you need to copy the value to a temporary, and repeat
that.
<P><DT><STRONG><A NAME="item_Cannot">Cannot find an opnumber for "%s"</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT>
<FONT SIZE=-1>A</FONT> string of a form <CODE>CORE::word</CODE> was given to
<CODE>prototype(),</CODE> but there is
no builtin with the name <CODE>word</CODE>.
<P><DT><STRONG>Cannot resolve method `%s' overloading `%s' in package `%s'</STRONG><P>
<DD>
<FONT SIZE=-1>(F|P)</FONT> Error resolving overloading specified by a
method name (as opposed to a subroutine reference): no such method callable
via the package. If method name is <CODE>???</CODE>, this is an internal error.
<P><DT><STRONG><A NAME="item_Character">Character class syntax [. .] is reserved for future extensions</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> Within regular expression character classes ([])
the syntax beginning with ``[.'' and ending with ``.]'' is reserved for
future extensions. If you need to represent those character sequences
inside a regular expression character class, just quote the square brackets
with the backslash: ``\[.'' and ``.\]''.
<P><DT><STRONG>Character class syntax [: :] is reserved for future extensions</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> Within regular expression character classes ([])
the syntax beginning with ``[:'' and ending with ``:]'' is reserved for
future extensions. If you need to represent those character sequences
inside a regular expression character class, just quote the square brackets
with the backslash: ``\[:'' and ``:\]''.
<P><DT><STRONG>Character class syntax [= =] is reserved for future extensions</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> Within regular expression character classes ([])
the syntax beginning with ``[='' and ending with ``=]'' is reserved for
future extensions. If you need to represent those character sequences
inside a regular expression character class, just quote the square brackets
with the backslash: ``\[='' and ``=\]''.
<P><DT><STRONG><A NAME="item_chmod">chmod: mode argument is missing initial 0</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT>
<FONT SIZE=-1>A</FONT> novice will sometimes say
<P>
<PRE> chmod 777, $filename
</PRE>
<P>
not realizing that 777 will be interpreted as a decimal number, equivalent to 01411. Octal constants are introduced with a leading 0 in Perl, as in
<FONT SIZE=-1>C.</FONT>
<P><DT><STRONG><A NAME="item_Close">Close on unopened file lt%sgt</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You tried to close a filehandle that was never
opened.
<P><DT><STRONG><A NAME="item_Compilation">Compilation failed in require</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Perl could not compile a file specified in a [perlfunc:require|require] statement. Perl uses this generic message when none of the errors that it
encountered were severe enough to halt compilation immediately.
<P><DT><STRONG><A NAME="item_Complex">Complex regular subexpression recursion limit (%d) exceeded</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> The regular expression engine uses recursion in
complex situations where back-tracking is required. Recursion depth is
limited to 32766, or perhaps less in architectures where the stack cannot
grow arbitrarily. (``Simple'' and ``medium'' situations are handled without
recursion and are not subject to a limit.) Try shortening the string under
examination; looping in Perl code (e.g. with <CODE>while</CODE>) rather than in the regular expression engine; or rewriting the regular
expression so that it is simpler or backtracks less. (See [perlman:perlbook|the perlbook manpage]
for information on <EM>Mastering Regular Expressions</EM>.)
<P><DT><STRONG><A NAME="item_connect">connect() on closed fd</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You tried to do a connect on a closed socket. Did you forget to check the return value of your
<CODE>socket()</CODE> call? See
[perlfunc:connect|connect].
<P><DT><STRONG><A NAME="item_Constant">Constant subroutine %s redefined</A></STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT> You redefined a subroutine which had previously
been eligible for inlining. See [perlman:perlsub] for commentary and workarounds.
<P><DT><STRONG>Constant subroutine %s undefined</STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT> You undefined a subroutine which had previously
been eligible for inlining. See [perlman:perlsub] for commentary and workarounds.
<P><DT><STRONG><A NAME="item_Copy">Copy method did not return a reference</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The method which overloads ``='' is buggy. See <U>Copy Constructor</U>.
<P><DT><STRONG><A NAME="item_Corrupt">Corrupt malloc ptr 0x%lx at 0x%lx</A></STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> The malloc package that comes with Perl had an
internal failure.
<P><DT><STRONG><A NAME="item_corrupted">corrupted regexp pointers</A></STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> The regular expression engine got confused by what
the regular expression compiler gave it.
<P><DT><STRONG>corrupted regexp program</STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> The regular expression engine got passed a regexp
program without a valid magic number.
<P><DT><STRONG><A NAME="item_Deep">Deep recursion on subroutine "%s"</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> This subroutine has called itself (directly or
indirectly) 100 times more than it has returned. This probably indicates an
infinite recursion, unless you're writing strange benchmark programs, in
which case it indicates something else.
<P><DT><STRONG><A NAME="item_Delimiter">Delimiter for here document is too long</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> In a here document construct like <CODE><<FOO</CODE>, the label
<CODE>FOO</CODE> is too long for Perl to handle. You have to be seriously twisted to write
code that triggers this error.
<P><DT><STRONG><A NAME="item_Did">Did you mean &%s instead?</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You probably referred to an imported subroutine
<CODE>&FOO</CODE> as <CODE>$FOO</CODE> or some such.
<P><DT><STRONG>Did you mean $ or @ instead of %?</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You probably said %hash{$key} when you meant
$hash{$key} or @hash{@keys}. On the other hand, maybe you just meant
<CODE>%hash</CODE> and got carried away.
<P><DT><STRONG><A NAME="item_Died">Died</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You passed
<CODE>die()</CODE> an empty string (the equivalent of
[perlfunc:die]) or you called it with no args and both <CODE>$@</CODE> and <CODE>$_</CODE> were empty.
<P><DT><STRONG><A NAME="item_Do">Do you need to predeclare %s?</A></STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT> This is an educated guess made in conjunction with the message ``%s found where operator expected''. It often means a subroutine or module name is being referenced that hasn't been declared yet. This may be because of ordering problems in your file, or because of a missing ``sub'', ``package'', ``require'', or ``use'' statement. If you're referencing something that isn't defined yet, you don't actually have to define the subroutine or package before the current location. You can use an empty ``sub foo;'' or ``package
<FONT SIZE=-1>FOO;''</FONT> to enter a ``forward'' declaration.
<P><DT><STRONG><A NAME="item_Don">Don't know how to handle magic of type '%s'</A></STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> The internal handling of magical variables has
been cursed.
<P><DT><STRONG><A NAME="item_do_study">do_study: out of memory</A></STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> This should have been caught by
<CODE>safemalloc()</CODE> instead.
<P><DT><STRONG><A NAME="item_Duplicate">Duplicate free() ignored</A></STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT> An internal routine called
<CODE>free()</CODE> on something that had already been freed.
<P><DT><STRONG><A NAME="item_elseif">elseif should be elsif</A></STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT> There is no keyword ``elseif'' in Perl because
Larry thinks it's ugly. Your code will be interpreted as an attempt to call
a method named ``elseif'' for the class returned by the following block.
This is unlikely to be what you want.
<P><DT><STRONG><A NAME="item_END">END failed--cleanup aborted</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> An untrapped exception was raised while executing an
<FONT SIZE=-1>END</FONT> subroutine. The interpreter is immediately exited.
<P><DT><STRONG><A NAME="item_Error">Error converting file specification %s</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> An error peculiar to
<FONT SIZE=-1>VMS.</FONT> Because Perl may have to deal with file specifications in either
<FONT SIZE=-1>VMS</FONT> or Unix syntax, it converts them to a single form when it must operate on them directly. Either you've passed an invalid file specification to Perl, or you've found a case the conversion routines don't handle. Drat.
<P><DT><STRONG>%s: Eval-group in insecure regular expression</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Perl detected tainted data when trying to compile
a regular expression that contains the <CODE>(?{ ... })</CODE> zero-width assertion, which is unsafe. See [perlman:perlre], and [perlman:perlsec|the perlsec manpage].
<P><DT><STRONG>%s: Eval-group not allowed, use re 'eval'</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT>
<FONT SIZE=-1>A</FONT> regular expression contained the
<CODE>(?{ ... })</CODE> zero-width assertion, but that construct is only allowed when the <CODE>use re 'eval'</CODE> pragma is in effect. See [perlman:perlre].
<P><DT><STRONG>%s: Eval-group not allowed at run time</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Perl tried to compile a regular expression
containing the <CODE>(?{ ... })</CODE>
zero-width assertion at run time, as it would when the pattern contains interpolated values. Since that is a security risk, it is not allowed. If you insist, you may still do this by explicitly building the pattern from an interpolated string at run time and using that in an
<CODE>eval().</CODE> See
[perlman:perlre].
<P><DT><STRONG><A NAME="item_Excessively">Excessively long <> operator</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The contents of a <> operator may not exceed the maximum size of a Perl identifier. If you're just trying to glob a long list of filenames, try using the
<CODE>glob()</CODE> operator, or put the filenames into a variable and glob that.
<P><DT><STRONG><A NAME="item_Execution">Execution of %s aborted due to compilation errors</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The final summary message when a Perl compilation
fails.
<P><DT><STRONG><A NAME="item_Exiting">Exiting eval via %s</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You are exiting an eval by unconventional means,
such as a goto, or a loop control statement.
<P><DT><STRONG>Exiting pseudo-block via %s</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You are exiting a rather special block construct
(like a sort block or subroutine) by unconventional means, such as a goto,
or a loop control statement. See [perlfunc:sort|sort].
<P><DT><STRONG>Exiting subroutine via %s</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You are exiting a subroutine by unconventional
means, such as a goto, or a loop control statement.
<P><DT><STRONG>Exiting substitution via %s</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You are exiting a substitution by unconventional
means, such as a return, a goto, or a loop control statement.
<P><DT><STRONG><A NAME="item_Explicit">Explicit blessing to '' (assuming package main)</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You are blessing a reference to a zero length string. This has the effect of blessing the reference into the package main. This is usually not what you want. Consider providing a default target package, e.g.
<CODE>bless($ref,</CODE> <CODE>$p</CODE> or 'MyPackage');
<P><DT><STRONG><A NAME="item_Fatal">Fatal VMS error at %s, line %d</A></STRONG><P>
<DD>
<FONT SIZE=-1>(P)</FONT> An error peculiar to
<FONT SIZE=-1>VMS.</FONT> Something untoward happened in a
<FONT SIZE=-1>VMS</FONT> system service or
<FONT SIZE=-1>RTL</FONT> routine; Perl's exit status should provide more details. The filename in ``at %s'' and the line number in ``line %d'' tell you which section of the Perl source code is distressed.
<P><DT><STRONG><A NAME="item_fcntl">fcntl is not implemented</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Your machine apparently doesn't implement
<CODE>fcntl().</CODE> What is this, a
<FONT SIZE=-1>PDP-11</FONT> or something?
<P><DT><STRONG><A NAME="item_Filehandle">Filehandle %s never opened</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> An
<FONT SIZE=-1>I/O</FONT> operation was attempted on a filehandle that was never initialized. You need to do an
<CODE>open()</CODE> or a
<CODE>socket()</CODE> call, or call a constructor from the FileHandle package.
<P><DT><STRONG>Filehandle %s opened for only input</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You tried to write on a read-only filehandle. If
you intended it to be a read-write filehandle, you needed to open it with
``+<'' or ``+>'' or ``+>>'' instead of with ``<'' or
nothing. If you intended only to write the file, use ``>'' or
``>>''. See
[perlfunc:open|open].
<P><DT><STRONG>Filehandle opened for only input</STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You tried to write on a read-only filehandle. If
you intended it to be a read-write filehandle, you needed to open it with
``+<'' or ``+>'' or ``+>>'' instead of with ``<'' or
nothing. If you intended only to write the file, use ``>'' or
``>>''. See
[perlfunc:open|open].
<P><DT><STRONG><A NAME="item_Final">Final $ should be \$ or $name</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You must now decide whether the final $ in a
string was meant to be a literal dollar sign, or was meant to introduce a
variable name that happens to be missing. So you have to put either the
backslash or the name.
<P><DT><STRONG>Final @ should be \@ or @name</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You must now decide whether the final @ in a
string was meant to be a literal ``at'' sign, or was meant to introduce a
variable name that happens to be missing. So you have to put either the
backslash or the name.
<P><DT><STRONG><A NAME="item_Format">Format %s redefined</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You redefined a format. To suppress this warning,
say
<P>
<PRE> {
local $^W = 0;
eval "format NAME =...";
}
</PRE>
<DT><STRONG>Format not terminated</STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT>
<FONT SIZE=-1>A</FONT> format must be terminated by a line with a solitary dot. Perl got to the end of your file without finding such a line.
<P><DT><STRONG><A NAME="item_Found">Found = in conditional, should be ==</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You said
<P>
<PRE> if ($foo = 123)
</PRE>
<P>
when you meant
<P>
<PRE> if ($foo == 123)
</PRE>
<P>
(or something like that).
<P><DT><STRONG><A NAME="item_gdbm">gdbm store returned %d, errno %d, key "%s"</A></STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT>
<FONT SIZE=-1>A</FONT> warning from the GDBM_File extension that a store failed.
<P><DT><STRONG><A NAME="item_gethostent">gethostent not implemented</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Your
<FONT SIZE=-1>C</FONT> library apparently doesn't implement
<CODE>gethostent(),</CODE> probably because if it did, it'd feel morally obligated to return every hostname on the Internet.
<P><DT><STRONG><A NAME="item_get">get{sock,peer}name() on closed fd</A></STRONG><P>
<DD>
<FONT SIZE=-1>(W)</FONT> You tried to get a socket or peer socket name on a closed socket. Did you forget to check the return value of your
<CODE>socket()</CODE> call?
<P><DT><STRONG><A NAME="item_getpwnam">getpwnam returned invalid UIC %#o for user "%s"</A></STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT>
<FONT SIZE=-1>A</FONT> warning peculiar to
<FONT SIZE=-1>VMS.</FONT> The call to
<CODE>sys$getuai</CODE> underlying the
[perlfunc:getpwnam|getpwnam] operator returned an invalid
<FONT SIZE=-1>UIC.</FONT>
<P><DT><STRONG><A NAME="item_Glob">Glob not terminated</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> The lexer saw a left angle bracket in a place
where it was expecting a term, so it's looking for the corresponding right
angle bracket, and not finding it. Chances are you left some needed
parentheses out earlier in the line, and you really meant a ``less than''.
<P><DT><STRONG><A NAME="item_Global">Global symbol "%s" requires explicit package name</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> You've said ``use strict vars'', which indicates
that all variables must either be lexically scoped (using ``my''), or
explicitly qualified to say which package the global variable is in (using
``::'').
<P><DT><STRONG><A NAME="item_goto">goto must have label</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Unlike with ``next'' or ``last'', you're not
allowed to goto an unspecified destination. See [perlfunc:goto|goto].
<P><DT><STRONG><A NAME="item_Had">Had to create %s unexpectedly</A></STRONG><P>
<DD>
<FONT SIZE=-1>(S)</FONT>
<FONT SIZE=-1>A</FONT> routine asked for a symbol from a symbol table that ought to have existed already, but for some reason it didn't, and had to be created on an emergency basis to prevent a core dump.
<P><DT><STRONG><A NAME="item_Hash">Hash %%s missing the % in argument %d of %s()</A></STRONG><P>
<DD>
<FONT SIZE=-1>(D)</FONT> Really old Perl let you omit the % on hash names
in some spots. This is now heavily deprecated.
<P><DT><STRONG><A NAME="item_Identifier">Identifier too long</A></STRONG><P>
<DD>
<FONT SIZE=-1>(F)</FONT> Perl limits identifiers (names for variables,
functions, etc.) to about 250 characters for simple names, and somewhat
more for compound names (like <CODE>$A::B</CODE>). You've exceeded Perl's limits. Future versions of Perl are likely to
eliminate these arbitrary limitations.
<DD>
</DL>
<BR>
[perlman:perldiag2|More...]<BR>
<BR>Return to the [Library]<BR>