in reply to HTML::Entities question

A little hard to understand what you are doing but if you just want to get all the ASCII chars not in a short list you would just:

my @unsafe = qw ( < > " ' ); my %unsafe; @unsafe{@unsafe} = @unsafe; # make a hash lookup table for (1..255) { push @safe, chr($_) unless defined $unsafe{ chr($_) }; } print @safe;
cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: Re: HTML::Entities question
by skazat (Chaplain) on Oct 28, 2001 at 00:57 UTC

    i pretty much want to parse out characters that have html entities except my little list of ',",<,> and &

    and HTML::Entities allows you to parse out characters that have entities, and also allow you to state exactly which ones you want parsed. I want to state which ones i don't want parsed. Seeing there isn't any way to do this, I want a workaround (dang nabiit!)

    I'll try what you gots,

     

    -justin simoni
    !skazat!

      ok, duh the example in the docs:

      encode_entities($a, "\200-\377");
      seems to do what i want nicely

       

      -justin simoni
      !skazat!