Oi,
Recently, the machine I am developing my perl applications on has been upgraded and now has perl 5.6.1.
Today, when I tried one of my (webbased) applications I noticed that some functions did not work anymore.
Whenever the following line of code is reached:
[...]
if($value =~ /^$allowed$/){
[...]
The program exits with the following error:
Can't locate object method "IsWord" via package "main" perhaps you for
+got to load "main"?) at /usr/share/perl/5.6.1/utf8_heavy.pl line 30.
The $value is a string given by the user, which is validated using a regular expression stored in $allowed.
According to the perldelta manual page, perl 5.6.1 introduces UTF8 support. I understand that this feature is still experimental, but that should not change the workings of regular expressions.
My $Question = What am i doing wrong?
Thanks in advance,
- Pitr
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.