Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
So if @_lines had 100 lines, can I not do a delete and have it remove only the first line and then just write the file again?open(FILE,"/path/to/file.txt") or die "could not open file: $!"; my @_lines = <FILE>; # After I open the file for reading close(FILE); my $_numOfLines = scalar @_lines;# Is that right? I think it is, but m +y mind is rusty, been a while since I learned all of the perl program +ming
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: reading files
by daxim (Curate) on Oct 31, 2012 at 10:14 UTC | |
by Anonymous Monk on Oct 31, 2012 at 10:20 UTC | |
|
Re: reading files
by space_monk (Chaplain) on Oct 31, 2012 at 10:51 UTC | |
by Anonymous Monk on Oct 31, 2012 at 11:00 UTC | |
|
Re: reading files
by Anonymous Monk on Oct 31, 2012 at 10:17 UTC | |
|
Re: reading files
by greengaroo (Hermit) on Oct 31, 2012 at 14:45 UTC |