in reply to Best method of munging CSV data - using Text::CSV::Simple?
The @data that you get from Text::CSV::Simple is an array of array references. That means that each item in the array is itself a reference to an array composed of three fields. That means you need to derefernce it to get at the fields like this:
If I've misunderstood the part you're having a problem with, let me know.for my $row(@data){ my($smtp,$user,$server) = @$row; # munge $stmp next unless $smtp; # munge $user and $server # recombine them into a string # write the string to a file }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Best method of munging CSV data - using Text::CSV::Simple?
by billie_t (Sexton) on Feb 08, 2006 at 06:23 UTC | |
|
Re^2: Best method of munging CSV data - using Text::CSV::Simple?
by Scott7477 (Chaplain) on Feb 05, 2007 at 23:02 UTC |