some people come to a page which i have in perl
say x.pm
this i where they login
and this login is checked with the database and then they are depending on what their privelege level is allowed to visit some links .
now as they click on these links i want them to be shown relevant information without having to have them login again
i tried the "use x.pm"
but how do i get the username and password values from x.pm
What you are looking for is "Maintaing State", you may want to Google [google.com] for it.
You have 2 options for achieving this, you can either record the state in a session cookie or you can use CGI.pm to pass the data between your forms/pages.
Personally I prefer to use CGI.pm to maintain state through admin panel and site maintenance scripts while using cookies for the Joe public facing pages.