$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/; }
In reply to I'm confused with Bitwise Operators by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |