Help for this page

Select Code to Download


  1. or download this
    my $script = 'while(<>) { print; }';
    close(STDIN);
    ...
    my $script_input = 'blah';
    $stdin .= $script_input;
    eval $script;
    
  2. or download this
    my $script = 'while(<STDIN>) { print; }';
    close(STDIN);
    ...
    my $script_input = 'blah';
    $stdin .= $script_input;
    eval $script;