On Windows Active State perl whenever I try to run the program "print("Hello World.n");"; I keep getting the error messages "Bareword
found where operator expected at - line 1 near "print (Hello"" (missing
operator before Hello?), String found where operator expected at - line
1 near ""print ("" (Missing semicolon on previous line?), and String
found where operator expected at - line near "n");"". What am I doing
wrong here and how do I fix this? TIA
--
Steve Horn
kcom1989%40fastmail.fm">kcom1989fastmail.fm
Interesting. Could you please send the whole code? Is there something
else in the file? It usually is a problem regarding to interpolation.
Gergely.
--- In perl-beginner%40yahoogroups.com">perl-beginneryahoogroups.com, "Steve Horn" <kcom1989...> wrote:
>
> On Windows Active State perl whenever I try to run the program > "print("Hello World.n");"; I keep getting the error messages "Bareword
> found where operator expected at - line 1 near "print (Hello"" (missing
> operator before Hello?), String found where operator expected at - line
> 1 near ""print ("" (Missing semicolon on previous line?), and String
> found where operator expected at - line near "n");"". What am I doing
> wrong here and how do I fix this? TIA
> --
> Steve Horn
> kcom1989...
>
> --
> http://www.fastmail.fm - Access your email from home and the web
>
--- In perl-beginner%40yahoogroups.com">perl-beginneryahoogroups.com, "Steve Horn" <kcom1989...>
wrote:
>
> On Windows Active State perl whenever I try to run the program > "print("Hello World.n");"; I keep getting the error messages
"Bareword
> found where operator expected at - line 1 near "print
(Hello"" (missing
> operator before Hello?), String found where operator expected at -
line > 1 near ""print ("" (Missing semicolon on previous line?), and
String
> found where operator expected at - line near "n");"". What am I
doing
> wrong here and how do I fix this? TIA
> --
> Steve Horn
> kcom1989...
>
> --
> http://www.fastmail.fm - Access your email from home and the web
>
You don't need the quotes around the print statement, so change
"print("Hello World.n");";
to
print("Hello World.n");
I also suggest that you use the 'strict', 'warnings' and
'diagnostics' pragmas, so your program should be like this: