Tom to unsubscribe send a blank email to these address [EMAIL PROTECTED]
Cheers Armando Gomez Guajardo Process Engineer Work Ph 956 547 6438 Beeper 956 768 4070 -----Original Message----- From: Gustav Wiberg [mailto:[EMAIL PROTECTED] Sent: Friday, October 14, 2005 12:28 PM To: Thomas J Hughes Cc: beginners@perl.org Subject: Re: Re: ENV(Y)? Hi! I got your mail from the Perl-malinglist. You have to unscribe from that list manually yourself. Best regards /G http://www.varupiraten.se/ ----- Original Message ----- From: "Thomas J Hughes" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 14, 2005 6:19 PM Subject: Re: Re: ENV(Y)? Please remove my email address from your list, thanks Tom On 10/14/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi again! > > I've been looking around... > > And one thing I don't get. You tell me that > SOMEVAR will be available to > you in your program and any programs you spawn( with 'system' or > backtics). But after your perl script ends, SOMEVAR is lost) and this > seems to be correct when I test my program, but I get confused when I read > about it on the net... > http://www.devdaily.com/perl/edu/articles/pl020002/pl020002.shtml > http://www.linux.com/howtos/Path-3.shtml > > If I like to set an environmentvariable permanently from my program? > Isn't that possible in Perl? > > > /G > http://www.varupiraten.se/ > > > > Hi gustav - > > > > At 2005-10-13, 23:42:22 you wrote: > >>Hi! > >> > >>Just a quick question. Can I set or unset an enviromentvariable through > >>this Hash? I just need a yes ... :-) > >>If No, please give explanation... > > > > Not really. > > > > If you do something like: > > > > $ENV{SOMEVAR} = 'somevalue'; > > > > SOMEVAR will be available to you in your program and any programs you > > spawn > > ( with 'system' or backtics). But after your perl script ends, SOMEVAR > > is > > lost. This is > > because the system provides you with a new shell - with the envirnoment > > inherited > > from the caller - for the duration of the script; the evironment and its > > modifications are > > lost when the script ends. > > > > On 'nix, you can play with the 'source' operator: '.', which instructs > > the > > shell to run the > > command following the '.' operator in the same shell (I'm talking bash - > > not sure about > > other shells). > >> > >>/G > >>http://www.varupiraten.se/ > >> > >> > >> > >>> Hi! > >>> > >>> Thanx a LOT!!! > >>> > >>> /G > >>> http://www.varupiraten.se/ > >>> > >>> > >>>> Hi Gustav - > >>>> > >>>> At 2005-10-13, 23:13:33 you wrote: > >>>>>Hi there! > >>>>> > >>>>>I'd like to get a list of enviromentvariables from the *NIX-system. > >>>>> > >>>>>I'd like it in the format... > >>>>>ENV1=x1 > >>>>>ENv2=x2 > >>>>>ENV3=x3 > >>>>> > >>>>>and so on... > >>>>> > >>>>>I think I have to use ENV-command. (http://perldoc.perl.org/Env.html) > >>>>> Is > >>>>>that right? I don't understand how I get this kind of listing. Please > >>>>> put > >>>>>me in right direction.. > >>>>> > >>>>> > >>>>>I tried to use print ENV% but I get this kind of output: > >>>>>HOSTfriggAUDIODEV/tmp/SUNWut/dev/utaudio/8dtstart_sessionlogfile/de v/nullDTSCREENSAVERLISTStartDtscreenBlankXMBINDDIR/usr/dt/lib/bindingsUT AUDIODEV/tmp/SUNWut/dev/utaudio/8AB_CARDCATALOG/usr/dt/share/answerbooks /C/ab_cardcatalogLC_ALLCDTLOGINDISPLAYCLASSSunRayOSTY > >>>>> > >>>>>I envy you how can solve this... :-) > >>>>> > >>>> > >>>> You're almost there. %ENV is a hash, do you can do something like > >>>> this: > >>>> > >>>> print "$_=$ENV{$_}\n" for sort keys %ENV; > >>>> > >>>> Or, with more keystrokes: > >>>> > >>>> for my $var( sort keys %ENV ) { > >>>> print "$var=$ENV{$var}\n"; > >>>> } > >>>> > >>>> Read up on hashes && good luck. > >>>>>/G > >>>> > >>>> Aloha => Beau; > >>>> [EMAIL PROTECTED] > >>>> 2005-10-13 > >>>> > >>>> > >>>> > >>>> -- > >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>>> For additional commands, e-mail: [EMAIL PROTECTED] > >>>> <http://learn.perl.org/> <http://learn.perl.org/first-response> > >>>> > >>>> > >>>> > >>> > >>> > >>> > >> > >> > >> > >>-- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >><http://learn.perl.org/> <http://learn.perl.org/first-response> > >> > >> > >> > >> > >>-- > >>No virus found in this incoming message. > >>Checked by AVG Anti-Virus. > >>Version: 7.0.344 / Virus Database: 267.12.0/132 - Release Date: > >> 10/13/2005 > >> > > > > > > > > Aloha => Beau; > > [EMAIL PROTECTED] > > 2005-10-13 > > > > > > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > > -- Thomas J. Hughes, DoD (CIV) Information Computer Telecommunciations Specialist Level - 6 Naval Surface Warfare Center Joint Interoperability Test Center (JITC) COMM: (301) 274-0160 CELL: (240) 210-0277 -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.12.0/132 - Release Date: 2005-10-13 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>