Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Triangle Numbers Revisited

by Limbic~Region (Chancellor)
on Oct 14, 2004 at 02:34 UTC ( #399080=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ cat gen_targets.pl
    #!/usr/bin/perl
    ...
    my $file = $ARGV[0] || 'targets.txt';
    open (OUTPUT, '>', $file) or die "Unable to open $file for writing : $
    +!";
    print OUTPUT int rand 5_000_000, "\n" for 1 .. 5_000;
    
  2. or download this
    my $file = $ARGV[0] || 'targets.txt';
    open (INPUT, '<', $file) or die "Unable to open $file for reading : $!
    +";
    ...
        chomp;
        get_three( $_ );  # used your sub/calling convention
    }
    
  3. or download this
    $ time ./lr.pl
    
    ...
    real    1m0.791s
    user    1m0.326s
    sys     0m0.220s
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (16)
As of 2014-07-31 17:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (249 votes), past polls