You have to escape the dollar sign in your regex just like you did in the
assignment.

$money = s/\$//;

-----Original Message-----
From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 5:10 PM
To: [EMAIL PROTECTED]
Subject: Regex!


Hello All,

Just wondering how I can remove unwanted characters from a simple
variable.

$money = "\$21.85";

Now I simply want to strip the $ sign from that variable.

Easy?  Well I thought it would be :)

$money = s/$//; # Well thats what I thought!

Regards,

Dan



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------------------
This email may contain confidential and privileged 
material for the sole use of the intended recipient. 
If you are not the intended recipient, please contact 
the sender and delete all copies.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to