If I try and use the following piece of code:
#!/usr/bin/perl -w use strict; use diagnostics; use Tie::RegexpHash; my $rehash = Tie::RegexpHash->new(); $rehash->add( qr/abc/, "abc" ); $rehash->add( qr/def/, "def" );
I get the following warning:
Use of uninitialized value in string ne at /usr/local/lib/perl5/site_perl/5.8.0/Tie/RegexpHash.pm line 58 + (#1) (W uninitialized) An undefined value was used as if it were alread +y defined. It was interpreted as a "" or a 0, but maybe it was a mi +stake. To suppress this warning assign a defined value to your variables. To help you figure out what was undefined, perl tells you what ope +ration you used the undefined value in. Note, however, that perl optimiz +es your program and the operation displayed in the warning may not necessa +rily appear literally in your program. For example, "that $foo" is usually optimized into "that " . $foo, and the warning will refer +to the concatenation (.) operator, even though there is no . in your program.
Can anyone suggest what might be happening?
Thanks
Edit by tye to remove "cpan://" as noted by author
In reply to Problem with Tie::RegexpHash by sch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |