Re: Strip $ from variable

2002-04-15 Thread drieux
In case no one has mentioned it, there are good reasons for using '-w' and "use strict;" in your perl code On Monday, April 15, 2002, at 05:16 , Daniel Falkenberg wrote: [..] > $string = "$20.90"; > > $string =~ s/$//; <-- I figured this would work fine? [..] if you had used '-w' and strict

Re: Strip $ from variable

2002-04-15 Thread Jeff 'japhy' Pinyan
On Apr 15, Daniel Falkenberg said: >I was just wondering how I would go about stripping the $ sign from the >following string? > >$string = "$20.90"; That won't do what you expect -- $string is probably ".90" now. $20 is a variable (set by a regex) and is probably undef. You need either '$20.9

RE: Strip $ from variable

2002-04-15 Thread Mark Anderson
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 $