Subj : encode/decode (improved) To : All From : Angus Mcleod Date : Thu Dec 02 2004 08:25 am I've improved on the 'urlencode' script by adding the other 'allowed characters' to the RE. It now looks like this: #! /usr/bin/perl -w while (@ARGV) { $_ = shift @ARGV; s/([^-_\.!~\*'\(\)A-Z0-9])/sprintf("%%%02X", ord($1))/sige; print "$_\n"; } Note that the first version was not specifically *wrong* -- it simply encoded the "-", "_", ".", "!", "~", "*", "'", "(" and ")" characters, which is allowed (and valid) but unnecessary. --- þ Synchronet þ Linus is a regular at The ANJO BBS. No, Linus Brathwaite! .