jZed has asked for the wisdom of the Perl Monks concerning the following question:
UPDATE thanks to erix who pointed out that I should be using |, not ¦ in the regex. Problem goes away once that's fixed.# 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 ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Segfault with "use encoding"
by borisz (Canon) on Jan 23, 2005 at 22:44 UTC | |
|
Re: Segfault with "use encoding"
by talexb (Chancellor) on Jan 23, 2005 at 22:52 UTC |