in reply to How to pass a value from main program back to a module

You can access @ARGV from anywhere in your program, including a module, not just main. But don't forget the '$' prefix:
my $conf_file = $ARGV[0];

Replies are listed 'Best First'.
Re^2: How to pass a value from main program back to a module
by Anonymous Monk on Feb 23, 2008 at 06:16 UTC
    Thanks all ( ForgotPasswordAgain, friedo and cdarke ) I would use $conf_file = $ARGV[0]. What makes me thinks is that " I have been working in perl from last 2 years " and never realised that there could be a simple solution like this.