Of course. Perl can do anything :)
# Add this somewhere before the loop # open output file my $outfile = "some_filename.ext"; open my $out, '>', $outfile or die "can't open $outfile: $!\n";
then change say $text; to say $out $text;. Look out!, there is no comma, between the output file handle and the data you want to send to it.
Cheers,
R.
In reply to Re: How to modify a file
by Random_Walk
in thread How to modify a file
by biancoari
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |