Created
May 12, 2013 18:46
-
-
Save mlbright/5564506 to your computer and use it in GitHub Desktop.
display environment variables and PATH in a simple, sane way
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use Modern::Perl; | |
say "$_ : " . $ENV{$_} for ( sort keys %ENV ); | |
say ""; | |
say "System PATH for $^O"; | |
say ""; | |
my $pathdel; | |
if ( $^O eq 'MSWin32' ) { | |
$pathdel = ';'; | |
} | |
else { | |
$pathdel = ':'; | |
} | |
say $_ for ( split /$pathdel/, $ENV{'PATH'} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment