Re: check my split

2004-05-14 Thread John W. Krahn
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

Re: check my split

2004-05-13 Thread Jeff 'japhy' Pinyan
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 =~ >

Re: check my split

2004-05-13 Thread Wiggins d'Anconia
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