http://www.perlmonks.org?node_id=967233


in reply to Running an external command

I haven't read your other question. But you're about half-way there. If @output holds the data that you want saved, you next need to do something like this:

open my $out_fh, '>', 'filename.txt' or die $!; print $out_fh @output; close $out_fh or die $!;

That's a simple means. But you'll probably need to modify it to better suit your needs, which weren't really fully described in this thread.

perlintro will take about a half hour to read. One of the sections in that document contains a brief introduction to file input and output.


Dave