perldoc -f pack [used in almost any standard header-parsing routine] Joseph
"Johnstone, Colin" wrote: > Toby, anyone, > > My next question is I guess I need to know now why this happens? > > So that I can anticipate it and code for it in the future. > > e.g sorcha.o'[EMAIL PROTECTED] > > So why does it convert it to > > [EMAIL PROTECTED] > > when it writes it out to the text file. > > What is best practice > > can I stop it from converting the funny characters before I write it out to the text >file > > or > > should I run each email address through the regex each time I read the text file >into the array that I use. > > Thanking you in anticipation > > Colin > > > -----Original Message----- > > From: Johnstone, Colin [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, December 12, 2002 10:22 AM > > To: '[EMAIL PROTECTED]' > > Subject: Preserving funny characters in email addresses > > > > > > Gidday All, > > > > I have written a perl cgi mailing list subscription application. > > > > How do I preserve funny characters in email addresses for example > > > > one subscriber's email address is > > > > sorcha.o'[EMAIL PROTECTED] > > > > but when written to the textfile where I store subscribers > > names it is written as > > > > [EMAIL PROTECTED] > > > > Because of this she doesn't get the first email from us > > telling her that she needs to confirm her subscription. > > > > Any help appreciated. > > > > Thanking you in anticipation > > > > > > use URI::Escape; > $str = uri_unescape('[EMAIL PROTECTED]'); > print $str; > > OR > > $str = '[EMAIL PROTECTED]'; > $str =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg; > print $str; > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]