Perl Monk, Perl Meditation | |
PerlMonks |
Re: map DBI resultsby diotalevi (Canon) |
on Dec 16, 2002 at 15:21 UTC ( [id://220235]=note: print w/replies, xml ) | Need Help?? |
And those problems are? How about doing us a favor and completing your question. Specify the required behaviour and the actual behaviour. Also ... on the off chance this is it you wrote your regular expression incorrectly. Try s{$term}{"<i>$term</i>"}. You used the forward slash character as your expression delimiter but also used it inside your expression as data. My fix just changes to a different delimiter. If this isn't the problem then you'll have to post again and clarify what the heck the problem was. Update: Oh yeah, and jeffa noticed that map is stomping on your return value. So the pattern is @target = map { s/foo/bar/; $_ } @source. Fun Fun Fun in the Fluffy Chair
In Section
Seekers of Perl Wisdom
|
|