You left out die.
open(CD, ">$cdate") || die "Can't open $cdate: $!";
On 05 Jun 2001 09:23:09 -0600, Gary Luther wrote:
> I have gotten all the warning messages out of my program except these
> two. The program runs fine but this is just an annoyance.
>
> I have looked at the code but not sure I understand what the message is
> really trying to tell me.
>
> MESSAGES:
>
> Useless use of string in void context at /common/bin/whaduname.AA line
> 56.
> Useless use of string in void context at /common/bin/whaduname.AA line
> 60.
>
> The lines and supporting evidence:
>
> 33 $cdate='/common/lib/cdatetest';
>
> 35 $cnum='/common/lib/cnumtest';
>
>
> 56 open(CD, ">$cdate") || "Can't open $cdate: $!";
> 60 open(CN, ">$cnum") || "Can't open $cnum: $!";
>
> What is a useless (wow, now I feel useless :-( ) use of a string in a
> void context? If $cdate were not defined, I think I could see where
> that might be a void context. Sorry, if I am being to dense
> here..................
>
> TIA
>
> --
> ------------------------------------------------------------------------
> -
> "They that can give up essential liberty
> to obtain a little temporary safety
> deserve neither liberty nor safety."
>
> -- Benjamin Franklin
> ------------------------------------------------------------------------
> -
> RRRRR Gary Luther
> RR RR SAF
> RR RR UTABEGAS 2500 Broadway
> RR RR Helena, MT 59602
> RRRR [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> RR RR ULE !!
> RR RR Visit our website at
> RR RR http://www.safmt.org <http://www.safmt.org>
>
--
Today is Sweetmorn, the 10th day of Confusion in the YOLD 3167
Keep the Lasagna flying!