Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Building a small perl

by Animator (Hermit)
on Mar 20, 2009 at 17:55 UTC ( [id://752125]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -wle 'system("ps uch $$");@x=1..1_000_000;print "Elements in \@x:
    + " . @x;; system("ps uch $$");'
    xxx      2395  0.0  1.0  46488 44384 pts/0    R+   18:46   0:00 perl
    Elements in @x: 1000000
    xxx      2395  0.0  1.5  66104 64012 pts/0    R+   18:46   0:00 perl
    
  2. or download this
    perl -wle 'system("ps uch $$");push @x, $i while ($i++ < 1_000_000);pr
    +int "Elements in \@x: " . @x;; system("ps uch $$");'
    xxx      2365  0.0  0.0   3152  1248 pts/0    R+   18:45   0:00 perl
    Elements in @x: 1000000
    xxx      2365 20.0  0.5  22992 21056 pts/0    R+   18:45   0:00 perl
    
  3. or download this
    perl -wlce 'system("ps uch $$");@x=1..1_000_000;print "Elements in \@x
    +: " . @x;; system("ps uch $$");CHECK { system("ps uch $$"); }'
    xxx      2554  0.0  1.0  46488 44404 pts/0    R+   18:50   0:00 perl
    -e syntax OK
    
  4. or download this
    perl -wlce 'system("ps uch $$");push @x, $i while ($i++ < 1_000_000);p
    +rint "Elements in \@x: " . @x;; system("ps uch $$");CHECK { system("p
    +s uch $$") }'
    xxx      2521  0.0  0.0   3152  1260 pts/0    R+   18:49   0:00 perl
    -e syntax OK
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-18 02:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found