Install Perl on Fedora

Todd Zullinger tmz at pobox.com
Wed Jun 25 20:03:12 UTC 2008


Wei, Alice J. wrote:
> I am just starting out to use Fedora and learned about
> installations with the yum function.
[...]
> However, when I tried to execute a basic hello script in Perl, it
> tells me
> bash: ./total.pl: /usr/local/bin/perl: bad interpreter: No such file or directory
> 
> It is true that I don't see Perl in this directory, but is it
> necessary that I have to move my Perl installation?

It would be better to adjust your script to point to /usr/bin/perl.
If you need the script to run on various systems where perl might be
in /usr/bin or /usr/local/bin or somewhere else in the path, you could
also use /usr/bin/env perl or (I think) just perl.

All of this is on the first line of the perl script you're trying to
run, aka the shellbang, shebang, hashbang, etc.  It needs to start
with #!.  So one of these should work:

#!/usr/bin/perl
#!/usr/bin/env perl
#!perl

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Going to hell when I die would just be redundant.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20080625/5cc45f5a/attachment-0001.sig>


More information about the fedora-list mailing list