Avoided usage of %PID variable as suggested by Perl::Critic.