blob: 6c2619ae4953d514eeacc376eb446f503e13d721 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
$exit = 0;
$\ = "\n";
if($#ARGV >= 0) {
foreach (@ARGV) {
if(defined $ENV{$_}) {
print $ENV{$_};
} else {
$exit = 1;
}
}
} else {
foreach (sort keys %ENV) {
print $_, '=', $ENV{$_};
}
}
exit $exit;
|