Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Net::MirrorDir help

by Corion (Pope)
on Nov 17, 2011 at 11:03 UTC ( #938590=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Net::MirrorDir help
in thread Net::MirrorDir help

A cursory glance at the module source reveals this gem:

... for my $line (@{$ra_lines}) { @info = split(/\s+/, $line); $name = $info[$#info]; ...

So yes, filenames containing spaces are broken. A potential fix might be

@info = split(/\s+/, $line, 9); # 9 columns in FTP output

... if one could be sure that each FTP server would return 9 columns of output. Another alternative could be to rely on the file date/time as a marker, or to try a fixed width parser for the ftp output, and checking that split /\s+/ always returns the same number of items.


Comment on Re^3: Net::MirrorDir help
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://938590]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (15)
As of 2015-07-06 16:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls