P is for Practical | |
PerlMonks |
Re: Validating the contents of scalars using an array based listby Super Monkey (Beadle) |
on Apr 03, 2003 at 17:28 UTC ( [id://247818]=note: print w/replies, xml ) | Need Help?? |
Because you have to check for all null values, you will have an O(n) solution. I don't think you can improve much on you approach, other than rolling some step together into one liners. Check out splice(), it could simplify the parameter to scalar assignments for you.
In Section
Seekers of Perl Wisdom
|
|