#!/usr/bin/perl # main program; use strict; use warnings; use Routines;; { # closure to avoid global variables my $hello = "hello123; # ... hello( $hello ); } __END__ # Routines.pm - a separate file called a "module" package Routines; sub hello { my $hello = shift; print "$hello\n"; } 1;