How can I open STDIN <> in perl?
How can I open STDIN a second time?
Let's say I have this data
John Smith 25 O ATG 180 Peter Jackson 40 AB GGTA 173 Carl Anderson 32 A GGT 172
And I have this code
while( my $line = <>) { print $line; } while( my $line = <>) { print $line; }
I want it to print
John Smith 25 O ATG 180 Peter Jackson 40 AB GGTA 173 Carl Anderson 32 A GGT 172 John Smith 25 O ATG 180 Peter Jackson 40 AB GGTA 173 Carl Anderson 32 A GGT 172
+3
source share
2 answers