Using /e modifier to evaluate : Perl Command « Language Basics « Perl
- Perl
- Language Basics
- Perl Command
Using /e modifier to evaluate
#!usr/bin/perl
use warnings;
use strict;
my $string = "abc ABC.";
print "$string\n";
$string =~ s/(\bw\w+\b)/uc($1)/e;
print "$string\n";
Related examples in the same category