The UNIX and Linux Forums  


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
Get return value from PERL script calling from KSH ucbus Shell Programming and Scripting 1 03-01-2009 08:30 AM
Calling Expect script in Perl... ramkriz Shell Programming and Scripting 4 08-21-2008 01:11 AM
Calling Winzip from perl script MobileUser Shell Programming and Scripting 5 04-04-2007 04:51 AM
calling a shell script from perl gurukottur Shell Programming and Scripting 3 10-05-2006 12:48 PM
calling a C executable from inside a Perl script mark_nsx Shell Programming and Scripting 3 10-07-2005 06:49 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-01-2009
namishtiwari namishtiwari is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2007
Location: Bangalore
Posts: 377
calling problem in perl script

Hi ,

Here is my piece of code--


Code:
main();
sub main
{
	$result = GetOptions ("LogDir=s" => \$LogDir,
                          "Summary"   => \$Summary,   
                          "Indiviual=s"   => \$Individual ,       
					      "Diagnostics=s"	=> \$Diagnostics,
					      "Prefix=s" => \$Prefix,
					      "All"  => \$All,
                          "help"  => \$help); 
	usage_help() 	if($help);
	usage_help()    unless($Prefix);
	usgage_help()   unless($LogDir);
		
if($LogDir)
{
	die "Log dir '$LogDir' doesn't exist" unless -d $LogDir;
}

$glob_path = "$LogDir/${Prefix}*";
@log_paths = glob $glob_path or die "No files found in '$glob_path'";
printf "log files = \n";
print @log_paths;
printf "\n";

if($Summary)
{
	process_summaryreport ();
}

if($Individual)
{
	if($Individual == "ArcotID")
	{
		ArcotID_Authentication(@log_paths);
	}
}
}

I am calling the script as--

Code:
C:\Perl Script>perl summaryreport_latest_working.pl --LogDir=. --Prefix=arcotweb --Individual=ApricotID

It does not show me any output.
I think the problem lies here but not sure.

Code:
if($Individual)
{
	if($Individual eq "ArcotID")
	{
		ArcotID_Authentication(@log_paths);
	}
}

Individual can take diffrent arguements one of them is ApricotID, other may be QnA and OTP or all, so depending on the arguement i want to call the respective function.



Thanks
NT

---------- Post updated 07-01-09 at 01:33 AM ---------- Previous update was 06-30-09 at 11:16 AM ----------

Hi,

I got it working, Thanks anyway.


Thanks
nt

Last edited by Yogesh Sawant; 07-01-2009 at 03:31 AM..
  #2 (permalink)  
Old 07-01-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,891
What was the solution?
Reply

Bookmarks

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 01:52 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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