Re: [PBML] Passing variable to second file (cross posted to 'email@example.com
Thanks everyone for your comments. I have taken note of the advice re
better programming practices.
This was my first Perl script and the aim was to just get something
that ran reliably and learn perl at the same time. It runs as a unix
Cron job (outside of a website) on our network doing daily number
crunching and then emails the results.
Wanting to pass variables between the two files has only come about
since trying to do a recent change. For ease of testing I wanted the
script to know whether its running in the production or testing
In the long term I will probably rewrite it. I am thinking it might
be a good exercise to put a lot of the subs into a module, for reuse.
--- In firstname.lastname@example.org, Mike Southern <gb1198@c...>
> PS: I assumed that you were writing a program running outside of awebsite
> environment - like a file or text processor.what I
> If what you are doing is web page form processing then not much of
> wrote applies (except to encourage good design :) )data between
> HTML form get/post methods of course are built entirely to pass
> different handling scripts.Each
> > Hi,
> > I have a script that is divided into 2 files for manageability.
> > isthe
> > about 700 lines in length and the second file is called from the
> > first
> > using the 'Require' method.
> > Is there an easy way of passing a variable from the first file to
> > second? Or should I be looking at using @Export or somethingsimilar?
> > Thanks
> > John