pathed - munge the Bash PATH
I wrote "pathed", a tool to munge the Bash "PATH" environment variable.
The Bash "PATH" environment variable contains a colon-separated list of paths. pathed - "path editor" - can split the path, append, prepend or remove elements, remove duplicates and reassemble it.
Two comments, 1) the path separator is not always ':', see $Config::Config{path_sep}, and 2) are you aware of the Env module? https://metacpan.org/module/Env
Joel: I'll add an option to use a different path separator, thanks. Env has somewhat different aims; pathed is a command-line tool.
Marcel, I should have been more clear. Other platforms WILL use a different separator and `use Config; $Config::Config{path_sep}` knows what it should be. Further I can see that there are different aims, however, might your command-line app be well served by being a wrapper of the Env module?
Ah, good point about Config.pm; I'll use that as the default separator, thanks! About Env - it does have PATH helpers, but it's really about convenient access to the whole environment; I feel it's overkill for pathed.
Marcel, Env is actually a really small module.
Especially since it works on many different systems.