On Mon, 14 Feb 2000, Adam Wendt wrote:
> Whats the best way in perl to run an external command and if while
> executing the command I hit ctrl + c it will just cancle the external
> command and continue on with the script instead of bailing out of
> everything?
I'm not quite sure what the problem is here. This script:
#!/usr/bin/perl
system "sleep 5"; # press [CTRL]+[C] here
print "hi mom\n";
does just what you're asking. If I interrupt the "sleep 5" command with
[CTRL]+[C], perl still prints "hi mom".
This is perl, version 5.005_03 built for i386-linux.
--
Ben Scott
[EMAIL PROTECTED]
**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************