[VPM] regular expression and execution of routine

abez abez at abez.ca
Sat Feb 25 19:40:50 PST 2006


perldoc perlre

s/what/hello($1)/e (I think)

On Sat, 25 Feb 2006, Jeremy Aiyadurai wrote:

> hello all perl guru's
> 
> in a regular expression how do I execute subroutines?
> 
> eg.
> -------------------
> $_ =~ s/replaceme (.*)/hello($1);/ig;
> 
> 
> sub hello {
> my ($test) = @_;
> ...
> }
> 
> -----------------
> I am using an ActiveState 5.8 something, perl distro.
> thanks in advance for all help,
> 
> -Jeremy A.
> 
> 
> _______________________________________________
> Victoria-pm mailing list
> Victoria-pm at pm.org
> http://mail.pm.org/mailman/listinfo/victoria-pm
> 

-- 
abez ------------------------------------------
http://www.abez.ca/ Abram Hindle (abez at abez.ca)
------------------------------------------ abez



More information about the Victoria-pm mailing list