#!c:\perl\bin\perl.exe use strict; use warnings; use SOAP::Transport::HTTP; use HTTP::Cookies; SOAP::Transport::HTTP::CGI ->dispatch_to('emailfind') ->handle; package emailfind; sub findingit { warn "****** findingit(".join(',',map{"'$_'"}@_).")\n"; my $function = shift; my $cookiejar = shift; die "No cookies" unless $cookiejar; my $cookie = $cookiejar->as_string(); die "no cookie" if (!$cookie || $cookie =~ /WALOGIN="RESET"/); #exit function if cookie empty or is RESET my ($e) = $cookie =~ /WALOGIN=\"([^\"]+)\"/; my ($e) = split(/-/, $cookie); $e = pack ("H*", $e); }