Hi all,
        Can anybody help me to figure out why the first function call
works
        but the second one is unable to do it.

        Only difference is I am using DownloadFolder variable to send
the value.


                #FtpVM('test.americas.corp.net',
'/1.00/_releases/1_00_00_052', ''); 
                        >>>>>>>The above works but the below one doesn't
...

                local $DownloadFolder = "/1.00/_releases/1_00_00_052" ;
                FtpVM('test.americas.corp.net', 'DownloadFolder', ''); 


# FTP the VM files
sub FtpVM {

    my ($host, $ftpDir, $regexMatch) = @_;
    my $user = "ftp";
    my $pass = "";

        print "ftpdir = $ftpDir" ; 

    my $ftp = Net::FTP->new($host) or die "Could not ftp to host: $host:
[EMAIL PROTECTED]";
    $ftp->login($user, $pass) or die "Could not login as $user/$pass\n";
    $ftp->binary;
    $ftp->hash;

        
    # Show the ftp directory contents
    foreach ($ftp->ls($ftpDir)) {
        print $_."\n" ;
    }
}

Thanx,
Alok

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to