June 26th, 2002, 12:40 PM
i am trying to get a file but anything with a space in it gives me an error:
$fn = "blah bla";
will say 'Bad file name'
i read that the newer Net::FTP module gets around this, however does anyone have any ideas on how to get around this without installing the new module(also, rename is not an option since i don't have write access)?
June 26th, 2002, 02:59 PM
The problem is probably because Net::FTP just sends "@_" to the server, try this on $fn:
You might find that if you do that, and then a new Net::FTP gets installed, it will then be double-slashed out (which would be bad). You could just check the Net::FTP version before you do that regex there though, to make sure it needs to be done.
$fn =~ s/[^a-z0-9]/\\$1/g;
 replaced $fh with $fn ;p
Last edited by JonLed; June 26th, 2002 at 03:05 PM.
June 26th, 2002, 03:00 PM
Just a guess - but put a %20 and see what happens!
June 26th, 2002, 05:54 PM
I'm pretty sure if you just get rid of the double quotes for single quotes it will work fine
$fn = 'some file';
June 27th, 2002, 10:31 AM
thanks for the replies...none worked however i figured out a way around it by just using a shell script to ftp when a space was encountered