Gossamer Forum
Home : General : Perl Programming :

email @ is changed to *

Quote Reply
email @ is changed to *
Hi All,

I wonder if you can help

I have a piece of software that when an email address is entered in the form it returns and displays the @ as a *.

I want it to display as the @ sign.

I think i have found the code that relates to this and have placed this below. Your help is much appreciated.

Code:
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs)
{
($name, $value) = split (/=/, $pair);
$value=~ tr/+/ /;
$value=~ s/%(..)/pack("C", hex($1))/eg;
$emailto = $value if ($name eq 'Email_Address');
$name=~tr/_/ /;
$value=~tr/[<>!@^\\]/*/;
if ($name =~ / secure$/i)
{
$secure[$si] = $value;
$slabel[$si] = substr($name,0,length($name)-7);
$si += 1;
}
else
{
$nonsecure[$nsi] = $value;
$nslabel[$nsi] = $name;
$nsi += 1;
}
}


Regards

MDJ1
http://www.isee-multimedia.co.uk
Quote Reply
Re: email @ is changed to * In reply to
Delete the following codes:

Code:

$value=~tr/[<>!@^\\]/*/;


Regards,

Eliot Lee

Quote Reply
Re: email @ is changed to * In reply to
Thanks eliot,

I thought that would be the line but i didnt know whether to delete or mod it.

Not too, complacent with perl yet, but getting through my book.

Another question quickly,

I want a small database type program capable of reading and displaying the results of a flat | delimited file, i dont need the script to write to the file just display and delete entries, all entries have a key.

I knwo i could use DBMan or similar, but this would be a total waste of resources for what i want the script to do.



Regards

MDJ1
http://www.isee-multimedia.co.uk
Quote Reply
Re: email @ is changed to * In reply to
Why would DBMAN be a total waste??? You can stripe out most of the features that you do not want to use. I used DBMAN in the past for only allowing administrators and managers to add records into the database. DBMAN is a great program. If all you want is for the general public to search your database, just turn off the links to the add/modify/delete options and change the user permissions in the default.cfg file.

Why re-create the wheel?

Regards,

Eliot Lee

Quote Reply
Re: email @ is changed to * In reply to
Hi Eliot,

I dont even want people to be able to browse, the script is to pull a flat file of order details froma file and display them, once printed click a button and it deletes. i dont need no search facilities, just a basic script to display a file and delte an entry.

It seems that this could be done with one or two simple perl scripts, maybe im wrong.


Regards

MDJ1
http://www.isee-multimedia.co.uk
Quote Reply
Re: email @ is changed to * In reply to
Again, DBMAN would do want you want...depending on the size of the file...of course, MySQL would be the better solution for large databases.

Again, I do NOT support re-creating the wheel. Sorry.

Good luck!

Regards,

Eliot Lee

Quote Reply
Re: email @ is changed to * In reply to
Hi eliot,

I always value your comments and as you say "why re-invent the wheel" I think i will take your advise and use dbman, at the end of the day ot would take longer to crate the scripts than install dbman.


Regards

MDJ1
http://www.isee-multimedia.co.uk
Quote Reply
Re: email @ is changed to * In reply to
That is my philosophy...while creating your own scripts allows you to better understand the syntax of Perl, it is time consuming....

Wink

Regards,

Eliot Lee