Aug 8, 2014, 7:34 PM
reraised on Stack Overflow.
Fishmonger has given you great advice, you should use it.
I don't want to pass around $user variable from script to script as there are so many scripts in my application
As advised previously, you should break your application into functions, or atleast code that you need to regularly repeat, and put into an external file accessible by all your scripts. One of these functions could fetch user data and be called in each of your scripts i.e. my $user_data = fetch_user_data( @args ). We won't delve into object orientated Perl just yet!
(This post was edited by Zhris on Aug 8, 2014, 8:08 PM)