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

Re: Misterious Behavior of WML calling WML



On Wed, Sep 02, 1998 at 08:19:21PM +0200, Oliver Paukstadt wrote:
> The sed was one problem, but there was another.
> I solved in a bit hacky way: I delete the whole environment except the
> PATH before starting wml. This looks like this:
> 
> system("unset `env | perl -e 'foreach(grep(!/^PATH=/,
> <STDIN>)){s/^([^=]*)=.*\$/\$1/igs;print \"\$_\\n\";}' ` 
> ; cd $Daten/$dir ; wml -qs $file");
> 
> Not very nice, but it's now 
> eperl calling sh calling perl and calling wml.
> 
> Does Anyone know a shorter Statement to delete all the Environment except
> path? Perl prefered, because of the ugly sh on irix5.3...

foreach $key (keys %ENV) {
    delete $ENV{$key} if $key ne "PATH";
}

should do that.

CU,
    Sec
-- 
Die Zahl 42 kommt erstaunlich oft vor, dafuer das sie so ungebraeuchlich ist.
                                                   <nick@roses.de> am 20.8.97
______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com