gm40 has asked for the wisdom of the Perl Monks concerning the following question:
Hi there, a simple problem, probably quickly solved: I cannot execute a Perl program as expected:
I'm grateful for any comment. Thanks!gerd@gm2015:~/Programming/Perl> ./FirstTrial ./FirstTrial: line 1: #!/usr/bin/perl: No such file or directory ./FirstTrial: line 2: use: command not found ./FirstTrial: line 6: say: command not found gerd@gm2015:~/Programming/Perl> which perl /usr/bin/perl gerd@gm2015:~/Programming/Perl> echo $PATH /home/gerd/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games gerd@gm2015:~/Programming/Perl> perl FirstTrial Hello gerd@gm2015:~/Programming/Perl> more FirstTrial #!/usr/bin/perl -w use 5.18.2; #use strict; #use warnings; #use utf8; say "Hello"; gerd@gm2015:~/Programming/Perl>
2017-11-28 Athanasius fixed closing code tag
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Executing a Perl program
by NetWallah (Canon) on Nov 27, 2017 at 20:32 UTC | |
|
Re: Executing a Perl program
by shmem (Chancellor) on Nov 27, 2017 at 20:20 UTC | |
|
Re: Executing a Perl program
by marto (Cardinal) on Nov 27, 2017 at 19:58 UTC | |
|
Re: Executing a Perl program
by karlgoethebier (Abbot) on Nov 28, 2017 at 09:30 UTC |