Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

(jeffa) Re: map DBI results

by jeffa (Bishop)
on Dec 16, 2002 at 15:20 UTC ( #220234=note: print w/replies, xml ) Need Help??


in reply to map DBI results

map evalutes the last expression, so you are returning the number of substitions found by s///. Try this instead:
while (my @row = map { s/$term/"<i>$term<\/i>"/; $_ } $sth->fetchrow_a +rray()) {
You also need to escape the slash in </i>. Check out Map: The Basics for more examples on map.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://220234]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2017-10-21 05:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (269 votes). Check out past polls.

    Notices?