Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PBML] Want to retain values of global variables

Expand Messages
  • Charles K. Clarkson
    ... Okay, I said it, but nothing happened. :) If your operating system allows it you could put your globals in environmetn variables. It depends on how you
    Message 1 of 1 , Nov 29, 2001
      Mini <minid@...> wondered:

      : Hi All,
      :
      : Say I run the script a1.pl. This a1.pl has some global variables. Can
      : I retain the values of these global variables during the execution of
      : another script say a2.pl. The script a2.pl executes after the execution
      : of the script a1.pl is over. Please suggest.

      Okay, I said it, but nothing happened. :)

      If your operating system allows it you could put your globals in
      environmetn variables. It depends on how you start a2.pl. You
      could also write the globals to a text file in a1.pl and restore them
      in a2.pl

      The more reliable way would be the module Storable.pm to
      store the globals in a1.pl and get them in a2.pl. Storable is
      a compiled C module, making it much faster than rolling your
      own.

      http://search.cpan.org/doc/RAM/Storable-1.0.13/Storable.pm

      HTH,
      Charles K. Clarkson
      Clarkson Energy Homes, Inc.


      Would you please stop turning the water to wine, I'm trying to take a shower.
      - Steve Wright
    Your message has been successfully submitted and would be delivered to recipients shortly.