At 19:17 2002.03.04, Jeff 'japhy' Pinyan wrote: >>my @records; >>open FILE, "yourfile" or die "Can't open file your; >> >>push @records, split /\|/ while(<FILE>); >> >>close FILE; > >You mean > > push @records, [ split /\|/ ] while <FILE>; > >You want to construct an array reference. > >>@records = ( [ "f", "Axe Strike", "d" ], >> [ "f", "Disquiet of our people", "p" ], >> [ "f", "Dwarven Armor", "p" ] ); > >Well, except that the last field will have a newline in it!
As usual, you're right. It should have been push @records, [ split /\|/, chomp($_) ] while <FILE>; Thanks for the correction Jeff. ---------------------------------------------------------- Éric Beaudoin <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]