1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#!/usr/local/bin/perl use warnings; use strict; use constant LOG_FILE => '/var/log/system-upgrade.log'; use constant { DASH_PATH => '/usr/local/bin/dash', }; sub shell { system( DASH_PATH, '-c', $_[0] ); } sub main { shell("ls -l"); exit; } main();