Disregard I had an extra space after the glob $file part once I made it (glob $file) instead of (glob $file ) it worked. Odd very odd. --- Quenten Griffith <[EMAIL PROTECTED]> wrote: > Hello all, > > For somereason I have a bit of code that will not > write out to the log file when it finds my array > empty > > > #Start of upload Files > } elsif ( $ARGV[1] eq "-p" ) { > $log->write("<INFO> Ok we have been passed the > -p so we will be putting files to $site"); > my $ftp = Net::FTP->new("$site") or > $log->write("<ERROR> Could not est. connection to > $site: [EMAIL PROTECTED]"); #makes the connection the site or > logs > $ftp->login("$user","$password") or > $log->write > ("<ERROR> Bad user name or password"); > $ftp->cwd("$dir") or $log->write( "<ERROR> > could > not cd to $dir" ); > chdir ("/ftp/pathlor/outgoing") or die > "could not cd"; #where we get the files from to send > my @mput_files = (glob "$file" ); > print "@mput_files"; > if ([EMAIL PROTECTED]) { $log->write("<ERROR> $file > not > found for upload"); > } > foreach my $put_files ( @mput_files ) { > $ftp->put("$put_files"); > $log->write("<INFO> U/L $put_files") > } > } > } > } > > > Right here is where it should log > my @mput_files = (glob "$file" ); > print "@mput_files"; > if ([EMAIL PROTECTED]) { $log->write("<ERROR> $file not > found for upload"); > } > > I added the print function just to see what > @mput_files returns and it returns nothing but I do > get an error from the glob on the command line > "Cannot open Local file : A file or directory in the > path name does not exist" I am wondering if this is > some how messing up my check. Basically what I am > doing is looking at a dir. of files and looking for > files that match my $file variable which usually is > $file = *.txt I am trying to find a way to use wild > card charcters to find the files I want in a dir and > upload them to a ftp server. Thanks for your help. > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > http://sitebuilder.yahoo.com > > -- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] >
__________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]