in reply to How to end "do" with Ctrl-C
You need to trap the INT signal.
our $stopit = 0; $SIG{INT} = sub { $stopit++; }; while (!$stopit) { system("netstat -an | grep $line"); sleep 10; }
90% of every Perl application is already written. ⇒ |
dragonchild |
In Section
Seekers of Perl Wisdom