Content deleted Content added
→Examples: 4 space indention for Perl |
|||
Line 27:
Printing out JAPH as separate processes:
<source lang="perl">
for $i (0..4) {
if (!fork) { $i == 0 or not { $SIG{INT} = sub { print "J" } } or
$i == 1 or not { $SIG{INT} = sub { print "A" } } or
$i == 2 or not { $SIG{INT} = sub { print "P" } } or
$i == 3 or not { $SIG{INT} = sub { print "H" } } ;
sleep $i;
last; } kill INT => $$; </source>
|