Perl Monk, Perl Meditation | |
PerlMonks |
Re: (Kozz) Re: "canned" FTPby rob_au (Abbot) |
on Feb 21, 2002 at 01:15 UTC ( [id://146676]=note: print w/replies, xml ) | Need Help?? |
I think you are spot-on with this suggestion Kozz - The problem here seems to relate more to the specifics of the FTP connection and network translation than the program code itself. I have discussed this aspect of FTP transfer previously in some detail in the node Re: Net::FTP Unexpected EOF. While the node referenced above deals more specifically with the usage of Net::FTP (which I believe would offer a much cleaner and compact solution in this case), PASV behaviour as discussed in the above node can be initiated within a FTP session through the issuing of the command PASV prior to any commands which make use of the ftp-data connection (eg. LIST). Using the code in question as a base ...
Just on a final note, you know that by introducing sysread in the manner that you have, you have also introduced some very nasty buffer dependencies in your code - This in itself could cause a number of headaches as your code is moved into production.
perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s& .com.&_&&&print'
In Section
Seekers of Perl Wisdom
|
|