in reply to Re: Perl 5.6.1 Regular Expression problems (UTF8 ?)
in thread Perl 5.6.1 Regular Expression problems (UTF8 ?)

Replacing '\w' by 'a-zA-Z' seems to do it - One step closer to the solution :)
Pitr
  • Comment on Re: Perl 5.6.1 Regular Expression problems (UTF8 ?)

Replies are listed 'Best First'.
Bug Isolated was: Re: Re: Perl 5.6.1 Regular Expression problems (UTF8 ?)
by Pitr (Novice) on Jul 18, 2001 at 17:04 UTC
    perl -wle 'BEGIN { $SIG{__DIE__} = sub { print "Catched SIGDIE: @_";ex +it(-1) }} use utf8; /^\w$/;'

    Results in:
    Catched SIGDIE: Can't locate object method "IsWord" via package "main" + (perhaps you forgot to load "main"?) at /usr/local/lib/perl5/5.6.1/u +tf8_heavy.pl line 30.

    This code illustrates the problem: the eval() done by utf8_heavy.pl fails and calls the die-handler which is set within the BEGIN block. I think this should not happen, because the 'die' within eval() is in a different scope than the position where the Die-handler is set.
      Actually, according to the documentation, this is correct behavior. Die handlers carry over into evals.