LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   perl programing (https://www.linuxquestions.org/questions/linux-newbie-8/perl-programing-595023/)

mobs99 10-27-2007 09:45 AM

perl programing
 
im not sure if im in the right forum for this but anyhooo

how do i find the shabang line when programing in perl..

The_JinJ 10-27-2007 09:49 AM

Do you want to find all lines with #! or do you need to know how to determine what will be used as the shebang for a perl script?

matthewg42 10-27-2007 10:04 AM

The shabang is by definition the first line of the file.

mobs99 10-27-2007 10:12 AM

neil i need to know how to determine what will be used as the shebang for a perl script.. which is the 1st line in the actualy program...

The_JinJ 10-27-2007 10:20 AM

Use
Code:

which perl
So on my system it would be something like

Code:

#!/usr/bin/perl perl -w

mobs99 10-27-2007 10:26 AM

do i type that ina terminal windown??

mobs99 10-27-2007 10:36 AM

all done mate cheers.... wooho made me 1st lil program inalll.....

The_JinJ 10-27-2007 10:36 AM

Quote:

Originally Posted by mobs99 (Post 2938765)
do i type that ina terminal windown??

Type it at the command prompt - eg on my system

Code:

neil@OpenSuse:~> which perl
/usr/bin/perl



All times are GMT -5. The time now is 10:43 PM.