Help for this page

Select Code to Download


  1. or download this
    perl -MIO::Scalar -le 'my $s; $SH = IO::Scalar->new(\$s); print $SH "f
    +oo"; print $s'
    
  2. or download this
    use IO::Scalar;
    
    ...
    }
    
    print $s;
    
  3. or download this
    use IO::Scalar;
    $string = tie *STDOUT, 'IO::Scalar';
    print "foo\n"; 
    print STDERR '$string: ', $string;    # Must use stderr as stdout is t
    +ied.