Listing 2

#!/usr/bin/perl

if (!open(MAP,"/boot/System.map")) {
	print STDERR "Cannot open /boot/System.map";
	exit;
}

@results = <MAP>;
while(<STDIN>) {
	($name,$kerneladdress)  = split(/\s+/);
	@original = grep(/(.*)\s+$name\n/,@results);
	print "$kerneladdress @original"	
}	


