in reply to unpacking - html re-encoding?

This sub does the encoding you want. It will encode any char not in the negated chatacter class. Just drop any chars you want encoded from this class (I've dropped the ' for you already :-) I've included a decode sub as well.

sub encode { my $encode = shift; $encode =~ s/([^\w\s.!~*()-=&])/sprintf "%%%02X", ord($1)/eg; $encode =~ tr/ /+/; return $encode; } sub decode { my $decode = shift; $decode =~ tr/+/ /; $decode =~ s/%([a-f\d][a-f\d])/pack("c",hex($1))/ige; return $decode; } $str = qq/he said, "I'LL be back"/; $enc = encode ($str); $dec = decode ($enc); print "$enc\n$dec";

Hope this helps

cheers

tachyon

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