Running Perl scripts under Linux. Can you help?

joseph

New member
I'm running Mandriva Linux (2008) (on a VMWare virtual machine).
I'm having trouble running Perl scripts on this setup.
Before you jump and the answer and tell me to include the Perl shebang (#! /usr/bin/perl), please know that I've already included it and it isn't working. The only way I could find to run Perl scripts is to type:
perl script.pl
But I don't want this. I want to be able to invoke my script directly, like so:
script.pl
If I type:
script.pl
I get the following error:
bash: script.pl : No such command

Does the virtual machine have anything to do with this? How can I set up my Perl scripts so they can be invoked directly?
The odd thing is, in the /bin directory of one of my applications I found Perl scripts that could be invoked directly. When I tried copying these scripts to another directory, they didn't run unless I type:
perl scriptname.pl
 
Back
Top