Don't ask to ask, just ask | |
PerlMonks |
Regex's and Multidimensional Arraysby Mad_Mac (Beadle) |
on Sep 15, 2010 at 15:16 UTC ( [id://860230]=perlquestion: print w/replies, xml ) | Need Help?? |
Mad_Mac has asked for the wisdom of the Perl Monks concerning the following question: I'm still learning Perl, and my current effort is trying to learn how to manipulate elements within a multidimensional array. Specifically, I'd like to loop over a number of arrays, performing the same operation on all the elements of all the arrays. For a test problem I have 2 arrays: and I want to make all of the letter "e"'s upper case. (e->E) So, I tried this: but, obviously it only updates the values in the new array @vars and not the @days or @cols arrays. Then I tried using array references
@vars=( \@days, \@cols); Is there a simple way to do this? Thanks
Back to
Seekers of Perl Wisdom
|
|