Last active
September 4, 2019 05:17
-
-
Save gfx/e0ae67b9f95a9905c893f2e15b56533b to your computer and use it in GitHub Desktop.
perl -Masroot foo.pl # run it as root
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
# usage: use asroot; # run it as root | |
package asroot; | |
use strict; | |
use warnings; | |
# TODO: inherits @INC | |
exec "sudo", $^X, $0, @ARGV if $< != 0; | |
1; | |
__END__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment