package FixStuff; use base qw(Exporter); our @EXPORT_OK=qw(FixText FixName); sub FixText { $_[0] =~ s/^\s+//; # this kills any leading whitespace # {insert some other regex nonsense here} #print "$_[0]\n"; # diagnostic print # No need to return...you're modifying @_ #return $_[0]; } sub FixName { ...blahblah } # Alternate FixText { sub FixText { local $_ = shift; # my $_ = shift in 5.9 or later ?? s/^\s+//; ..etc. return $_; } 1; __END__ # Then in DataParser.pl: use FixStuff qw(FixText); #or to use both functions: #use FixStuff qw(FixText FixName); ... FixText(...blahblah...);