[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-AnyPerl] This Seemed So Simple...



Excerpt of message (sent 6 July 1999) by Richard Gordon:
> When I run 3 file processing scripts in succession from the command 
> line in telnet, all goes as planned.
> I wrote a master script that calls the other 3 in the correct order.

> They are indeed running, but at least the second one 
> is getting part of the way thru, skipping stuff, and then apparently claiming to be finished.

> my $setup = "comm_setup.pl";
> my $toc = "make_toc.pl";
> my $tags = "dict_tags.pl";
[...]
> do $setup;
> do $toc;
> do $tags;

Not knowing what is in the other three scripts, it is conceivable that 
they mess with each other's namspace, i.e. use variables of the same
names, interfering in undesired ways.

To replicate running three independent scripts (as from the command
line), you can run them as separate processes using 'system'.  This
might be less efficient, but should do the trick.

I'd suggest checking the return values.  If you use 'system', look it
up in the Camel, because the status return is somewhat unusual.  It's
on page 230 in my book (2nd Edition).

Hoping this helps

	Christian Brechbühler, Dr. sc. techn.
	
	Communication Technology Laboratory, Image Science Group
	Swiss Federal Institute of Technology (ETH), Zurich

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-anyperl-request@macperl.org