Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^3: File transfer not working on server

by izut (Chaplain)
on Aug 21, 2006 at 19:26 UTC ( #568655=note: print w/replies, xml ) Need Help??

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

Are you using use strict; and use warnings;? Again, is Perl throwing some error or warning? Is it dieing? If you provide more information, you will get better answers.

Igor 'izut' Sutton
your code, your rules.

Replies are listed 'Best First'.
Re^4: File transfer not working on server
by Anonymous Monk on Aug 21, 2006 at 22:14 UTC
    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.

      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?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2021-03-02 21:34 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (63 votes). Check out past polls.