Hi,
first of all I'm using filehandles to create CSV files as per below
if (variable1 == ONETHING){
print OUT1 "$variable1,$variable2,$variable3,$variable4\n";
} elsif(variable1 == ANOTHERTHING){
print OUT2 "$variable1,$variable2,$variable3,$variable4\n"; ##########
ETC. ETC. ETC.
This works fine and the files get a date stamp in their filename captured
in a variable $date - also ok!
The trouble starts when I try to FTP the files to a machine :
my $ftpfile;
foreach $ftpfile (<*$date.txt>) {
print "$ftpfile\n";
$ftp->put($ftpfile);
$ftpcount++;
}
print "\n$ftpcount files have been FTP'ed to Xmachine.\n";
Now I know the ftp works and I know the matching in the foreach loop works
coz I've seperated it from the main program. But it's as if in the main
program that the files aren't completely formed before the FTP is called
and so the date stamp isn't found and the foreach loop never entered.
Any Ideas?
Mark
_____________________________________________
Mark Martin
Computer Centre
National University of Ireland Maynooth
Tel: (01)708 4716/3830
Fax: (01)628 6249