Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 avoiding work at the Monastery: (5)
As of 2014-09-17 03:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (56 votes), past polls