if ( scalar( @_ ) ) { my $t = shift; $t =~ s/change_something/to_something_else/; } print "$t\n";