reraised on Stack Overflow
Fishmonger has given you great advice, you should use it. Indeed his and your advices are very valuable but I have gone a long way in this application I don't wanna change the framework like using Template Toolkit at this point, I do not wanna do everything all over again, but I am making notes of everything and saving links etc for my next project, as you must have realized this is my very first project !!
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! With this approach, again the problem is of placement/positioning of that information on the webpage, if I go for something outside of that JS script framework I cannot place where it should be, I have described that in one of my above comments, see the picture attached.
Thanks much !!Terry.