in reply to Wiping Out Values

just something from the top of my head, you might try:

for $level (@achievement) { push @result, $level; print 'Result: ', join (' ', @result), "\n"; @result = () if ($level =~ /5$/); }

He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

Chady | http://chady.net/