> -----Original Message-----
> From: Andy Greenwood [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 17, 2007 12:51 PM
> To: Brian Volk
> Cc: beginners@perl.org
> Subject: Re: pass variable to another program
> 
> On 5/17/07, Brian Volk <[EMAIL PROTECTED]> wrote:
> > 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?
> 
> I don't know of a way to directly pass a variable from one script to
> another. However, you could easily enough pass it in as a command line
> argument. Call the second script like
> 
> perl /path/to/script2.pl variable
> 
> And in script two, do something like
> 
> my $argument = shift | die "no argument given";
> 
> I'm sure TIMTOWTDI though.
> 
[Brian Volk] That work great! Thanks.  I just created the script file on the
fly and added the email param variable at the end.

print IMAGES "perl /var/www/cgi-bin/get_ftp_images.pl $email\n";

Thanks again.

Brian


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


Reply via email to