The global is ok, just the template usage example was wrong.
my $input = shift;
my $from = shift;
my $to = shift;
$input =~ s|$from|$to|;
return $input;
}
In template try:
<%set Description = 'test'%>
<%replace($Description, 'est', 'ab')%><br>
So it prints 'tab' instead 'test'.
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Code:
sub { my $input = shift;
my $from = shift;
my $to = shift;
$input =~ s|$from|$to|;
return $input;
}
In template try:
<%set Description = 'test'%>
<%replace($Description, 'est', 'ab')%><br>
So it prints 'tab' instead 'test'.
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...