sub hello { print $hello; } 1; # need to end with a true value #### #!/usr/bin/perl require "./routines.pl"; # assuming it's in the current directory $hello="hello123"; hello(); # prints "hello123" #### sub hello { my $hello_msg = shift; print $hello_msg; } # ... $hello="hello123"; hello($hello); # or just: # hello("hello123");