in reply to Re: lc entire contents of array?
in thread lc entire contents of array?
my @array = qw(HELLO THERE FELLOW PERL MONKS); @array = (lc "@array"); print @array; print $array[2]."\n";
Everything is in $array[0], as you have an array of one element that contains a string. It's better to SWIM than DWIM -- "say what I/you mean", don't hope for Perl to "do what I/you mean", and your software will have less bugs. You could make this all work with split to reseperate things, but that's evil... don't do that.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: lc entire contents of array?
by disciple (Pilgrim) on Mar 30, 2004 at 20:00 UTC |