in reply to need help with array

Using foreach in simple terms using simple language, in case you don't understand the above:

use warnings; use strict; my @word = qw/ ONE TWO THREE FOUR/; foreach my $lcword (@word) { $lcword = lc($lcword); } print "@word";

HTH.

Walking the road to enlightenment... I found a penguin and a camel on the way.....
Fancy a yourname@perl.me.uk? Just ask!!!

Replies are listed 'Best First'.
Re^2: need help with array
by holli (Abbot) on Jul 18, 2005 at 09:24 UTC
    Your code does not use a second array as it is the question of the OP. And it does use the aliasing mechanism of the foreach loop. Maybe you should have mentioned that? I mean, it confuses me from time to time. How is it for a newbie?


    holli, /regexed monk/