Its my first Perl script, and maybe the code isnt trim... Probably better is to using Warnings
#!/usr/bin/perl -w
and reading of code need to be too elegant, portable way for script to work and on windows in a *nix platform, something like this:
open(PLIST, "proxy") or die;
foreach $i (<PLIST>) {
....
}
And i doesnt need to use WWW::Mechanize modul , but i like it! :lol:
#!/usr/bin/perl
#
use WWW::Mechanize;
@proxy=`cat proxy`;
foreach $i (@proxy) {
chomp($i);
my $go = WWW::Mechanize->new( agent=> "Mozilla/5.0" );
$go->proxy(['http'], 'http://'.$i.'/');
$go->get('http://www.whatismyip.com');
$match = $go->content;
# print "$match\n";
my($crap,$ip)=split(/^(.*):/,$i);print "$i -> ";
if ($match =~ m/(.*)Your IP Is $ip(.*)/ ) { print "Ok.\n";
open(LOG,">> proxy.log"); print LOG "$i\n"; close(LOG);
}
else { print "Nop\n"; }
}
Number found where operator expected at C:\Perl\bin\kkk.pl line 8, near "["
(Missing operator before 91?)
syntax error at C:\Perl\bin\kkk.pl line 8, near "["
Unmatched right curly bracket at C:\Perl\bin\kkk.pl line 17, at end of line
Execution of C:\Perl\bin\kkk.pl aborted due to compilation errors.
C:\Perl\bin>