in reply to Re^5: Can I do this ???
in thread Can I do this ???

Yes. Combined with setlocal/endlocal it can be a very useful feature.

And it's not so different from the *nix shell mechanism of somekey=somevalue command.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^7: Can I do this ???
by rovf (Priest) on Jan 23, 2009 at 13:28 UTC
    And it's not so different from the *nix shell mechanism of somekey=somevalue command.

    On all Unix shells I know, the caller has influence on whether somekey would end up in his/her environment, not (like in Windows Batch) the callee. For instance, if I call from bash a script like this:

    source gurgle.bash
    no child is born and the environment changes will be reflected in my environment. If I call it like this:
    gurgle.bash
    or
    bash gurgle.bash
    I do get a child and my environment stays unpolluted.

    -- 
    Ronald Fischer <ynnor@mm.st>