|
R1034 | FTP command line client with Net::FTP |
#!/usr/local/bin/perl -w
#========================================================= # Script : ftp.pl # # Brief Desc : Fetches data from a ftp host #<... |
|
R1011 | Get Cookies |
#!/usr/bin/perl use strict;
my %cookie;
&get_cookie; print "Content-type: text/html\n\n";
print qq~ Values of Cooki...
|
|
R1044 | Get data from a webserver without using LWP |
#!/usr/local/bin/perl -w
use Socket;
if (open_TCP(F, 'www.zh1.ch', 80) == undef) { print "Error"; &nb... |
|
R1020 | LWP & HTTP - Post Data |
#!/usr/bin/perl
use strict; use LWP::UserAgent; use HTTP::Request::Common;
&upload;
sub upload {
my $ua =... |
|
R1018 | LWP Sample |
#!/usr/bin/perl
use strict; use LWP::UserAgent;
my $ua = LWP::UserAgent->new(agent => "$ENV{'SCRIPT_NAME'} V$VERSION");
my $request = HTTP::Request->new('GET', 'ht... |
|
R1026 | Net::FTP |
use Net::FTP; $ftp = Net::FTP->new("some.host.name"); $ftp->login("anonymous","me@here.there"); $ftp->cwd("/pub"); $ftp->get("that.file"); $ftp-... |
|
R1055 | Parsing HTML |
See Link! |
|
R1016 | Replace all HTML tags in a page line |
$Elems[$i] =~ s/<[^>]*>//g; # Remove HTML tags |
|
R1012 | Set Cookies |
#!/usr/bin/perl use strict;
# works on IE _and_ NC !! # -----------------------
my $expires; # global variable
&createExpiryDate(86400); # Create expiry date 24h from no... |
|
R1021 | Upload a file from Perl |
#!/usr/bin/perl
use strict; use LWP::UserAgent; use HTTP::Request::Common;
&upload;
sub upload {
my $ua = LWP::UserAgent->new();
$... |
|
R1015 | Variable Parser for HTML pages |
my @repLines = ( "REP1 = first value", "REP2 = 2nd value" , "FANCY_VAR = Hi, World!" );
my @tplLines = ( "ABC Old Value<... |