Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: map DBI results

by diotalevi (Canon)
on Dec 16, 2002 at 15:21 UTC ( [id://220235]=note: print w/replies, xml ) Need Help??


in reply to map DBI results

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://220235]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-03-28 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found