in reply to doing a search and replace on a large file
Any ideas about how I might do this?
Here's one way...
#!/usr/bin/perl -w use Tie::File; use strict; my @ry=(); tie @ry,"Tie::File","mybigfile" or die "mybigfile:$!"; @ry = grep /mypattern/,@ry; untie @ry;
Please note: that was off the top of my head and untested.