[pm-h] newbie confusion: executing a perl script
Russell L. Harris
rlharris at oplink.net
Mon Aug 4 01:07:50 PDT 2008
At the URL:
http://69.51.152.43/morse/#GUS-3
I discovered the nifty "KY8D Morse Code Perl Script", which has the
capability of converting any text -- even an entire book -- into Morse
code in a .WAV file, for subsequent conversion into mp3 or ogg vorbis
for use with a personal mp3 player.
(This is one way to circumvent the problem of a book for which the
only available audio edition has been read by someone with a voice you
find intolerable. If you can find a machine-readable copy of the
book, you can create your own Morse edition.)
The first line of the script is:
#!/usr/pkg/bin/perl
I am running Debian on an i386, so I used chmod to make the script
executable and I changed the first line of the script to read:
#!/usr/bin/perl
which works for all the Perl scripts I have been using over the past
year. But when I attempted to execute the script bash returned an
error message:
$ ./gus_morse.pl --path ~/scratch/message.txt
bash: ./gus_morse.pl: /usr/bin/perl^M: bad interpreter: No such
file or directory
I then consulted the README file supplied by the author of the script,
and saw there the example invocation:
$ perl gus_morse.pl --path message.txt
which worked.
Would someone kindly explain to me why the "perl ..." invocation
worked, whereas the "./..." invocation did not?
RLH
More information about the Houston
mailing list