in reply to Re: Execution KSH Script from Perl
in thread Execution KSH Script from Perl

Rather than writing a subroutine to do the job, you could use Perl's quoting constructs. They also avoid the need to escape the double quotes you are wrapping around the string.

$ perl -le ' > $seq_num = 1234; > $quoted_seq_num = qq{"$seq_num"}; > print qq{$seq_num - $quoted_seq_num};' 1234 - "1234" $

The code would become

$return_val = system($grph_gen_multi_seq, $data_source_contents[2], qq{"$data_source_contents[2]"}, $seq_num, qq{"$seq_num"}, $data_source_contents[1]);

Cheers,

JohnGG