lcd via NET::FTP

V

vikram

Hi Everyone,

I want to view the local current directory using perl Net::FTP
module..When i use lcd("local folder") its showing me the error.

Can't locate object method "lcd" via package "Net::FTP"


Thanks in advance.
 
J

Joost Diepenmaat

vikram said:
Hi Everyone,

I want to view the local current directory using perl Net::FTP
module..When i use lcd("local folder") its showing me the error.

Can't locate object method "lcd" via package "Net::FTP"

Since lcd changes the local current directory, you should just use the
chdir built-in function, I think.

Joost.
 
J

Joserra

Hi Everyone,

I want to view the local current directory using perl Net::FTP
module..When i use lcd("local folder") its showing me the error.

Can't locate object method "lcd" via package "Net::FTP"

Thanks in advance.

You could use ls("folder") method or if you want more detail
information you could use dir("folder") method. For viewing the local
current directory, I use ls("").

Example:
....
my $ftp = Net::FTP->new($IP);
$ftp->login($USER,$PASSWORD);
my @files = $ftp->ls("");
....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top