On Jul 10, 9:13 pm, [EMAIL PROTECTED] (Martin Barth) wrote:
> > for my ($index = 0; $index <= 10; $index++) {
>
> > print ("$hour:$min:$sec\n");
>
> > }
>
> for my $index (0..10){
>         print ("$hour:$min:$sec\n");
>
> }
>
> hth

Don't wrap the entire loop initializer, condition and counter update
in my().

This should work

for (my $index = 0; $index <= 10; $index++)
{
...
}


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to