LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I execute .pl files in Mandriva 10.2? Will someone please answer me this time? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-execute-pl-files-in-mandriva-10-2-will-someone-please-answer-me-this-time-349814/)

IanPappas 08-04-2005 01:43 AM

How do I execute .pl files in Mandriva 10.2? Will someone please answer me this time?
 
How do I execute .pl (perl files)? I know how to open them in Kate or KWrite, but how do you execute the actual file? I know in Windows you can type "cd desktop",then, "perlfile.pl". and it runs it, but now when I do "cd Desktop" in Konsole, then "./perlfile.pl", it says "bash: ./xxxx.pl: Permission denied". Any suggestions?

volvogga 08-04-2005 01:55 AM

I know that python programs are run by typing 'python python_program.py', so my first thought was to type 'perl perl_program.pl'. If you go to the following site...

http://www.ku.edu/~keds/software.dir/whyperl.html

this seems to be confirmed under the section 'Running Programs on UNIX Machines'.

Hope this helps.

IanPappas 08-04-2005 02:01 AM

Aha! Thankyou very much.

ethics 08-04-2005 06:57 AM

that fixed the problem?

if not it looks to me like you don't have the execute permissions set.

man chmod can help here or chmod +x <file> to get you started quickly.

abisko00 08-04-2005 07:25 AM

If the script has the correct interpreter set in the first line (e.g. #!/usr/bin/perl) and the script is located in your path and you made it executable (like ethics explained), you can run the script directly from commandline. Otherwise volvogga's method has to be used.


All times are GMT -5. The time now is 12:51 AM.