Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    print "$combined\n";
    __END__
    a=1 c=1
    
  2. or download this
    'if ( $a ) { $combined .= "a=$a " }'
    
  3. or download this
    my $template = 'if ( $%s ) { $combined .= "%s=$%s " }';
    eval sprintf $template, $_, $_, $_ for qw( a b c );
    
  4. or download this
    '$combined .= "%s=$%s " if $%s'
    
  5. or download this
    '$%s and $combined .= "%s=$%s "'