filmo has asked for the wisdom of the Perl Monks concerning the following question:
I perform my fetch as $job_hash = $sth->fetchrow_hashref();
Next, I want to subsitute the "\n" that are part of a particular element and replace them with "<br>" for HTML display.
i.e.
What I end up with is seemingly garbled $$job_hash{'subjects'} which randomly removes portions of the text and also seems to include "back-spaces" as it won't even print out$$job_hash{'subjects'} =~ s/\n/<br>/g;
I've used the same regex before on the 'subjects' field when using $sth->fetchrow_array and it has worked fine. Is there something about referenced hashes that I'm not understanding? (I've even tried assigning it to a seperate variable ($sub = $$job_hash{'subjects'};) and then performing the regex, but still no luck
--
Filmo the Klown
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 1: Strange values in hash reference
by tilly (Archbishop) on Aug 14, 2001 at 14:44 UTC | |
by filmo (Scribe) on Aug 15, 2001 at 11:05 UTC | |
by tilly (Archbishop) on Aug 15, 2001 at 12:22 UTC | |
|
Re: Strange values in hash reference
by tachyon (Chancellor) on Aug 14, 2001 at 13:57 UTC | |
|
Re: Strange values in hash reference
by Aighearach (Initiate) on Aug 14, 2001 at 14:45 UTC |