Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

RE: Adding 2 + 2

by Adam (Vicar)
on Sep 11, 2000 at 21:00 UTC ( #31927=note: print w/ replies, xml ) Need Help??


in reply to Adding 2 + 2

Ok, I have a few more. First, the one I posted last night followed by several new ones. (Including one that uses no digits)

perl -we "$,=2+2=>print('The result is ',$/)" perl -we "1while(2+2>++$.);print qq;The result is $.$/;" perl -we "tie $sum,'_',4;print 'The result is ',$sum,$/;sub _::TIESCAL +AR{bless[pop],'_'}sub _::FETCH{$_[0][0]=2+2}" perl -we "my $two=$^W+!''; print 'The result is ',$two + $two,$/" perl -we "print reverse $/,eval(join'+',(2)x2),'The result is '" perl -we "$_=qq/The result is 2+2\n/=>y/2\+2/4/s,print"
I can only get away with the last one because Ozymandias says I can.


Comment on RE: Adding 2 + 2
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (11)
As of 2015-07-06 16:29 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 (77 votes), past polls