in reply to Modification of a read-only value attempted: MTOWTFI

Your "first fix" sets the variable as "e|e|e", since chop returns the chopped character. You should have ended the mapping block with a $a.

Being as lazy as I am, I would write the snippet as
my $PL_sb_C_en_ina = 'stam|foram|lum';

Bye

Antonio

The stupider the astronaut, the easier it is to win the trip to Vega - A. Tucket

Replies are listed 'Best First'.
Re: Re: Modification of a read-only value attempted: MTOWTFI
by BrowserUk (Patriarch) on Oct 15, 2002 at 11:14 UTC

    ++abell K.I.S.S wins in my book. It's hard to see why the code was written to set up an array of constants two chars longer than needed, then use a map to chop them down to size?


    Cor! Like yer ring! ... HALO dammit! ... 'Ave it yer way! Hal-lo, Mister la-de-da. ... Like yer ring!
Re: Re: Modification of a read-only value attempted: MTOWTFI
by grantm (Parson) on Oct 15, 2002 at 20:30 UTC

    Thanks for picking up the error - I had actually found and fixed the bug in my testing but apparently pasted in the broken version. Doh!

    As to why Damian chose to include a list of the full words and then incur the processing overhead of chopping them down, my best guess is to make it easier to maintain the list of words. A more efficient solution would be to generate the Lingua::EN::Inflect module (using the form you suggest) from the list of full words at the time the module was installed.