in reply to Trouble Getting Local Variable $_ to return reformatted string
# Put in HTML-friendly characters for any odd characters &ncw_com_library::cleanup($attr_descr);
You expect your cleanup() subroutine to do inplace edits of its argument, instead it takes a copy and returns it modified. Your $attr_descr doesn't get altered.
Don't use the & prefix for sub calls, unless you know what it does and you need that because you do know ;-)
# Put in HTML-friendly characters for any odd characters $attr_descr = ncw_com_library::cleanup($attr_descr);
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trouble Getting Local Variable $_ to return reformatted string
by Anonymous Monk on Jun 18, 2007 at 14:56 UTC | |
by ysth (Canon) on Jun 18, 2007 at 18:32 UTC |