On Saturday, February 1, 2003, at 07:43  PM, Perl wrote:

foreach (split(/,/)) {
	/(\w+)_\w+/;
	$group{$1}++;
}

One simple change to get your desired result would be:

	$group{$1}++;
to
	push @{ $group{$1} }, $_;

The array reference will autovivify.

_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to