removing use of // in favor of defined ternary for Perl 5.8 compatibility