Hi again,
have a new script her, I want to create a code that will read a data
file of the following format
<number of times> <sleep time>
The first column describes how many times the script should download a
URL, and the second column describes how many seconds the tool should
sleep before going on...
This is what i got this far, (I prefer to use the unix, wget command
to do this operation if posible)
#! /usr/bin/perl
$data = "file";
$URL = "www.cnn.com";
$c = 1;
open (FILE, $data) or die "Error: $!";
while ($line = <FILE>){
my @array = split /\s+/,$line;
my $exe = $array[0];
my $sleep = $array[1];
if ($c >= $exe) {
system('wget "$URL"');
$c++;
}
sleep $sleep;
}
This is clearly wrong, but could anyone please tell meg how to get this scipt