0

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.

No such file or directory

ANy idea why?

3
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by Uninverted
0

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.
0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.