use warnings; use strict; use Unix::Syslog qw(:macros :subs); # Open syslog channel openlog('my-program.pl', LOG_PID, 3);