while ( readline $fh ){ if( /shabba/ ){ print "$.:$_\n"; } }