[oracle@perass back]$ cat a.txt
aaaaa
1
aaaaa
2
aaaaa
3
aaaaa
4
aaaaa
5
aaaaa
11111
[oracle@perass back]$ cat a1.pl
open (A ,"<","a.txt");
while (<A>){
$num++;
if ( $_ =~/aaaaa/ ){ $a=$num};
if ($. == $a + 1){print "$_
"};
}
[oracle@perass back]$ perl a1.pl
1
2
3
4
5
11111