Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: File transfer not working on server

by Anonymous Monk
on Aug 21, 2006 at 22:14 UTC ( #568698=note: print w/replies, xml ) Need Help??


in reply to Re^3: File transfer not working on server
in thread File transfer not working on server

yes i am using strict and warnings. The message I am getting is coming from my condition here:
if(!-d $destinationFile) { print "Destination Directory not found."; }
Saying: Destination Directory not found.

Replies are listed 'Best First'.
Re^5: File transfer not working on server
by izut (Chaplain) on Aug 22, 2006 at 10:41 UTC

    Modify your statement to this:

    unless (-d $destinationFile) { die "Destination directory not found: $!"; }

    It will die and show you why.

    Igor 'izut' Sutton
    your code, your rules.

      I don't think you will. -d doesn't set $! to anything useable. I get "Bad file descriptor" in $! after using -d no matter whether it succeeded or failed. The $^E seems to make more sense "The system cannot find the file specified" when failed, but "Access is denied" when successfull. In either case, nothing that'd help. (I'm using perl v5.8.7 under WinServer 2k3 SP1)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2021-04-22 19:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?