#!/usr/bin/perl -w use strict; my @a = qw( a b c d ); my $i=0; my @b = grep { push(@a,'!') if !$i++; 1 } @a; print "@b\n"; print "@a\n"; __END__ output: a b c d a b c d !