Rmck wrote:
>
> Hello,
Hello,
> This code below works. But I am wondering if it can be made more efficient:
>
>while () {
>
> my $sport = (split(/\s/,$_))[8];
> my $sdport = (split(/\s/,$_))[10];
> next if $sport =~ /\D/;
> next if $dport =~ /\D/;
>if ($sport =~ /^(20|21|22|25|53|80|10
On May 13, rmck said:
> while () {
>my $sport = (split(/\s/,$_))[8];
>my $sdport = (split(/\s/,$_))[10];
You have $sdport here, but you USE $dport.
>next if $sport =~ /\D/;
>next if $dport =~ /\D/;
> if ($sport =~ /^(20|21|22|25|53|80|109|110|123|137|161|443)$/ || $dport =~
>
rmck wrote:
Hello,
This code below works. But I am wondering if it can be made more efficient:
while () {
my $sport = (split(/\s/,$_))[8];
my $sdport = (split(/\s/,$_))[10];
next if $sport =~ /\D/;
next if $dport =~ /\D/;
if ($sport =~ /^(20|21|22|25|53|80|109|110|123|137|161|443)$/ || $dp