Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am looking to store my output from router commands to an external file
open(DATA,"+>>default_ve.txt") || die "Couldn't open file , $!"; while (1) { my $content = $rh->cmd('show system processes extensive | match rp +d'); print DATA "$content"; }}
I see the file is getting created, but it does not have content . -rw-rw-r-- 1 user others 0 Nov 20 18:44 default_ve.txt Please let me know what iam missing here
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File operations
by GotToBTru (Prior) on Nov 20, 2015 at 13:28 UTC | |
|
Re: File operations
by FloydATC (Deacon) on Nov 20, 2015 at 14:31 UTC | |
|
Re: File operations
by toolic (Bishop) on Nov 20, 2015 at 13:41 UTC | |
|
Re: File operations
by Eily (Monsignor) on Nov 20, 2015 at 13:34 UTC | |
|
Re: File operations
by mr_ron (Deacon) on Nov 21, 2015 at 14:41 UTC |