- or download this
$self->content(sub{s/foo/bar/g});
- or download this
sub content {
my $self = shift;
...
}
$self->{'content'};
}
- or download this
$self->content =~ s/foo/bar/g;
# instead of
# $self->content(map { s/foo/bar/g } map $_, $self->content);