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

Re: example implementation (was: Re: DRAFT: Fixing the architecture query options of dpkg.



On Mon, 11 Jan 1999, Marcus Brinkmann wrote:
> I tried to implement this but failed somehow. Could somebody give a small
> example how to do it in perl?
> 
> task: Set a environment variable and run a program which options are in an
> array in this environment.

Um..

well, if you're simply trying to pass environment variables to a program,
the perl might look like this:

#!/usr/bin/perl
#
# modify environment and run command

$ENV{'ARCH_X_Y_Z'} = 'a-b-c';

system($ARGV[1]);

..or have I misunderstood?..

Jules


/----------------+-------------------------------+---------------------\
|  Jelibean aka  | jules@jellybean.co.uk         |  6 Evelyn Rd	       |
|  Jules aka     | jules@debian.org              |  Richmond, Surrey   |
|  Julian Bean   | jmlb2@hermes.cam.ac.uk        |  TW9 2TF *UK*       |
+----------------+-------------------------------+---------------------+
|  War doesn't demonstrate who's right... just who's left.             |
|  When privacy is outlawed... only the outlaws have privacy.          |
\----------------------------------------------------------------------/



Reply to: