my $html = "hello"; routine($html); routine2($html); sub routine { my $greetings = shift @_; print $greetings; ## print hello } #OR sub routine2 { my ($greetings) = @_; print $greetings; ## print hello }