in reply to Re: Re: Re: reading data ...
in thread reading data ...

Thanks. Now I'll make a few comments and corrections.   my @data = (); That assignment isn't necessary. Arrays start out empty!      s/\"//g; That backwhack isn't necessary. Quote marks are literal in any quoted string that uses some other delimiter.      push @data, [ $_ ]; That isn't equivalent and won't work for the OP's purpose.
You still need to split the string on commas.
You could do it this way:
my @a = split /,/; push @data, \@a;

jdporter
...porque es dificil estar guapo y blanco.

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: reading data ...
by hmerrill (Friar) on Dec 18, 2002 at 16:40 UTC
    Thanks for the corrections!

    One question:
    push @data, [ $_ ]; That isn't equivalent and won't work for the OP's purpose. You still need to split the string on commas.
    Wasn't the OP looking for a solution that would put each *record* from <DATA> into an anonymous array reference, and then put that anonymous array ref into the @data array? If that is the goal, then why would you need to split the record on comma's?