CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
bad consitency-errors on root-path

 



dilbert
User

Jun 12, 2014, 1:01 PM

Post #1 of 1 (4580 views)
bad consitency-errors on root-path Can't Post

Hello dear perl-gurus and experts

i have some consitency-errors within the perl - see below


Code
 
install_cpan_pre.pl

#!/usr/bin/perl

use strict;
use warnings;
use Net::FTP;

use constant HOST => 'ftp.cpan.org';
use constant DIR1 => '/pub/CPAN/authors';
use constant FILE1 => '01mailrc.txt.gz';
use constant DIR2 => '/pub/CPAN/modules';
use constant FILE2 => '02packages.details.txt.gz';
use constant FILE3 => '03modlist.data.gz';

my $ftp = Net::FTP->new(
HOST,
Debug => 0,
Passive => 1,
Timeout => 1
);

$ftp->login('anonymous');
$ftp->cwd(DIR1);
$ftp->ascii;
$ftp->get(FILE1);
$ftp->cwd(DIR2);
$ftp->get(FILE2);
$ftp->size(FILE2);
$ftp->get(FILE3);
$ftp->quit;
}


See how i go on - and what is happening


Code
 
#!/usr/bin/perl

use strict;
use warnings;
use YAML;
use YAML::Dumper;
use Parse::CPAN::Authors;

my $list = '/root/01mailrc.txt.gz';

my $p = Parse::CPAN::Authors->new( $list );
my @authors = $p->authors;

my $dumper = YAML::Dumper->new;
$dumper->indent_width(1);
print $dumper->dump({dump => $p}



some bad things happen



Code
 
martin@linux-70ce:~/perl> perl cpan2.pl
Failed to read /root/01mailrc.txt.gz: no permission at /usr/lib/perl5/site_perl/5.18.1/Parse/CPAN/Authors.pm line 22.
martin@linux-70ce:~/perl>


guess that i have to put the file into another path

this one here: /root/01mailrc.txt.gz:

what do you say?`

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives