Thanks haukex - swift reply!
What, me, not using strict and warnings? ;-) Have changed 'test.pl' to the following:
use strict; use warnings; print "Hello world!\n"; my $file='test-response.pl'; unless (my $return = do $file) { warn "couldn't parse $file: $@" if $@; warn "couldn't do $file: $!" unless defined $return; warn "couldn't run $file" unless $return; } print "Did that work?\n";
Output is now
Hello world! couldn't do test-response.pl: No such file or directory at test.pl lin +e 10. couldn't run test-response.pl at test.pl line 11. Did that work?
The file 'test-response.pl' is certainly there.... (the files are on my desktop and I'm calling them from a command prompt having changed directory to the desktop, by the way).
In reply to Re^2: 'do' command is dead? Surely not?
by ACI
in thread 'do' command is dead? Surely not?
by ACI
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |