ginju75 has asked for the wisdom of the Perl Monks concerning the following question:
I am back :-)
I have the following code:
something...; something...; my @X = &values(); sub value{ open (R, "input") || die...; something..; something..; my @Y = ( ); return @Y; }
I need to populate @Y in the values subroutine based on some conditions.
For example, If something is true add an element to the array @Y.
hence Speaking, the array may sound like more of a dynamic array, which should get
loaded based on certain conditions (or based on contents of the input file), which can be provided by the user of the script file.
As you can see, the input file "input" can change. Based on its contents the array needs to be populated.
Help!
Thank you all for your wisdom.
The Learning Monk!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to populate an Array
by Masem (Monsignor) on Dec 06, 2001 at 00:46 UTC | |
|
Re: How to populate an Array
by sparkyichi (Deacon) on Dec 06, 2001 at 01:03 UTC | |
by baku (Scribe) on Dec 06, 2001 at 02:03 UTC | |
by demerphq (Chancellor) on Dec 06, 2001 at 15:58 UTC | |
|
Re: How to populate an Array
by dragonchild (Archbishop) on Dec 06, 2001 at 00:56 UTC | |
by frankus (Priest) on Dec 06, 2001 at 18:31 UTC |