my @f; while ( $_ = scalar @f ? shift @f : ) { chomp; unshift(@f,"hi test test") if condition; }