Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2018-03-18 23:13 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (231 votes). Check out past polls.