Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://938590]
[marto]: hmm, the site running really slow for anyone else?

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2018-01-16 10:44 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (177 votes). Check out past polls.