I have one program that reads the contents of a file generated by a colleague, splits that data, and enters it into a BerkeleyDB. I now have another script which I'd like to periodically go through the keys of that hash, split the associated value, and perform a get on one of those values. if i do
foreach my $x (keys %hash)
{
my $data = $hash{$x};
print "$x\n";
}
the keys and associated values are correct. similarly if I split $data and just print the one element that I want. Things get weird when I add WWW::Mechanize into the mix. say within the above loop I have:
my @parts = split(/\t/, $data);
my $url = $parts[0];
$mech->get( "$url" );
then the get operation is never successful. when I take a closer look at $x and $url, things are now funny. the contents of $x should be something like OtnFfkSpw6A. they are now --FfkSpw6A, the 1st 2 characters have been replaced with a -'s. Something similar happens with the $url, $x is actually a part of the url, and the same 2 characters are replaced. what could cause this? what am i doing wrong!
thanks, monks.