in reply to Re^2: String related question
in thread String related question

That is a reasonable attempt.

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"; } }

Replies are listed 'Best First'.
Re^4: String related question
by vikuuu (Novice) on Feb 02, 2011 at 14:12 UTC
    Hi Thanks for correcting my code: Can you suggest me some links on net which , which step by step helps to learn Perl , any sort of good tutorial.