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?

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.