Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

RE: Adding 2 + 2

by KM (Priest)
on Sep 11, 2000 at 19:01 UTC ( [id://31891]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -MFcntl=:flock -e 'print 2+LOCK_EX'
    
  2. or download this
    perl -wle 'print $^W*2**$^W*2'
    
  3. or download this
    #!/usr/bin/perl -w
    
    ...
    print "Pick another integer between 1 and 3\n";
    $num += <STDIN>;
    print "The sum is " . $num;
    
  4. or download this
    perl -wle '%h =  map {(qq{sum}) => $h{'sum'}+=$_ } qw/2 2/; print $h{s
    +um}'
    
  5. or download this
    #!/usr/bin/perl -w
    
    ...
    my %foo;
    %foo =  map {('sum') => $foo{'sum'}+=$_ } qw/2 2/;
    print $foo{sum};
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-04-18 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found