If you get the message bash: trivial.pl: command not found or bash: ./trivial.pl: Permission denied, you have either typed the command line incorrectly or forgotten to make TRivial.pl executable (with the chmod command):
$ chmod +x trivial.pl
You can force the command to execute in the current directory as follows:
Or you can use Perl to run the program like this:
$ perl trivial.pl
The sample program in the listing is a two-line Perl program. Typing in the program and running it (using Perl or making the program executable) shows how to create your first Perl program, a process duplicated by Linux users around the world every day!
Was this article helpful?