4

Perl Setup on Linux

view full story
linux-howto

http://www.linuxquestions.org – Hi, I'm a Linux newbie and I have a bit of an annoying problem with running Perl scripts in Linux. My system is Ubuntu (Karmic Koala distro) and the problem I have is that Perl scripts I have written do not seem like they are being associated with the perl executable when I try to run them in a terminal. Basically I want to run a Perl script like the following command: % hello_world.pl But I am forced to run it as the following: % perl hello_world.pl The problem would seem at first to be with my shebang line. However, I am fairly confident that this is set up correctly. If I run the following, perl -e 'print "$^X\n;"', I can see that the path to the interpreter is 'usr/bin/perl'. Thus my shebang is #!/usr/bin/perl. Yet running 'hello_world.pl' gives the following response : hello_world.pl: command not found I am stuck. Do people reckon the problem is due to me not setting up my .bashrc file correctly? Why doesn't Linux recognise, or associate, my shebang with the perl executable? Many thanks in advance, (HowTos)