in reply to Problem parsing through downloaded web pages
use Encode qw(encode); ... #my $thearesp = $theresponse->content; my $thearesp = encode("iso-8859-1", decode("UCS-2LE", $theresponse->co +ntent));
See Encode.
Some nits:
use 3-argument open instead (note the comma):open FILETEMP, "+>" . "$tempIndex.htm"
open FILETEMP, "+>" , "$tempIndex.htm"
--shmem
1)this prefix is often used in other languages to denote a variable holding a scalar, but it's not needed in Perl: the $ already does this.
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem parsing through downloaded web pages
by malomar66 (Acolyte) on Jan 05, 2007 at 17:16 UTC | |
by shmem (Chancellor) on Jan 05, 2007 at 19:24 UTC | |
by malomar66 (Acolyte) on Jan 06, 2007 at 07:12 UTC |