Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: two + 2 not equal 4!

by suhailck (Friar)
on Jul 24, 2010 at 06:15 UTC ( #851124=note: print w/ replies, xml ) Need Help??


in reply to two + 2 not equal 4!

To make the print statement work as you wrote, change the sub as given below,

perl -e 'sub two { $_[0] + 2 };print two + 2'

output:
4

~suhail


Comment on Re: two + 2 not equal 4!
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2015-01-30 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (247 votes), past polls