Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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

by vinoth.ree (Monsignor)
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; }

Replies are listed 'Best First'.
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 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 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015143]
Jar. Jar!...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2018-06-24 01:41 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.