for (@foo) { print; shift(@foo) if $_ eq 'c'; } print "\n@foo\n";