# cat > MyEncode.pm package MyEncode; my $re = '(?:\.|\.\.¦\/)'; sub test { return 1 if $_[0] =~ /^$re/;} 1; # cat > MyEncode.pl #!/usr/bin/perl -w use strict; use encoding 'latin2'; use MyEncode; print "ok!" if MyEncode::test('./foo'); # ./MyEncode.pl Compilation segmentation fault at ...