## good habit: comments everywhere. In 2 months you won't
## remember anything you wrote before ;-)

## this program should print lines in the file that has the
## substring "pirsupfam" on it

## open file for reading: ARGV[0] is the first parameter on command line


$file = $ARGV[0]; 
$search = $ARGV[1];

open(IN,$file);

## now read file line-by-line
while($line = <IN>){

	## let's deal only with lines that have the 
	## substring "Rattus norvegicus" on it

	if($line =~ "$ARGV[1]"){
		print $line;
	}

}

## everything you open you should close
close(IN);

##the end
