in reply to How to replace strings in a file from a list?
Do I need to create a hash with the 6 names above before I can replace instances of JOE, FRED, and SAM, in a text file?Yes, that is one way to do it. Give it a try.
Also note that you can simplifiy your code a little by eliminating qq around your variables:
my $userlist = $ARGV[0];
|
---|
In Section
Seekers of Perl Wisdom