my $first = shift @links; push @links, $first / 2 if (!($first % 2)); #### my $first = shift @links; push @links, $first;