http://qs321.pair.com?node_id=524088

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

Hello,

Here is my code:

exec ("/path/to/file/filename.cgi"); CORE::exit 1;

This works fine. However how can I call subroutine of filename.cgi?

In other words. With URL ...filename.cgi?action=task1 I call subroutine task1

How to do the same with exec()? This obviously gives an error:

exec ("/path/to/file/filename.cgi?action=task1");

Also, how can I path parameters to filename.cgi with exec()?

Such as I want to path $color=green

Thank you

Edited by planetscape - added code tags and formatting