in reply to rewinding filehandle/line skipping ?
#!/usr/local/bin/perl -w use strict; open MYFILE, "+>somefile.txt" or die "Error message here: $!\n"; # Write to the file print MYFILE "These are the days\n"; print MYFILE "and these are the days\n"; # Rewind the file for reading seek(MYFILE, 0, 0); while (<MYFILE>) { print $_; } close MYFILE;
See also perlopentut.
--
John.
|
|---|