Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Signals and the kill function

  • $SIG
  • %SIG
  • kill

List of signals on Linux: man -S 7 signal

To send a signal use kill SIG, LIST (process IDs)

For example: kill 9, $pid;

use strict;
use warnings;

my ($sig, @process) = @ARGV;

die "Usage: $0 SIGNAL PROCESS-ID\n" if not @process;
kill $sig, @process;