my $input = \*STDIN; my @copy = <$input>; open(COPY, ">copy.txt"); print COPY @copy; close COPY; my $entity = $parser->parse($input);