learning-perl6/ch4/ex4-7.raku
2023-11-23 08:26:32 -08:00

11 lines
299 B
Raku

sub MAIN () {
# Unset PATH for shell safety (pg. 68)
%*ENV<PATH> = '';
print Q :x 'C:\Windows\System32\hostname.exe' if $*DISTRO.is-win;
print Q :x '/bin/hostname' unless $*DISTRO.is-win;
#avoid variable inputs for shell scripts
#qqx/date $my-new-date/
#my $my-new-date = '; /bin/rm -rf';
}