Chris202 has asked for the wisdom of the Perl Monks concerning the following question:
That works, but I get the results of this script in the terminal. What I want is just to get these results to be saved in a new text file. Can somebody help me ? Please light my path amid the darkness with the wisdom that is yours Thanks a lot ! Chris#!/usr/bin/perl use strict; use warnings; open (my $file, "<", "/file.txt") or die "cannot open < file.txt $!"; while (<$file>) { unless (/^A/) { print; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to extract script output in new text file ?
by davido (Cardinal) on Oct 25, 2014 at 18:12 UTC | |
|
Re: how to extract script output in new text file ?
by Loops (Curate) on Oct 25, 2014 at 17:31 UTC | |
|
Re: how to extract script output in new text file ?
by 2teez (Vicar) on Oct 25, 2014 at 17:52 UTC | |
|
Re: how to extract script output in new text file ?
by uatrigger (Novice) on Oct 25, 2014 at 21:43 UTC | |
|
Re: how to extract script output in new text file ?
by CountZero (Bishop) on Oct 26, 2014 at 15:44 UTC |