LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Using perl (https://www.linuxquestions.org/questions/programming-9/using-perl-123570/)

akurtis 12-07-2003 12:57 PM

Using perl
 
Ive programmed in perl on windows. There you just ran i DOS prompt. How do i use perl in linux. I suppose it has something to do with the terminal but what commands do i run?

Thanks
Alex

david_ross 12-07-2003 01:06 PM

Quite simply "perl"

If you have a basic perl script you can spcify the interpreter on the shebang line:
Code:

#!/usr/bin/perl

print "Hello World!";

exit;

Make it executable:
chmod 700 /path/to/script.pl

Then run it:
/path/to/script.pl

akurtis 12-07-2003 01:10 PM

Thanks


All times are GMT -5. The time now is 08:36 AM.