I have a very small, standard connection to website that gets the value of an input field. I can get the value and print it fine, but I cannot assign it to a variable!!! Can anyone see why this is:
my $mech = WWW::Mechanize->new(agent => 'Windows IE 6');
my $url = "https://www.somesite.com";
# This next line prints, to screen, the value as expected
print "Value: " . $mech->field('sessionid');
# These next 2 lines prints nothing!
my $sessionid = $mech->field('sessionid');
Can anyone see why this might be!?