Stories
Slash Boxes
Comments
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.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Crazy as it may seem, it seems about the simplest way to partition negative zero with all the other negative numbers. But I doubt that the original author had that in mind :-) [or should that be :-(]

  • ...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};
      }
      1;
    }