Hi,
I would recommend you to define a method in Parse.pl and use it in your client script which requires parsing. For eg.
#caller.pl
require 'Parse.pl';
#...
# call method parse_me(for eg.) in Parse.pl
my $return_val = Parse::parse_me($line);
#...
#Parse.pl
sub parse_me{
my $line = @_;
#...
}
1; Note: In Parse.pl define only methods, because when you
require something, perl will try to execute that script first and then subsequent lines following
require line.
hope this helps.
katharnakh.