Perl cancel example bug fix