Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Adding A Dollar Sign

by monk2b (Pilgrim)
on Jan 13, 2001 at 21:44 UTC ( #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? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2022-05-29 12:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (101 votes). Check out past polls.

    Notices?