in reply to Newbie: uses/limits of perl in editing files
It makes the file look like an array, with one line in each element. Then you modify the array. As you do, the changes appear in the file.
-- Mark Dominus Perl Paraphernalia