Código
#!usr/bin/perl #Simple downloader 0.1 #Coded By Doddy H use LWP::UserAgent; my $nave = LWP::UserAgent->new; $nave->agent( "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12" ); $nave->timeout(20); head(); unless ( $ARGV[0] ) { sintax(); } else { now( $ARGV[0] ); } copyright(); sub now { my ( $scheme, $auth, $path, $query, $frag ) = uri_split( $_[0] ); if ( $path =~ /(.*)\/(.*)$/ ) { my $file = $2; if ( download( $_[0], $file ) ) { } else { } } } sub sintax { } sub head { } sub copyright { } sub download { if ( $nave->mirror( $_[0], $_[1] ) ) { if ( -f $_[1] ) { return true; } } } #The End ?