Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: making random number

by CountZero (Bishop)
on Aug 25, 2014 at 12:52 UTC ( [id://1098522]=note: print w/replies, xml ) Need Help??


in reply to Re^2: making random number
in thread making random number

use Modern::Perl qw/2014/; open my $OUT, '>', './random.txt' or die "Could not open the output fi +le: $!"; say $OUT 91200000000 + int( rand(100000000) ) for 1 .. 1000;
Now check the documentation for open, print and say. If there is anything you do not understand, come back here and ask.

These are really basic functions you will need time and time again, so it is important you understand them completely.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics

Log In?
Username:
Password:

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

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

    No recent polls found