Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 imbibing at the Monastery: (6)
As of 2015-07-07 02:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (86 votes), past polls