From: Wesley J Landaker Date: 2003-12-09T02:40:11+09:00 Subject: Re: Joining scripts? --Boundary-02=_3dL1/LUk0BNszHI Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Description: signed data Content-Disposition: inline On Monday 08 December 2003 10:32 am, Qubert wrote: > I have been working on a couple of Ruby wrappers for some fortran > programs. They are running a bit long (300+ lines), however Ruby has > been excellent in handling them. > > My concerns are they are a bit too long to join together in one > program, but they will often run together. I want the second script > to be run independently, but if the first one is run, I want the > second to be called from within the first. > > Is the best way to accomplish this to write a line in the first > script: `/usr/local/bin/secondscript.rb` > This doesn't seem to be the Ruby way since it relies on the shell, > plus I would like to send some global variables across if continued > from the first script. Seems like you just want "load": load '/usr/local/bin/secondscript.rb' It works like require, but will always evaluate the file, instead of=20 doing so conditionally. =2D-=20 Wesley J. Landaker - wjl@icecavern.net OpenPGP FP: 4135 2A3B 4726 ACC5 9094 0097 F0A9 8A4C 4CD6 E3D2 --Boundary-02=_3dL1/LUk0BNszHI Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQA/1Ld38KmKTEzW49IRAlFuAJ92tZKj207u6HClq/J4BxYhoaZS8gCcCTKE XlGxeQEFcITl3D5Nk2blBig= =Ghdq -----END PGP SIGNATURE----- --Boundary-02=_3dL1/LUk0BNszHI--