print "\nEnter extension of files to look in (example: log or txt):\n\n"; $fileext = ; $fileext = lc($fileext); print "\nConfirmed: $fileext\n\n"; print "\nEnter exact name of player to find and replace:\n\n"; $playertofind = ; print "\nConfirmed: $playertofind\n\n"; print "\nEnter exact name of player to replace $playertofind with:\n\n"; $newplayer = ; print "\nConfirmed: $newplayer\n\n"; @filestocheck = <*.$fileext>; foreach $file (@filestocheck) { open FILE, "$file" or die "\nError: Unable to open file for read..."; @lines = ; close FILE; open FILE, ">$file" or die "\nError: Unable to open file for write..."; foreach $line (@lines) { $line =~ s/$playertofind/$newplayer/g; print FILE $line; } close FILE; }