in reply to IO::Handles ... any good?
my $filename = shift; open(PAGE, $filename) || die "I can't open yourfile.txt";
$filename would become "anyfile.txt" in your example command line.
Update: There are other ways of modifying a file in-place. A Super Search where title contains all of "edit", "file", "in", "place" show some ?node_id=3989;HIT=edit%20file%20in%20place;re=N
If your input file is large, these other methods would save memory by not storing the entire contents at once.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: IO::Handles ... any good?
by blowupp (Novice) on Mar 22, 2009 at 18:41 UTC |