in reply to getting 0 to print
In addition to other changes, you may want to write trim like this:
sub trim { my @out = wantarray ? @_ : shift; return "" unless @out; for (@out) { $_ = "" => next unless defined; tr/|\n\r//d; s/^\s+|\s+$//g; } return @out; }
— Arien
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: getting 0 to print
by rbc (Curate) on Jan 13, 2003 at 23:32 UTC | |
by Arien (Pilgrim) on Jan 14, 2003 at 00:08 UTC |