Balaji_Jananayagam has asked for the wisdom of the Perl Monks concerning the following question:

Hi Guys, Below code did not working in perl 5.10.x. It looks like constant doesn't support ternary operators. Shed some light.
use strict; my $hw = `uname -i`; my $word64 = 1 if ( $hw =~/x86_64|ia32e/); print "word $word64\n"; use constant CRACKLIB => $word64 ? '/usr/lib64/cracklib_dict' : ' +/usr/lib/cracklib_dict' ;
Thanks in advance! Balaji

Replies are listed 'Best First'.
Re: Constant with Ternary operation
by marto (Cardinal) on May 11, 2012 at 10:17 UTC