Mistři v programování na #hovnokod

Perl #2464

Tohle jsme nasli v nastroji pro prohledavani maillogu :)

  ($#ARGV>0) && ($logfile=$ARGV[1]);

# HYPER MEGA NASTY HACK - due to idiocy and kretenism of the original programmer
# of this megashit! Bastard!

  if($logfile =~ /maillog.0.gz$/){
    $logfile = "/var/log/mail.log.1";
  } elsif($logfile =~ /maillog.([0-9]+).gz$/){
    my $ln = $1 + 1;
    $logfile = "/var/log/mail.log.".$ln.".gz";
  }

# END OF HYPER SUPER DAMN HACK

  foreach($logfile) {

Anonymous,