while () { push(@hold1, $1) && last if (m/(\w+\.bld)(?!.*?#)/); } my $hold11 = join(' ', @hold1);