You want to use session storage for Perl scripts.
module provides a convenient way to use several different storage
types, including one based on MySQL.
Apache::Session is an easy-to-use Perl module
for maintaining state information across multiple web requests.
Despite the name, this module is not dependent on Apache and can be
used in non-web contexts, for example, to maintain persistent state
across multiple invocations of a command-line script. On the other
handle any of the issues associated with tracking the session ID
(sending it to the client in response to the initial request and
extracting it from subsequent requests). The example application
that the client has cookies enabled.
If you don’t have
Apache::Session, you can
get it from the CPAN (visit http://cpan.perl.org). Installation is
require several other modules that you may need to get first. (When
you install it,
Apache::Session should tell you
which required modules you need if any are missing.) After you have
everything installed, create a
table in which to store
session records. The specification for the table comes from the MySQL
storage handler documentation, which you can read using this command:
The table can be ...