Your error is that you're trying to apply the match to the whole array of lines at once, instead of to each line individually. Try this as a correction to your code:
foreach my $line (@array) { if($line =~/^AD/){ print " $line"; } }
In reply to Re^3: String related question
by bart
in thread String related question
by vikuuu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |