This uses Net::FTP to fetch the first two hundred bytes of a 180k file:
#! perl -slw use strict; use Net::FTP; my $ftp = Net::FTP->new( 'ftp.software.ibm.com' ); $ftp->login( 'anonymous', 'anonymous@' ); $ftp->cwd( '/ftp' ); $ftp->ascii; my $xfr = $ftp->retr( '00_Catalog' ); my $buf; $xfr->read( $buf, 200 ); print $buf;
In reply to Re: Read part of a file over FTP
by BrowserUk
in thread Read part of a file over FTP
by ronin78
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |