in reply to updating a file
local $^I = '.bak'; local @ARGV = ("$dir/$header_file"); while (<>) { s/foo/bar/; # whatever you want print; }
Presto, magico, all done!
-- Chip Salzenberg, Free-Floating Agent of Chaos
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Use $^I (was Re: updating a file)
by Anonymous Monk on Nov 29, 2001 at 03:15 UTC |