if ( my $lost = @snapshot_listing - keys %snapshot_roster ) { warn sprintf( "There were %d bad entries in %d input records\n", $lost, scalar @snapshot_listing ); } #### my @bad_entries; sub nfg { push @bad_entries, $_; return } my %snapshot_roster = map { m[(snap-\S+).*+-(\d+)$] ? ($1,$2) : nfg() } @snapshot_listing; if ( @bad_entries ) { warn "oh well... win some, lose some.\n" }