=================================================================== RCS file: /cvs/openbsd/OpenBSDTorrents/ServerTorrents.pl,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- openbsd/OpenBSDTorrents/ServerTorrents.pl 2005/03/31 01:14:48 1.7 +++ openbsd/OpenBSDTorrents/ServerTorrents.pl 2005/04/01 01:20:15 1.8 @@ -1,5 +1,5 @@ #!/usr/bin/perl -T -#$Id: ServerTorrents.pl,v 1.7 2005/03/31 01:14:48 andrew Exp $ +#$Id: ServerTorrents.pl,v 1.8 2005/04/01 01:20:15 andrew Exp $ use strict; use warnings; use diagnostics; @@ -55,13 +55,13 @@ my %files; opendir DIR, $TorrentDir or die "Couldn't opendir $TorrentDir: $!"; foreach (readdir DIR) { + chomp; if (/^([^\/]+)$/) { $_ = $1; } else { die "Invalid character in $_: $!"; } next unless /\.torrent$/; - chomp; my ($name, $year, $mon, $mday, $hour, $min) = /^(.*)-(\d{4})-(\d{2})-(\d{2})-(\d{2})(\d{2})/;