On Wed, Aug 13, 2003 at 09:31:54AM -0500, Jeff Pelkey wrote: > YA?: What does the "$$" mean in $$test_ref.
$text_ref is a reference to a scalar, so to get the text itself you need to dereference it. It's proably easier to understand if you think of it as ${$text_ref}. It's the same as you'd do with hash an array references. > my $filter = sub { > my $text_ref = shift; > $text_ref =~ s/!!!ZAP_(.*?)!!!/<TMPL_$1>/g; > $$text_ref; > ## Also Tried Adding "return $text_ref;" - No Difference. > }; I think that here you want: $$text_ref =~ s/!!!ZAP_(.*?)!!!/<TMPL_$1>/g; (as per the example in the H::T documentation) > sub test_function { > ##my $str1 = shift; > my ($str1, $str2) = @_; > my $strTest = qq~Hi this is some text: '$str1-$str2'.~; > return $strTest; > } Do you get other arguments passed into a filter? I can't say I've ever tried, but wouldn't expect more than $text_ref. However, you want to use $$str1 to get the actual text held in str1, $str1 is a reference to a scalar. I think. Chisel -- e: [EMAIL PROTECTED] | I may contradict myself, but at least w: http://www.herlpacker.co.uk/ | I don't contradict myself. gpg: D167E7FE | ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Html-template-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/html-template-users