in reply to Re: How to read pcap data from stream not from files.
in thread How to read pcap data from stream not from files.
while ( defined( my $line = <STDIN> ) ) {
Just a quick side note: you don't need the defined here. Perl has some DWIMmery in place for this case, to always act as if the defined was there, even if you don't write it:
$ perl -MO=Deparse -e 'while ( my $line = <STDIN> ) { print $line }' while (defined(my $line = <STDIN>)) { do { print $line }; } -e syntax OK
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to read pcap data from stream not from files.
by afoken (Chancellor) on May 09, 2010 at 05:34 UTC |