You need to escape the $ in the regex:
$string =~ s/\$//;

-----Original Message-----
From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 15, 2002 5:16 PM
To: [EMAIL PROTECTED]
Subject: Strip $ from variable


Hello All,

I was just wondering how I would go about stripping the $ sign from the
following string?

$string = "$20.90";

$string =~ s/$//; <-- I figured this would work fine?

Any ideas?

Regards,

Dan



-- 
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]

Reply via email to