> To: Perl Beginners > Cc: Ken Slater; Chris Stinemetz > Subject: Re: split function > > On 15/12/2011 16:09, Ken Slater wrote: > > > > I have not been following this too closely, but I don't understand > the > > algorithm used to get the above output. > > What is that Ken? If you don't understand the question then ask some > questions of your own!
I figured out what he wanted and posted regarding this in my second response. I was just confused at first because all his values appeared to be 5.5. > > > I would have named it @fieldValues since arrays usually hold multiple > > values > > Renaming variables will never fix a problem as long as 'use strict > "vars"' is in effect. It is a gesture towards better code and no more. > True. I did not say it would fix his problem. > >> my @apxScript=(@headerNames, @fieldValue); print Dumper > >> \@headerNames; print Dumper \@fieldValue; print Dumper \@apxScript; > > > > HTH, Ken > > This is the source of the OP's misunderstanding, yet you make no > comment at all. > > Rob > The source of his problem was that he was not saving or printing the @fieldValue array (again I would have preferred @fieldValues :-) ) inside the loop. Which I pointed out. Ken -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/