The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
here document to automate perl script that call script hogger84 Shell Programming and Scripting 3 10-22-2007 10:15 AM
Have a shell script call another shell script and exit heprox Shell Programming and Scripting 2 11-20-2006 08:17 AM
Wget call in a Perl script rahulrathod UNIX for Advanced & Expert Users 1 12-28-2005 06:45 AM
how to call a perl script from tcsh? megastar Shell Programming and Scripting 1 10-22-2005 05:48 PM
how can call perl script as command? umen UNIX for Dummies Questions & Answers 1 10-14-2005 09:43 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-30-2007
anumkoshy anumkoshy is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 26
How to call a perl script from a shell script

I have a perl script,Test.pl

which needs arguments from command line like test.pl arg1 arg2 arg3

how can i call it from a shell script
  #2 (permalink)  
Old 08-30-2007
ranj@chn ranj@chn is offline Forum Advisor  
Playing with Ubuntu Now!
  
 

Join Date: Oct 2005
Location: Chennai
Posts: 365
Question may be this

I am new to perl. But may be this is the syntax
Code:
perl -w test.pl arg1 arg2 arg3
  #3 (permalink)  
Old 08-30-2007
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
ranj@chn, you are correct.

Optionally, you can set execute permission to the perl script, add the following line as first line in the script:
Code:
#!/usr/bin/perl -w
and then call it as:
Code:
test.pl arg1 arg2 arg2
Sponsored Links
Closed Thread

Bookmarks

Tags
perl script

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 12:21 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0