Harry Putnam wrote:
> 
> I'm not used to writing perl scripts on windows.  I'm having a
> problem where a system call dies but still performs the command.
> I don't think I understand how exit status is checked.

Did you read the documentation for system()?

perldoc -f system


system() returns 0 (FALSE) when it SUCCEEDS and non-zero when it FAILS.


> my $target = "E:/some_dir/another_dir";
> system("mkdir  $target") or die "Can't mkdir $target: $!";

Why not use perl's built-in mkdir() function?

mkdir $target or die "Can't mkdir $target: $!";


perldoc -f mkdir


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to