Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: use of uninitialised value

by sh1tn (Priest)
on Mar 07, 2005 at 19:08 UTC ( [id://437286]=note: print w/replies, xml ) Need Help??


in reply to use of uninitialised value

IMHO you should check "what's behind" -
-d $upload_dir or die "$upload_dir: $!"; -f $filename or die "$filename: $!"; # if we are here - we have valid directory and file open (UPLOADFILE,"<$upload_dir/$filename") or die $!;


Replies are listed 'Best First'.
Re^2: use of uninitialised value
by ysth (Canon) on Mar 07, 2005 at 23:46 UTC
    That would need to be:
    -d $upload_dir or die "$upload_dir: $!"; -f "$upload_dir/$filename" or die "$upload_dir/$filename: $!";
      Thank you. My error comes from the lack of fully written sample:
      my $filename = "$upload_dir/$filename"; -d $upload_dir or die "$upload_dir: $!"; -f $filename or die "$filename: $!"; # I'm not in the secret why those endless absolute # filepaths are scattered almost always


Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://437286]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-25 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found