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