- or download this
sub connectToHost {
...
...
foreach my $line (@request){
print $UrlSock $line;
}
- or download this
Can't use an undefined value as a symbol reference at ...
- or download this
$hash->{url} = ($firstline =~ m|(http://\S+)|)[0];
if($hash->{url}=~/\?(.+)/s){
...
}
...
$hash->{url}=~s/\?.*//s;
- or download this
if($firstline =~ m!(GET|POST|HEAD) http://([^/:]+):?(\d*)!){
$method=$1;
...
$hash->{method}=$method;
...
if ($method=~/^POST$/is && $len) {
- or download this
#Get Reply Header
my %Reply = ();
...
binmode $UrlSock;
binmode $Client;
}
- or download this
sub worker {
my $tid = threads->tid();
local $SIG{__DIE__} = sub{ $ThreadStatus{$tid} = 'died'; };
...
- or download this
#!/usr/bin/perl
use strict;
...
$str=~s/[\r\n\s\t]+$//s;
return $str;
}