Oops, there's a typo in the for loop, it should be:
for (my $i = 0; $i <= $#a, $i++) {
On Tue, 29 Jan 2002, Edward Moon wrote:
> sleep is the function you want.
>
> example:
> --
> #!/usr/bin/perl
>
> my @a = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
>
> for (my $i = 0; @a, $i++)
sleep is the function you want.
example:
--
#!/usr/bin/perl
my @a = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
for (my $i = 0; @a, $i++) {
print $a[$i], "\n";
sleep(5); # wait 5 seconds before continuing loop
}
On Tue, 29 Jan 2002, SuccessInMind wrote:
> Hi,
>
> Ca