This code works fine for me.
On which platform are you running?#!/usr/local/bin/perl require 5.008; use strict; my $helper=sub { print @_ }; $_="[[This]] [[is]] [[a]] [[test]]"; s/(\w+)/$helper->($1)/eg;
In reply to Re: Functions in substitutions (s///) and Perl 5.8.
by mce
in thread Functions in substitutions (s///) and Perl 5.8.
by v_thunder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |