J
Jking
Hi,
You perl gurus, I am reading the code of blosxom, but get stumped at the
following line:
======================================================================
# Define default interpolation subroutine
$interpolate =
sub {
package blosxom;
my $template = shift;
$template =~
s/(\$\w+(?::?\w*)/"defined $1 ? $1 : ''"/gee;
return $template;
};
=======================================================================
the interpolate function is used to substitute the variable value in the
context for the occurrence of variable names in $template string.
But I wonder what is meaning of the RE options /gee?
Any one can help me?
Thank you!
Justin
08/13
You perl gurus, I am reading the code of blosxom, but get stumped at the
following line:
======================================================================
# Define default interpolation subroutine
$interpolate =
sub {
package blosxom;
my $template = shift;
$template =~
s/(\$\w+(?::?\w*)/"defined $1 ? $1 : ''"/gee;
return $template;
};
=======================================================================
the interpolate function is used to substitute the variable value in the
context for the occurrence of variable names in $template string.
But I wonder what is meaning of the RE options /gee?
Any one can help me?
Thank you!
Justin
08/13