in reply to Append to beginning of line (multi line file)
If you want to copy over the old file, just do it at the end.open(INPUTFILE, "$file"); open(OUTPUTFILE, ">$outputfile"); my $counter = 1; while (<INPUTFILE>) { print OUTPUTFILE "$counter. $_"; $counter++; } close(INPUTFILE); close(OUTPUTFILE);
|
|---|