Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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

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 having an uproarious good time at the Monastery: (9)
As of 2016-06-25 16:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (326 votes). Check out past polls.