LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-27-2007, 10:45 AM   #1
mobs99
Member
 
Registered: Oct 2007
Posts: 30

Rep: Reputation: 15
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..
 
Old 10-27-2007, 10:49 AM   #2
The_JinJ
Member
 
Registered: Apr 2004
Location: Scotland
Distribution: Suse, OpenWRT
Posts: 299

Rep: Reputation: 30
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?
 
Old 10-27-2007, 11:04 AM   #3
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
The shabang is by definition the first line of the file.
 
Old 10-27-2007, 11:12 AM   #4
mobs99
Member
 
Registered: Oct 2007
Posts: 30

Original Poster
Rep: Reputation: 15
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...
 
Old 10-27-2007, 11:20 AM   #5
The_JinJ
Member
 
Registered: Apr 2004
Location: Scotland
Distribution: Suse, OpenWRT
Posts: 299

Rep: Reputation: 30
Use
Code:
which perl
So on my system it would be something like

Code:
#!/usr/bin/perl perl -w
 
Old 10-27-2007, 11:26 AM   #6
mobs99
Member
 
Registered: Oct 2007
Posts: 30

Original Poster
Rep: Reputation: 15
do i type that ina terminal windown??
 
Old 10-27-2007, 11:36 AM   #7
mobs99
Member
 
Registered: Oct 2007
Posts: 30

Original Poster
Rep: Reputation: 15
all done mate cheers.... wooho made me 1st lil program inalll.....
 
Old 10-27-2007, 11:36 AM   #8
The_JinJ
Member
 
Registered: Apr 2004
Location: Scotland
Distribution: Suse, OpenWRT
Posts: 299

Rep: Reputation: 30
Quote:
Originally Posted by mobs99 View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I need some socket programing in C help tomazN Programming 6 12-08-2005 12:35 PM
Programing Forum bertlef LQ Suggestions & Feedback 2 01-07-2005 02:11 PM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 09:09 PM
C++ GUI programing calble Programming 6 10-10-2003 01:25 PM
Java programing VincentB Linux - Software 3 07-14-2003 08:17 PM


All times are GMT -5. The time now is 08:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration