Re: For Loop error: Missing $ on loop variable at time.pl line 7.

2007-07-10 Thread Dr.Ruud
Gowtham schreef: > Martin Barth: >>> for my ($index = 0; $index <= 10; $index++) { >>>print ("$hour:$min:$sec\n"); >>> } >> >> for my $index (0..10){ >> print ("$hour:$min:$sec\n"); >> } > > Don't wrap the entire loop initializer, condition and > counter update in my(). [...] Gowtham,

Re: For Loop error: Missing $ on loop variable at time.pl line 7.

2007-07-10 Thread Gowtham
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 upd

Re: For Loop error: Missing $ on loop variable at time.pl line 7.

2007-07-10 Thread Mr. Shawn H. Corey
CM Analyst wrote: for my ($index = 0; $index <= 10; $index++) { for (my $index = 0; $index <= 10; $index ++ ) { --- Shawn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: For Loop error: Missing $ on loop variable at time.pl line 7.

2007-07-10 Thread Martin Barth
> for my ($index = 0; $index <= 10; $index++) { > > print ("$hour:$min:$sec\n"); > > } for my $index (0..10){ print ("$hour:$min:$sec\n"); } hth -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

For Loop error: Missing $ on loop variable at time.pl line 7.

2007-07-10 Thread CM Analyst
Hello. I have this code that works fine without the for loop but fails with it with this error message: "Missing $ on loop variable at time.pl line 7." Here's the code itself: ### use strict; use warnings; use Time::Local; my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst