Help for this page

Select Code to Download


  1. or download this
    use IO::Scalar;
    my $data;
    ...
    print HACK <STDIN>;
    tied(*HACK)->setpos(0);
    *STDIN = *HACK;
    
  2. or download this
    use IO::Scalar;
    $data = join '', <STDIN>;
    ...
    tie *STDIN, 'IO::Scalar', \$s;
    print STDIN $data;
    tied(*STDIN)->setpos(0);
    
  3. or download this
    print $data;
    print <STDIN>;