Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Triangle Numbers Revisited

by Limbic~Region (Chancellor)
on Oct 14, 2004 at 02:34 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://399080]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2024-04-23 12:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found