Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Idiom to return 0 or random number of array elements

by eyepopslikeamosquito (Archbishop)
on Dec 07, 2012 at 10:31 UTC ( [id://1007707]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $stats{ scalar( x() ) }++
    
  2. or download this
    $stats{ x() }++
    
  3. or download this
    $stats{ scalar( my @r = x() ) }++
    
  4. or download this
    use strict;
    use warnings;
    ...
    my %stats;
    $stats{ scalar( my @r = x() ) }++ for  1 .. 1000;
    print Dumper( \%stats );
    
  5. or download this
    $VAR1 = {
              '6' => 81,
    ...
              '1' => 123,
              '10' => 117,
              '5' => 108
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-03-19 02:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found