use List::MoreUtils qw(any);
use File::Spec;
-my @RE_IGNORED = map {
- s/\./\\./g;
- s/\+/\\+/g;
-
- s/\?/.?/g;
- s/\*/.*?/g;
-
- qr/^$_$/;
- }
- grep {length}
- map {tr/\n//d; $_}
- <DATA>;
+my @RE_IGNORED = do {
+ open my $fh, '<', 'IGNORE' or die $!;
+ map {
+ s/\./\\./g;
+ s/\+/\\+/g;
+
+ s/\?/.?/g;
+ s/\*/.*?/g;
+
+ qr/^$_$/;
+ }
+ grep {length}
+ map {s/^\s*#//; $_}
+ map {tr/\n//d; $_}
+ <$fh>;
+};
main();
}
@d;
}
-
-__DATA__
-*~
-.*cache*
-.*history*
-.CFUserTextEncoding
-.DS_Store
-.ICEauthority
-.MacOSX
-.Trash
-.Xauthority
-.cabal
-.cpan
-.dbus
-.dvdcss
-.easytag
-.elisp
-.esd_auth
-.emacs.d
-.eshell
-.firefox
-.fontconfig
-.fonts
-.gconf*
-.gimp*
-.glimpse*
-.gnome2*
-.gnucash
-.gnupg
-.gstreamer-0.10
-.htpasswd
-.ido.last*
-.jungledisk*
-.kde
-.localized
-.mozilla
-.mpd
-.mplayer/DVDKeys
-.mplayer/skins
-.nautilus
-.navi2ch/*.net
-.navi2ch/*.com
-.nh-todo
-.pan
-.projects.ede
-.qt
-.recently-used*
-.rnd
-.s9x
-.scribus
-.skk-*
-.snes*
-.ssh
-.thumbnails
-.tome
-.trackballs
-.uim.d
-.unison
-.viminfo
-.w3m/bookmark.bak.html
-.w3m/config
-.w3m/*arrived
-.w3m/*cookie
-.w3m/*sessions
-.wine
-.xchat2*
-.zcomp*
-.zfunc