in reply to print problem
More Perlishly:
use strict; use warnings; use autodie; open my $IN, '<', 'in.txt'; open my $OUT, '>', 'out.txt'; while ( my $line = <$IN> ) { print $OUT $line if $line =~ /Homo Sapiens/; } close $IN; close $OUT; __END__
Hope this helps!
Edit: removed the chomp to print the linebreaks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: print problem
by yueli711 (Sexton) on Jun 15, 2018 at 23:58 UTC |