in reply to Problem with Tie::RegexpHash

When I run it I get this:

syntax error at test.pl line 6, near "use cpan:" Execution of test.pl aborted due to compilation errors (#1) Uncaught exception from user code: syntax error at test.pl line 6, near "use cpan:" Execution of test.pl aborted due to compilation errors.

Update: The parent node has been edited making this node irrelevent.

Replies are listed 'Best First'.
Re: Re: Problem with Tie::RegexpHash
by sch (Pilgrim) on Oct 10, 2002 at 17:04 UTC

    Oops, I was trying to link the text in the example to the CPAN search engine which didn't work and I thought I'd removed all trace of the tags - obviously not. The code example should read:

    #!/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" );