Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Any suggestions? The usual result is the file written is empty. I have tried so many different ways to do this, that I have really confused myself.... one version looks like the following (don't laugh)
open (RECORD_NUMBER, "counter_data.dat") or die; $count = <RECORD_NUMBER>; $count = $count + 1; print RECORD_NUMBER "$count"; close (RECORD_NUMBER) or die;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File I/O
by davidrw (Prior) on Jan 17, 2007 at 20:44 UTC | |
by Melly (Chaplain) on Jan 17, 2007 at 22:46 UTC | |
by Anonymous Monk on Jan 18, 2007 at 03:59 UTC | |
by blazar (Canon) on Jan 18, 2007 at 10:24 UTC | |
|
Re: File I/O
by jettero (Monsignor) on Jan 17, 2007 at 20:44 UTC | |
|
Re: File I/O
by shmem (Chancellor) on Jan 17, 2007 at 23:46 UTC | |
|
Re: File I/O
by jwkrahn (Abbot) on Jan 17, 2007 at 21:43 UTC | |
|
Re: File I/O
by rhesa (Vicar) on Jan 18, 2007 at 00:14 UTC | |
|
Re: File I/O
by sgifford (Prior) on Jan 17, 2007 at 22:09 UTC | |
|
Re: File I/O
by lokiloki (Beadle) on Jan 17, 2007 at 22:51 UTC | |
|
Re: File I/O
by perlex (Initiate) on Jan 17, 2007 at 23:30 UTC | |
|
Re: File I/O
by perlex (Initiate) on Jan 17, 2007 at 23:33 UTC | |
|
Re: File I/O
by webfiend (Vicar) on Jan 19, 2007 at 22:24 UTC |