All pastes #622943 Raw Edit

Mine

public text v1 · immutable
·published 2007-07-17 07:19 UTC
rendered paste body
 unless($SETTINGS{nodump} =~ /^(?:y|t|1|on)/i) {
  if(open(PLAYLIST,"<",$SETTINGS{winampdir}."/winamp.m3u")) {
   my $count = 0;
   my @playlist = <PLAYLIST>;
   close(PLAYLIST);
   chomp(@playlist);
   foreach my $item (@playlist) {
    if($item =~ /^\#/) { next };
    if($count == $track) {
     $filename = $item;
     $filesize = (stat($filename))[7];
     last;
    }
    $count++;
   }
   if($SETTINGS{allowdownload} =~ /^(?:y|t|1|on)/i) {
    if(defined($filename)) {
     $astring =~ s/\<\/{0,1}SERVER\>//g;
     $astring =~ s|\%E|{ sprintf("%.2fmb",($filesize / 1048576)) }|eg;
    }
   }
  }
 }