[Chicago-talk] Newbie problem: Cannot get Hello World to run!

Chris McAvoy mcavoy76 at hotmail.com
Sun Jan 18 22:17:27 CST 2004


Try ./Hello

Chris


----- Original Message ----- 
From: "Sachin Karol" <skarol1 at uic.edu>
To: <chicago-talk at mail.pm.org>
Sent: Sunday, January 18, 2004 9:54 PM
Subject: [Chicago-talk] Newbie problem: Cannot get Hello World to run!


> Hello,
>       Hope the Perl gurus can help me with a typical newbie 
> (I think!!) problem. 
> 
> After many hassles, I managed to load Suse 9 on my laptop.
> I am now trying to learn Perl and am using the famed " Learning 
> Perl" from OReilly. 
> 
> This is what my problem is:
> 
> I am trying to run the basic Hello World problem :-
> 
> #!/usr/bin/perl -w
> print ("Hello, world!\n");
> 
> I tried to save this into a file named Hello, ran chmod +x on 
> it and then typed Hello at the prompt. This is my output :-
> 
> bash: Hello: command not found
> 
> Then I tried using the following command :-
> 
> perl Hello
> 
> This is the output :-
> 
> print (...) interpreted as function at Hello line 2.
> Hello, world!
> 
> and if I remove the first line and then run 'perl Hello', I am able 
> to run the program properly.
> 
> What am I doing wrong? I thought that by including the path with 
> the '#!' as the first line of the program would not require me to 
> write perl at the command line. Is there something I am missing?
> Running 'whereis perl' gives me:-
> 
> perl: /usr/bin/perl /usr/share/man/man1/perl.1.gz  
> 
> Please advice
> 
> Thanks
> Sachin Karol
> 
> 
> 
> 
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at mail.pm.org
> http://mail.pm.org/mailman/listinfo/chicago-talk
> 



More information about the Chicago-talk mailing list