st_possenti has asked for the wisdom of the Perl Monks concerning the following question:
use strict; my $line; chomp($line = <stdin>); if ($line eq "\n") { print "There was no port number!\n"; } else { do{{ $line; system ("netstat -an | grep $line \n"); system ("sleep 10"); redo; }} }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to end "do" with Ctrl-C
by pfaut (Priest) on Dec 02, 2008 at 22:33 UTC | |
by kennethk (Abbot) on Dec 02, 2008 at 23:03 UTC | |
by ikegami (Patriarch) on Dec 03, 2008 at 00:12 UTC | |
by st_possenti (Monk) on Dec 02, 2008 at 23:13 UTC |