Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Okay, so I've been lurking around for quite a while now, I just started a new job and need to learn Perl! So far, it seems quite wonderful. My question: I'm reading a friend's code and trying to understand how to open and write to a text file. I looked up how it is commonly done, and this seems different.
open(DIN, "<$file_name"); while (<DIN>) { next unless /(.*)Avg: (.*) V/; print OUT "$i, $2 \n"; } close(DIN);
sorry if my formatting isn't the greatest, I'm trying I promise! Also, what is "DIN" ?? Even google doesn't seem to be helping me there. thanks a ton <3
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hey Monks, I need help understanding how to write to a text file
by neilwatson (Priest) on Jun 11, 2014 at 18:01 UTC | |
|
Re: Hey Monks, I need help understanding how to write to a text file
by Anonymous Monk on Jun 11, 2014 at 18:09 UTC | |
|
Re: Hey Monks, I need help understanding how to write to a text file
by deejed (Initiate) on Jun 11, 2014 at 18:18 UTC | |
|
Re: Hey Monks, I need help understanding how to write to a text file
by vinoth.ree (Monsignor) on Jun 11, 2014 at 18:20 UTC |