There's a few problems with your script. This one works:
$money = '$27.50'; $money =~ s/\$//; Use single quotes instead of double, and don't forget the =~ instead of = Daniel Falkenberg wrote: >Hi Tim, > >I just tried running $money = s/\$//: over > >$money = "$21.80"; > >And my returned result was nothing! I.e it removed everything? > >Any ideas, > >Dan > >On Wed, 2002-04-10 at 09:34, Timothy Johnson wrote: > >>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]