in reply to lc entire contents of array?

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Re: lc entire contents of array?
by flyingmoose (Priest) on Mar 30, 2004 at 19:47 UTC
    No, you only think it works!

    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.

      oops! Thanks for setting that straight flyingmoose. That is a direct result of me not thoroughly testing my code.