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

Re: Bash vs Perl. Why doesn't work...?

by vinoth.ree (Prior)
on Jan 24, 2013 at 10:36 UTC ( #1015143=note: print w/ replies, xml ) Need Help??


in reply to Bash vs Perl. Why doesn't work...?

Are you getting any error message ? check the exist status of the system command

If you'd like to manually inspect system's failure, you can check all possible failure modes by inspecting $? like this:

if ($? == -1) { print "failed to execute: $!\n"; } elsif ($? & 127) { printf "child died with signal %d, %s coredump\n", ($? & 127), ($? & 128) ? 'with' : 'without'; } else { printf "child exited with value %d\n", $? >> 8; }


Comment on Re: Bash vs Perl. Why doesn't work...?
Download Code
Re^2: Bash vs Perl. Why doesn't work...?
by ali_kerem (Acolyte) on Jan 24, 2013 at 10:56 UTC

    I dont get any error message normally but after your code, I got this output

    Connecting to 10.10.110.222... sftp> put adp2.bat Uploading adp2.bat to /adp2.bat adp2.bat + 100% + 57 0.1KB/s 00:00 sftp> put wavSound/test.wav wavSound/test.wav Uploading wavSound/test.wav to /wavSound/test.wav wavSound/test.wav + 100% + 771KB 771.1KB/s 00:00 child exited with value 0 child exited with value 255 Connecting to 10.10.110.222... sftp> cd wavSound sftp> rm test.wav Removing /wavSound/test.wav sftp> cd ../adpSound sftp> get channel52-title24.adp Couldn't stat remote file: No such file or directory File "/adpSound/channel52-title24.adp" not found. child exited with value 0

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2015-07-05 15:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls