in reply to Re: Problem parsing through downloaded web pages
in thread Problem parsing through downloaded web pages

I did as you recommended and got the following error: Undefined subroutine &main::decode called at temp.pl line 20, <FIRMS> line 33. This persisted after I installed the encode module that you linked to.
  • Comment on Re^2: Problem parsing through downloaded web pages

Replies are listed 'Best First'.
Re^3: Problem parsing through downloaded web pages
by shmem (Chancellor) on Jan 05, 2007 at 19:24 UTC

    Did you read the documentation of Encode?

    use Encode qw(encode decode);

    fixes the problem. The line

    my $thearesp = encode("iso-8859-1", decode("UCS-2LE", $theresponse->co +ntent));

    uses the functions encode and decode from Encode, which by default aren't exported. You would have figured out surely, had you read the docs.

    --shmem

    _($_=" "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}
      use Encode qw(encode decode); That did the trick, thanks. Did my best to understand the docs but it's like a whole different language to me! :)