Help for this page

Select Code to Download


  1. or download this
    my %handle = ( out => *STDOUT,
                   err => *STDERR );
    print {$handle{out}} "Test\n"; # Not possible without braces.
    
  2. or download this
    my %handle = ( out => *STDOUT,
                   err => *STDERR );
    my $fh = $handle{out};
    print $fh "Test\n"; # Look, ma! no curlies at all.