I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-05-27 13:55:42-07 by tmellnik
get binary instead of text

I have a simple script to download a set of text files using www-mechanize get().

On an Win NT 4 machine, perl 5.8.8, www-mechanize 1.2, the download works.

On a Win Server 2003 machine, perl 5.8.8., www-mechanize 1.34 the files downloaded are all binary characters. I can paste URL into a browser on this machine & see the text.

Would appreciate advice or hints about how to get text. Thanks.

--

Ted Mellnik

tmellnik@charlotteobserver.com

Direct Responses: 7945 | Write a response
Posted on 2008-05-27 14:46:01-07 by tmellnik in response to 7944
Re: get binary instead of text

On the Win Server 2003 box, the get() works in www-mechanize 0.72, but not in www-mechanize 1.32

Ted
Direct Responses: 8290 | Write a response
Posted on 2008-07-13 22:38:19-07 by murthy64 in response to 7945
Re: get binary instead of text
I have the same issue. On Windows XP with Active Perl everything works great. As soon as I moved the code to a BSD Unix things came crumbling down. For instance, the entire page of www.fedex.com was returned as a binary when done like this
my $mech = WWW::Mechanize->new (); $mech->get("http://www.fedex.com"); print $mech->response->content;
Can anyone please help me figure this out? Thanks Murthy
Direct Responses: 8310 | Write a response
Posted on 2008-07-15 13:34:50-07 by murthy64 in response to 8290
Re: get binary instead of text
The problem was fixed by using
$mech->content
instead of
$mech->response->content
where
$mech = WWW::Mechanize->new
Direct Responses: 8318 | Write a response
Posted on 2008-07-15 15:36:27-07 by murthy64 in response to 8310
Re: get binary instead of text
I forgot to offer a BIG THANKS to the developers of this great package. Best Regards Murthy
Direct Responses: Write a response