[EMAIL PROTECTED] wrote:
<snippage>
It should be:
system ('time', "$time") and warn "no joy: $?";
where $? is the ever-popular CHILD_ERROR from the OS.
Ah! Thanks for the correction-- I do tend to use $! where $? or $@ is called for.
On the subject of the 'awkwardness' of the construct, I like it. Randal Schwartz made it look Perlish and peculiar on purpose. But it runs like the traditional
whatever_function or die "yadda yadda: $!";
that we're used to. I usually write it more in the form of
system (@sys_args) and die "system @sys_args failed: $?\n";
but I adapted it to the form requested by the OP.
I like your approach; I can see where it would have advantages in some places.
system "time", $time == 0 or die "Bad call 'time $time': $?\n";
Will Woodhull [EMAIL PROTECTED]
_______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs