# # # # This sample Perl-script is provided AS IS and you should # use it at your own risk. # You MUST modify it before using with your particular # PerfectMoney account. # # # trying to open URL to process PerfectMoney e-Voucher creation use LWP::UserAgent; use Data::Dumper; $ua = LWP::UserAgent->new(env_proxy => 1,keep_alive => 1,timeout => 30); $request = HTTP::Request->new(GET =>"https://perfectmoney.com/acct/ev_create.asp?AccountID=111111&PassPhrase=aaa111&Payer_Account=U987654&Amount=0.01"); $response = $ua->request($request); if (!$response->is_success) { print "Error openning URL"; exit; } # searching for hidden fields @data = ($response->content =~ m//g); if (!@data) { print "Ivalid output"; exit; } # putting data into a hash %h = (); for ($i = 0; $i < scalar(@data); $i+=2) { $h{$data[$i]} = $data[$i+1]; } #printing our hash print "
\n";
while ( ($k,$v) = each %h ) {
    print "$k => $v\n";
}
print "
";