in reply to Functions in substitutions (s///) and Perl 5.8.

Hi,

This code works fine for me.

#!/usr/local/bin/perl require 5.008; use strict; my $helper=sub { print @_ }; $_="[[This]] [[is]] [[a]] [[test]]"; s/(\w+)/$helper->($1)/eg;
On which platform are you running?
(mine is RH 7.1)
---------------------------
Dr. Mark Ceulemans
Senior Consultant
IT Masters, Belgium