#!/usr/bin/perl -w # the goal of this script is to change test in line 1 of files to test 1.0 my $txtfile; #while (<*.TXT>){ foreach $txtfile (glob("*.TXT")) { print $txtfile; print "\n"; open FILE, "$txtfile"; open NEWFILE, ">$txtfile.tmp"; while (){  if ($. == 1){   $_ =~ s/$_/$_ 1.0/g;   }  print NEWFILE $_; } close FILE; close NEWFILE; }