How to execute a PL file in Linux?

I have a vmware-install.pl file that I need to execute. I double click it but Linux will open it in a text editor for editing. How to execute this file? Can it be done from GUI?
In file's properties says "allow executing file as program".

I have Fedora 18.


Update:
I managed to open the console and navigated to my folder. I have poked:

chmod +x vmware-install.pl
vmware-install.pl 

the last line says:

vmware-install.pl command not found...

but 'ls' lists the file there....


Solution 1:

Run this instead:

./vmware-install.pl 

The ./ refers to the current directory.

If you run it without ./, Linux will look for a program called vmware-install.pl in your executable path, but the current directory is never in the path by default (for security reasons).

Solution 2:

"How to execute a PL file in Linux?"

A PL file in Linux (filename ending with .pl) is very likely a Perl-program. So run it with perl like this:

perl vmware-install.pl

It's often also possible to just:

./vmware-install.pl        #or:
where/the/file/is/vmware-install.pl

But this requires the execution bit (a chmod +x attribute) to be set on vmware-install.pl and also Perl must be installed on your Linux where the first line says (head -1 vmware-install.pl). If perl vmware-install.pl doesn't work, there might be two explanations for that: 1) your system don't have perl installed (unlikely on linux) or 2) perl is not installed in any of the folders in the $PATH environment variable. Try:

echo $PATH
perl vmware-install.pl
/usr/bin/perl vmware-install.pl
/usr/local/bin/perl vmware-install.pl
/whereever/your/system/has/perl vmware-install.pl
sudo yum install perl        #to install perl on Redhat, RHEL, CentOS etc
sudo apt-get install perl    #to install perl on Ubuntu, etc

Solution 3:

From the GUI:

  1. Right-click on the folder and click "Open in Terminal"
  2. Type ./vmware-install.pl