Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am migrating tcl/tk application from Hp Unix to windows.one of tcl/tk script contain following line of statement.

-command {exec ksh -c "$path/startexp.pl http://www.perl.com/down +load.csp" &}

I am calling the tcl scripts using the perl in windows as well as unix.

startexp.pl contain the following code.
-------------------------------

$url = ARGV[0]; if (win32) { system("iexplore $url"); } elseif (hpunix) system("mozilla $url"); }

--------------------------------------------------
1) In windows I am able to open the url using the statement given below .

-command {exec cmd /c "$path/startexp.pl http://www.perl.com/dow +nload.csp" &}
2) In unix I am not able to get the url which I am passing along with startexp.pl
-command {exec ksh -c "$path/startexp.pl http://www.perl.com/down +load.csp" &}

I am not able to find the reason why I could not url when running in unix.

The way I am calling is correct or not?
In unix shall I use ksh -c when script calling using perl.
Is there any alternative to ksh -c ?

Please suggest and help me towards this.

With Regards,
mathi

20050309 Janitored by Corion: Added formatting

Replies are listed 'Best First'.
Re: calling the tcl scripts using perl in Hp Unix
by RazorbladeBidet (Friar) on Mar 09, 2005 at 15:47 UTC
    What happens when you run ksh -c "$path/startexp.pl  http://www.perl.com/download.csp" by hand in UNIX?

    If you're having problems with that - check to see what the url is in the Perl script

    Can you run "mozilla http://www.perl.com/download.csp" from the command line? Hardcoded in the Perl script?
    --------------
    It's sad that a family can be torn apart by such a such a simple thing as a pack of wild dogs