CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced: Re: [cuboidgraphix] FTP to multiple directories and finding specific files.: Edit Log



FishMonger
Veteran / Moderator

Dec 30, 2008, 9:59 AM


Views: 5318
Re: [cuboidgraphix] FTP to multiple directories and finding specific files.

The problem is coming from this line:
my @file = grep { /^([^.].*)?$Yday/ } $ftp->ls();

The ls command needs to be in ascii mode. Do the setting of binary mode after that line. And since you're executing the ls command in each dir, you'll need to set it to ascii prior to calling $ftp>ls


Code
$ftp->ascii; 
my @file = grep { /^([^.].*)?$Yday/ } $ftp->ls();
$ftp->binary;



(This post was edited by FishMonger on Dec 30, 2008, 10:02 AM)


Edit Log:
Post edited by FishMonger (Veteran) on Dec 30, 2008, 10:02 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives