Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^5: File transfer not working on server

by izut (Chaplain)
on Aug 22, 2006 at 10:41 UTC ( [id://568800]=note: print w/replies, xml ) Need Help??


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

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.

Replies are listed 'Best First'.
Re^6: File transfer not working on server
by Jenda (Abbot) on Aug 22, 2006 at 17:05 UTC

    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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://568800]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-19 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found