Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 lurking in the Monastery: (9)
As of 2014-10-21 22:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls