mildewhall has asked for the wisdom of the Perl Monks concerning the following question:
Here's an example of my user-specific code:common code; include $ARGV[0].code; more common code;
Problem is, I am not aware of an "include" facility in Perl (called include), and can't think of an obvious workaround. The problem as I see it is that the code segment needs to be pulled in and executed as patr of the main script: will this work ? TIAif ( m/(\S+),(\S+),(\S+),(\S+),(\S+),(\S+)/o ) { @fields = split(/,/); $CLI = $fields[0]; $key = $fields[1]; $product = $fields[2]; $quantity = $fields[3]; $price = $fields[4]; $salesdate = $fields[5]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How can i "include" an executable section of code
by Zaxo (Archbishop) on Jan 13, 2004 at 09:34 UTC | |
by mildewhall (Initiate) on Jan 13, 2004 at 10:08 UTC | |
|
Re: How can i "include" an executable section of code
by davido (Cardinal) on Jan 13, 2004 at 09:36 UTC | |
by DrHyde (Prior) on Jan 13, 2004 at 11:03 UTC | |
by mildewhall (Initiate) on Jan 14, 2004 at 11:28 UTC |