Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The Problem with the above conditional is that it will only run &my_sub if all of the 5 array values have some value present in them.if (defined (@array[9..13]) and @array[9..13] ne "") { &my_sub (); }
I guess this will mean that i would have to look at each of these 5 first and do a loop of some kind on each one that is present. But when i tried to use a foreach my result screwed up.
Example
@array = ( name, address, age, date1, date2, date3, date4, date5); Take date1 .. date5; on each encountered date run spcial sub to process each date input(whi +ch you dont woory about).
Thanks Go-Juve
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: simple array condition
by broquaint (Abbot) on Apr 03, 2002 at 18:26 UTC | |
by Anonymous Monk on Apr 03, 2002 at 23:53 UTC | |
|
Re: simple array condition
by particle (Vicar) on Apr 03, 2002 at 18:24 UTC | |
by kappa (Chaplain) on Apr 04, 2002 at 14:31 UTC | |
by particle (Vicar) on Apr 13, 2002 at 14:53 UTC | |
|
Re: simple array condition
by Silicon Cactus (Scribe) on Apr 03, 2002 at 20:25 UTC | |
|
Re: simple array condition
by Anonymous Monk on Apr 03, 2002 at 18:54 UTC | |
by particle (Vicar) on Apr 03, 2002 at 19:16 UTC |