passing temp file names to another script

Rob Tanner rtanner at cheshire.onlinemac.com
Sat Dec 2 14:44:16 CST 2000


--On Saturday, December 02, 2000 12:13:03 PM -0800 Tom Keller <kellert at ohsu.edu> wrote:

> Greetings,
> I am creating a temp file with some "current" data in it. I want another script
> to have access to this temp file. How do I give the second script the filename?
>
> I create the temp file using IO::File
> $fh = IO::File->new_tmpfile    or die;
> then write the data to $fh.
>
> How do I get the temp file name to another script?
>

Tom,

Insufficient problem definition.

Do you mean two programs that run at different times or two programs running simultaneously?

Is there any reason you can't use a standardized file name (e.g., mytemp or mmi.data, etc) so that both programs already know the name?

Is there any reason you can't have another file somewhere that both programs know about and the first can write the filename there for the second to read?

Lastly, you can delve into the world of interprocess communication and set up either a named pipe or UNIX socket, etc.  Details are pretty well covered in both the camel book and the cookbook.

Hope that helps

> Thanks,
> Tom Keller
>
> PS. Whenever you want to have another meeting at OHSU. It's available. The last
> one was excellent, as was the gathering afterwards at the pub.
>

BTW: On my calendar I have marked a gathering for this Tuesday (social I think), but I don't have any other information.  Am I just out is left field (probably true 
in any event) or did I get too carried away deleting on subject line?  Or has it just fallen through the cracks.

BTW2: About getting carried away deleting based on subject lines, is it possible to 
get majordomo to prepend '[PDX-PM]' to the subject line?  At least that way I would 
KNOW that I just deleted something I shouldn't have.

-- Rob

       _ _ _ _           _    _ _ _ _ _
      /\_\_\_\_\        /\_\ /\_\_\_\_\_\
     /\/_/_/_/_/       /\/_/ \/_/_/_/_/_/  QUIDQUID LATINE DICTUM SIT,
    /\/_/__\/_/ __    /\/_/    /\/_/          PROFUNDUM VIDITUR
   /\/_/_/_/_/ /\_\  /\/_/    /\/_/
  /\/_/ \/_/  /\/_/_/\/_/    /\/_/         (Whatever is said in Latin
  \/_/  \/_/  \/_/_/_/_/     \/_/              appears profound)

  Rob Tanner
  McMinnville, Oregon
  rtanner at cheshire.onlinemac.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://mail.pm.org/archives/pdx-pm-list/attachments/20001202/2cce2cca/attachment.bin


More information about the Pdx-pm-list mailing list