You have to admit - that's kinda ugly ;-)
Also has the advantage of avoiding eval STR. String evals are nasty and to be avoided where possible.# Try Windows first. my $root = eval { require Win32; Win32::IsAdminUser(); }; # If that didn't work, try Unix. $root = $> == 0 if $@;
In reply to Re^3: Does $> have a little extra magic?
by Tanktalus
in thread Does $> have a little extra magic?
by chargrill
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |