Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
$dst is always an ip address (this is considered a string correct?) and $service is sometimes numeric (ie. 80) and sometimes a string (ie. http). Am I using && correctly? I only want to count the line if these two matches appear in the same line. Should I be testing if $service is a string or number first?foreach (@data){ $count++ if $_ =~ /\b$dst[0]\b/ && /\b$service[0]\b/; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: I'm confused with Bitwise Operators
by dws (Chancellor) on Jun 07, 2002 at 21:11 UTC | |
by mephit (Scribe) on Jun 07, 2002 at 21:51 UTC | |
|
Re: I'm confused with Bitwise Operators
by Zaxo (Archbishop) on Jun 07, 2002 at 20:58 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |