#!/usr/local/bin/perl -Tw use strict; my $initial = \"there once was a fish. Its feet were small"; my $post = func($initial); my $post2 = func($initial); print "$post\n"; sub func { my ($val) = @_; # $$val =~ s/there/There/; return $$val; }