Skip to content

Instantly share code, notes, and snippets.

@lopnor
Created July 23, 2010 03:33
Show Gist options
  • Select an option

  • Save lopnor/486966 to your computer and use it in GitHub Desktop.

Select an option

Save lopnor/486966 to your computer and use it in GitHub Desktop.
#!perl
use strict;
use warnings;
use Encode;
binmode(STDOUT, ':utf8');
my $title = decode('utf-8', shift);
open my $fh, '<:utf8', 'regex.txt';
while (my $str = <$fh>) {
chomp $str;
my $regex = eval "qr/$str/";
$title =~ s/$regex//g;
}
print "$title\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment