DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   Perl (http://www.daniweb.com/forums/forum112.html)
-   -   Perl problem (http://www.daniweb.com/forums/thread115980.html)

rysin Mar 27th, 2008 1:41 pm
Perl problem
 
Hey guys. Ive got a problem with a simple hello world script. Im a perl beginner so bear with me. Im running mandriva linux if it matters. Also this file is saved under /home/rysin/documents.

Code
#!/usr/bin/perl

print "Hello World\n";


When I go into the command line and use the perl hello.pl command it comes up with this error message.

Quote:

No such file or directory

ANy idea why?

phper Apr 2nd, 2008 6:42 pm
Re: Perl problem
 
Have you checked if perl is installed on your system?

Open up a terminal/shell and type:

perl -v

This should give you something like:

This is perl, v5.8.8 built for i586-linux-thread-multi

licensing information, etc.

Uninverted Apr 22nd, 2008 8:39 pm
Re: Perl problem
 
Make the file executable first; usually 'chmod +x' will work. And make sure to type ./hello.pl, because otherwise it looks in /bin and /usr/bin, and not the current directory


All times are GMT -4. The time now is 10:34 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC