On Tue, Jul 02, 2002 at 08:50:02AM -0400, Hapworth, Adam wrote:
> 
> I found that were were previously set but I set them in the script according
> to the DBD::Oracle docs.  Here is a trimed down script and then the output I
> am receiving.
> NOTE: I receive a "No such file or directory" for :0 and :1 if I do not
> include the "use Data::Dumper;" line.  I am still not sure why.

`perldoc perlvar`

       $!      If used in a numeric context, yields the current
               value of errno, with all the usual caveats.  (This
               means that you shouldn't depend on the value of $!
               to be anything in particular unless you've gotten
               a specific error return indicating a system
               error.)  If used in a string context, yields the
               corresponding system error string.

Note the parenthetical.

> 
> #!/usr/bin/perl5 -w
> print $?."0\n";
> print $!.":0\n";
> 
> [snip code containing further invalid uses of $!]

Don't print $! unless you've actually gotten a system error, such as from
open().

Ronald

Reply via email to