I'm working on a script that opens all files passed in on the command line. Then it'll save a copy with a ".bak" extension and modify the file to add a copyright at the end. Here's what I have so far:
chomp(my @lines = <>); foreach $line(@lines){ print $line."\n"; } print "\n"; print "##Copyright (C) 2012 by firstName lastName\n";
The code so far will open the files passed thru on the command line (I'm just using a txt file for now), prints the file, and then adds the copyright at the end. I can't find anything on how to save a copy of this as a ".bak". Any help or reference to helpful material is appreciated.
In reply to [SOLVED] copying a file with .bak extension by jaffinito34
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |