Hi,

I think that you are looking for a serialization mechanism.

For that you can use the Storable module 
(http://search.cpan.org/~ams/Storable-2.16/Storable.pm)
All you need to do is to freeze the variable in the first process, send it by 
pipe and thaw it in the other process.

Yaron Kahanovitch

----- Original Message -----
From: "Brian Volk" <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: 19:43:20 (GMT+0200) Asia/Jerusalem יום חמישי 17 מאי 2007
Subject: pass variable to another program

Hello,

 

Is there a way to pass a variable from one program to another?  I have a
web site that allows the user to set the time they would like to
download a file... The program uses the Linux "at" command and launches
another perl program that does the actual FTP download.  I would like to
pass a parm variable (email address) from the web site, captured in the
first perl program to the second perl program.  Is this possible?

 

First program uses this line to queue the job 

 

system "/usr/bin/at $hour:$minute $tod today < /var/www/cgi-bin/images";


 

images is a text file containing the perl program that runs the FTP
download:

 

perl /var/www/cgi-bin/get_image_file.pl 

 

 Is there a way to pass a variable from program 1 to program 2?

 

Thanks for your help!!

 

Brian Volk

 

           

 



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to