Thread: small error..
View Single Post
Old Jun 13th, 2007, 4:11 PM   #1
teishu
Programmer
 
Join Date: May 2006
Posts: 51
Rep Power: 3 teishu is on a distinguished road
small error..

hi, just learning perl can someone tell me whats wrong with this:


print "The months of the year are: \n";
@months = ("January \n", "Febuary \n", "March \n", "April \n", "and so on... \n")
for $i (1, 2, 3, 4, 5) {
	print "@months \n";
	}

i get this error:

teishu@debian:~/prl$ perl months.pl
syntax error at months.pl line 5, near "$i ("
Execution of months.pl aborted due to compilation errors.

thanks
__________________
AMD Athlon X2 4200+ -- Asus V3-M2V890 -- 2GB Kingston -- Vista Ultimate 32bit + Ubuntu 8.04
Intel C2D T5870 2.0GHZ -- Vostro 1510 -- 2048MB -- Windows XP SP2

ASCII stupid question, get a stupid ANSI !
teishu is offline   Reply With Quote