should be (if you want to include the possibility of getting the last file in /usr/bin):my @files = glob("/usr/bin/*"); my $range = $#files; #scalar(@files)-1; while (1) { my $random = int(rand($range));
But GlitchMr has it correct in his answer.my @files = glob("/usr/bin/*"); while (1) { my $random = int(rand(@files));
In reply to Re: I/O Watchdog Daemon
by runrig
in thread I/O Watchdog Daemon
by IdleResonance
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |