RE: [Perl-unix-users] need help with -------- matrices

2004-02-05 Thread Markham, Richard
Thanks much for your detail explanation. What if I'm doing a fetch (array refs) within a while loop and want to assign them to a maxtrix each loop? before (in my another large clunky program i have written) I simply fetch and print in the same loop. Now that I am incorporating your code help for

RE: [Perl-unix-users] need help with matrix's

2004-02-05 Thread Thomas, Mark - BLS CTR
> also the @$line is confusing to me since I thought @ implied > a whole array thus meaning an array reference so I cant seem > to explain how @$ works. It's a dereference. In other words, if $line is a reference to an array, then @$line retrieves the original array. You can also write it @{$li

Re: [Perl-unix-users] need help with matrix's

2004-02-05 Thread $Bill Luebkert
Markham, Richard wrote: > this explained just about everything and was 10 times less confusing than my > own broken code. > where I really get confused in Perl is different situations will return > ARRAY reference and > others will return the element. > > as an example (printf is obviously better

RE: [Perl-unix-users] need help with matrix's

2004-02-05 Thread Markham, Richard
this explained just about everything and was 10 times less confusing than my own broken code. where I really get confused in Perl is different situations will return ARRAY reference and others will return the element. as an example (printf is obviously better), if i were to do a print @$line . "

[Perl-unix-users] need help with matrix's

2004-02-05 Thread Markham, Richard
use strict; use warnings; my @newarray; my ($xnumvar,$xvar,$ynumvar,$yvar,@maxlength); my @newmatrix=(["123.45","JOHN DOE","Coal Miner"], ["12.45","MR. PEANUT","peanut"], ["4.1","Bill Clinton","unknown"]); # iterate through each element and gather maximum character length for