in reply to Re: Running a long perl process
in thread Running a long perl process

Thanks for your help, one more problem, how do I pass parameters to mylongperlprogram.pl?
I tried -
exec '/path/to/perl', '-T', '/path/to/mylongperlprogram.pl', 'number=10' or die $!;
but number=10 is not passed.
when I type -
perl -T mylongperlprogram.pl number=10
on the command line it does work.
Whats my problem?

Replies are listed 'Best First'.
Re^3: Running a long perl process
by Zaxo (Archbishop) on Aug 24, 2004 at 00:11 UTC

    You are correct in the idea of passing parameters to the script via exec's argument list. Without knowing how your script handles arguments I can't say what's going wrong.

    You might try inserting some throwaway print or warn statements to see what the script thinks is happening. Look for the values in @ARGV.

    Do you still have the problem is you make your script executable and call it directly, instead of as an explicit call to perl?

    After Compline,
    Zaxo