I have a file called "filehandle". It contains: invoice1 invoice2 invoice3 ...
In D:\trandev\ I also have these files : invoice1 invoice2 invoice3 ... So when I read "filehandle", for each invoice that I get I want to execute a batch file that will process a corresponding invoice in D:\trandev BUT then the following code always executes only the last file. Would you please help. my $invoice = "invoice.in"; $Idoc = "Idoc" ; open (IN,"filehandle") || die "cannot open filehandle: $!"; while ($name = <IN>) {($name rename $name, "$invoice.in"); $Rc = system('D:/trandev/coredima.bat'); print "$Rc\n" ; } _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs