I didn't see any references to this seemingly trivial task anywhere within these gates, so I figure I'll ask. My $PATH environment variable became exceedingly long (after being modified in various scripts that are sourced at start of a new terminal). So, I figured that it would be easier to write a single perl script to clean this up rather than tracking every sourced file and cleaning the $PATH up by hand.
The script is done, but how do I set the terminal environment $PATH from within the script? If I just set $ENV{PATH}, that change goes away with termination of the script. There do not seem to be any "export" or "setenv" commands in perl.
btw, my shell is bash.
In reply to Script to change $ENV{PATH} by gri6507
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |