Help for this page

Select Code to Download


  1. or download this
        my $str;
         my $io = tie *STDOUT, 'IO::Scalar', \$str;
    ...
        untie *STDOUT;
           
            # $str now contains the output of the print_monks() function.
    
  2. or download this
    use Some::Module qw(print_blah);
    
    ...
            
            # print_blah() prints to stdout.