0

Perl code is looks like --

sub report_generation($)
{

Shell_sh $ARGV[0] $conn_string $pm_dir/$FILE

}

$ARGV[0] -- > command line argument of perl script

$conn_string --> used in perl script value define in perl script 

my $USR=$ARGV[1];
my $PSS=$ARGV[2];
my $INS=$ARGV[3];
my $conn_string=$USR."/".$PSS."\@".$INS; 


$pm_dir/$FILE --> want to give file name with file path "$pm_dir/$FILE"


my $pm_dir="$ENV{'ABP_PM_ROOT'}/interfaces/output/report/$date";
my $FILE= 'FILE_NAME_'.$ARGV[0].'_'.get_timestamp().'.dat';


my $db_conn =DBI->connect( 'dbi:Oracle:'. $INS, $USR, $PSS, {AutoCommit => 0 })|| ExitProcess4 (1,$Function_Name ,$DBI::err, $DBI::errstr );

report_generation($db_conn);

2 Answers 2

2

See system() or ``

Sign up to request clarification or add additional context in comments.

Comments

2

Use an array to hold the arguments, and then:

system @array;

There are a number of advantages to that mechanism - notably that you do not have to escape everything to prevent the shell interpreting the arguments before you call it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.