my( @fruit, @meat, @dairy ); while (<>) # input redirected appropriately { chomp; my( $category, $item ) = split /\t/; push ???$category???, $item; # what now?? }