Untested, but I think I got it right. Save the small stuff, not the big stuff.open (IN, "<grep"); my %lines; while (<IN>){ $lines{$_} = 1; } close IN; open (OUT, ">gout"); # assumes input data comes from stdin while (<>){ print OUT $_ if exists $lines{$.}; } close OUT;
In reply to Re: printing specific lines
by traveler
in thread printing specific lines
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |