## file: Myperl.pm package Myperl; use strict; require Exporter; our $VERSION = 0.1; our @ISA = qw(Exporter); our @EXPORT = qw(getInfo); our %EXPORT_TAGS = (); our @EXPORT_OK = qw(); sub getInfo { my $thescalar=shift; my $thehash=shift; ## pick a reference print "scalar: $thescalar\nhash:\n"; print "$_ => ", $thehash->{$_}, "\n" for keys %$thehash; } 1; #### use Myperl; my $s=4; my %h=(0..5); my $myresult=getInfo($s, \%h); ## pass a reference