Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: An Elegance Questionby chromatic (Archbishop) |
on Apr 13, 2000 at 23:12 UTC ( [id://7518]=note: print w/replies, xml ) | Need Help?? |
On the ridiculous end of the scale, why not a hash of arrays? If you're going to use your WORDS in order:
Then, when you do your substitution: $story =~ s/[(NOUN|VERB|ADJ)]/shift @{ $words{$1} }/eg; I wouldn't do it this way, but it's food for thought.
In Section
Seekers of Perl Wisdom
|
|