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.
|