in reply to Re: Dynamic array names
in thread Dynamic array names
and you get a list of copies of the last row. Why is it going wrong, and how would you fix?while (<CSV>) { chomp($_); @row = split /,/, $_, -1; push @data, \@row; }
When I ask this I am willing to answer any and all questions about syntax, what constructs do, etc. I stand willing to say what the output will be as they make various modifications to the code. The point isn't familiarity with Perl, it is whether you understand how references work.
Perhaps not surprisingly, I find that people coming from a C background (where you use pointers a lot) tend to do better on this than people who started by learning Perl for scripting/CGI/etc.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (tilly) 2: Dynamic array names
by arturo (Vicar) on Feb 09, 2001 at 23:30 UTC | |
by Fastolfe (Vicar) on Feb 10, 2001 at 02:12 UTC | |
by tilly (Archbishop) on Feb 10, 2001 at 02:37 UTC | |
by Fastolfe (Vicar) on Feb 10, 2001 at 03:07 UTC | |
by tilly (Archbishop) on Feb 10, 2001 at 04:18 UTC | |
by tilly (Archbishop) on Feb 09, 2001 at 23:48 UTC |