Perl external command execution error -


i new perl , trying create ftp script using lftp program.

i'm trying execute ftp script file through lftp. code :

my $client = "lftp"; $connectionstring =  "" . $client . " -d -f script.ftp"; $result = `$connectionstring` or die "\nerror running $client: $!"; return $result; 

well, it's execute command script.ftp file debug on see output , after die , nothing written $result.

error i'm receiving -

error running lftp: @ ftp.pl line 3. 

it refers line passing output variable $result.

any clue why it's not passing output $result , die?

if run same linux shell, it's executing no error.

better use ftp module (such net::ftp) rather counting on shell / external commands.


Comments