Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^4: Extracting money from a double quoted string

by sherab (Scribe)
on Dec 06, 2014 at 18:59 UTC ( [id://1109429]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Extracting money from a double quoted string
in thread Extracting money from a double quoted string

You'll note that I pointed out in my original question that it works with ' '. Thanks
  • Comment on Re^4: Extracting money from a double quoted string

Replies are listed 'Best First'.
Re^5: Extracting money from a double quoted string
by Corion (Patriarch) on Dec 06, 2014 at 19:02 UTC

    Then let me repeat what I gave as an answer in my first reply to you:

    As an alternative, you could quote the dollar sign, so that Perl knows you don't mean the variable $9:
    my $string= "Price is \$9.99 on our website";

    What part of that answer does not apply to your problem?

    Is your question why $string does not contain the value 9.99 when you use double quotes? Is your question about the difference between double and single quotes in Perl? Is your question about what the variable $9 contains?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1109429]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-20 03:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found