eyal edri wrote: > Hi, > > i want to set a local VAR on my tcsh. > such as : > > HTTP_proxy="http://myCompany.proxy.com:8080" > > i've tried using: > > system("setenv HTTP_proxy "http://myCompany.proxy.com:8080") > <http://myCompany.proxy.com:8080")>; > `setenv HTTP_proxy "http://myCompany.proxy.com:8080"` > <http://myCompany.proxy.com:8080"`> > > also tried adding this to the /.cshrc and running: system ("souce /.cshrc") > > doesn't work... > > anyone has done it ?
You can't set an ENV vrbl for other than children of the tassk that's setting it. So if you want to run a task with it set prior, you can either set it in this task (which will export it to the child) or you can try combining the setenv and task execution in a single shell command line. 1) (set ENV in shell) $ENV{HTTP_proxy} = "http://myCompany.proxy.com:8080"; system "<execute command>"; # or my $result = `<execute command>`; 2) (single combined line) my $result = `setenv HTTP_proxy "http://myCompany.proxy.com:8080"; <execute another command here>`; 3) (a variation with explicit shell call) system qq{<path-to-tcsh>/tcsh -c "setenv HTTP_proxy \"http://myCompany.proxy.com:8080\"; <execute another command here>}; You can play with these for your best fit. _______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs