Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • ...but I did write something to find garbage consecutive records in a database (first record was positive, second was duplicate but negative), that went something like:
    my @comp_fields = qw(field1 field2 etc.);
    if (is_crap(\%old_rec, \%this_rec, @comp_fields) {
      ...delete the records
    sub is_crap {
      my $rec1 = shift;
      my $rec2 = shift;
      for my $field (@_) {
        return unless "-$rec1->{$field}" eq $rec2->{$field};