Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: I/O Watchdog Daemon

by runrig (Abbot)
on Aug 22, 2012 at 17:18 UTC ( #989104=note: print w/ replies, xml ) Need Help??


in reply to I/O Watchdog Daemon

This won't help you at all, but just to be a pedant and provide a correct example for anyone else wanting to select a random file:

my @files = glob("/usr/bin/*"); my $range = $#files; #scalar(@files)-1; while (1) { my $random = int(rand($range));
should be (if you want to include the possibility of getting the last file in /usr/bin):
my @files = glob("/usr/bin/*"); while (1) { my $random = int(rand(@files));
But GlitchMr has it correct in his answer.


Comment on Re: I/O Watchdog Daemon
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2015-07-02 10:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (34 votes), past polls