sathya_myl has asked for the wisdom of the Perl Monks concerning the following question:
Here is the code i used:
use strict; my $word64 = 1; use constant CRACKLIB => (($word64 == 1) ? "/usr/lib64/cracklib_dict" + : "/usr/lib/cracklib_dict") ; print CRACKLIB ;
which prints /usr/lib/cracklib_dict
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unable to assign value to constants using ternary operator
by moritz (Cardinal) on May 11, 2012 at 10:07 UTC | |
by sathya_myl (Acolyte) on May 11, 2012 at 10:22 UTC | |
by tobyink (Canon) on May 11, 2012 at 10:30 UTC | |
by AnomalousMonk (Archbishop) on May 11, 2012 at 15:34 UTC | |
by tobyink (Canon) on May 11, 2012 at 15:54 UTC | |
by sathya_myl (Acolyte) on May 11, 2012 at 11:04 UTC | |
|
Re: Unable to assign value to constants using ternary operator
by marto (Cardinal) on May 11, 2012 at 10:04 UTC |