On 3/12/07, yitzle <[EMAIL PROTECTED]> wrote:

Have the data in an array and do
i = 0;
foreach (@text) {  $text2[i++] = $_ if (! m/^\s$/);  }

If you had remembered to put a dollar sign on $i, you'd be reinventing grep:

 my @text2 = grep ! /^\s$/, @text;

Cheers!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to