auhakim has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks, i was wondering either is it possible to pass and use other file script and this is my code

my first page : example1.pl

my $a = 3;

the other page : example2.pl

if($a == 3){print "checked";}

is it possible to check the $a in the other file?

any help will be appreciated

Replies are listed 'Best First'.
Re: Passing value between pages
by choroba (Cardinal) on Jun 06, 2013 at 08:41 UTC
    It might be possible to set variables in a different script that you read via do, require or use. It is not possible with lexical variables (those declared with my), though. Also, your use of the work "page" seems to indicate you are programming for CGI. To share variables between pages, use hidden fields or sessions.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      can you give me the form example? I just dont get it how to pass value with hidden form without submit button

Re: Passing value between pages
by Anonymous Monk on Jun 06, 2013 at 08:30 UTC