ameezys has asked for the wisdom of the Perl Monks concerning the following question:
I am currently reading an input file. However I want to print out everything inside and outside the while loop into a new output text file. Ex: output.txt. How do I get all the printing to write into a new file? Ive been reading and did some search on the internet but still couldn't figure it out.my $filename = 'c:\Users\a\Desktop\b\c\test_3.v'; open(FH, '<', $filename) or die "Format of bench file name: circuit_na +me.v \n example : s1423.v\n"; while(<FH>) { print "Hello"; } print "Hello too"; close(FH);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Writing to an output file
by haukex (Archbishop) on Apr 17, 2019 at 21:15 UTC | |
|
Re: Writing to an output file
by 1nickt (Canon) on Apr 17, 2019 at 21:18 UTC | |
|
Re: Writing to an output file
by AnomalousMonk (Archbishop) on Apr 17, 2019 at 21:51 UTC | |
|
Re: Writing to an output file
by hippo (Archbishop) on Apr 18, 2019 at 08:50 UTC | |
by haukex (Archbishop) on Apr 18, 2019 at 18:44 UTC |