Help for this page

Select Code to Download


  1. or download this
    $fred == 42 ? $config = 'k1' : $config = 'k2';
    
  2. or download this
    my $config = $fred == 42 ? 'k1' : 'k2';
    
  3. or download this
    # weird1.pl
    use strict;
    ...
    print "fred='$fred'\n";
    $fred == 42 ? $config = 'k1' : $config = 'k2';
    print "config='$config'\n";
    
  4. or download this
    perl weird1.pl 42
    
  5. or download this
    fred='42'
    config='k2'
    
  6. or download this
    perl weird1.pl 69
    
  7. or download this
    fred='69'
    config='k2'
    
  8. or download this
    $fred == 42 ? $config = 'k1' : $config = 'k2';