siddheshsawant has asked for the wisdom of the Perl Monks concerning the following question:
UPDATED:
Hello Monks,
good morning !!!
Sorry,My previous version of this question was little misleading so I am re framing it again.
I am working on perl project where I have to test whether the array is empty or not and depending on that I have to an action.The pseudo code for that is like this:
If(all the elements of @array contains ){ ## Take some action. } else { ## Do something else. }
If my array contains elements like then I have to take some action.I have used ($array[0] eq " ") in the if condition.Is it a right way to do ? If any body knows about it then kindly let me know about.
Thanks in advance !!!!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: To test empty array in perl
by toolic (Bishop) on Apr 26, 2010 at 14:53 UTC | |
|
Re: To test empty array in perl
by Sandy (Curate) on Apr 26, 2010 at 15:36 UTC | |
|
Re: To test empty array in perl
by Ratazong (Monsignor) on Apr 26, 2010 at 14:55 UTC | |
| |
|
Re: To test empty array in perl
by FunkyMonk (Bishop) on Apr 26, 2010 at 16:11 UTC | |
|
Re: To test empty array in perl
by nvivek (Vicar) on Apr 27, 2010 at 04:19 UTC | |
by nagalenoj (Friar) on Apr 27, 2010 at 04:44 UTC |