Skip to content

Instantly share code, notes, and snippets.

@mlbright
Created May 12, 2013 18:46
Show Gist options
  • Save mlbright/5564506 to your computer and use it in GitHub Desktop.
Save mlbright/5564506 to your computer and use it in GitHub Desktop.
display environment variables and PATH in a simple, sane way
#!/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