Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Adding A Dollar Sign

by monk2b (Pilgrim)
on Jan 13, 2001 at 21:44 UTC ( [id://51613]=note: print w/replies, xml ) Need Help??


in reply to Adding A Dollar Sign

Finally a question I have the answer to and someone beats me to it.
print '$200.00' . "\n"; or print "\$200.00\n";

learning also

Replies are listed 'Best First'.
Re: Re: Adding A Dollar Sign
by eg (Friar) on Jan 13, 2001 at 22:21 UTC

    In your first example, rather than a period, you can use a comma to pass print a list and avoid that (admittedly not all that expensive) concatenation:

    print '$200.00', "\n";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (None)
    As of 2024-04-19 00:04 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found