open ($archive_file_handel, '+<', $archive_file_spec) or die "Can't open $archive_file_spec: $!"; $first_line = <$archive_file_handel>; # actually only line seek($archive_file_handel, 0, 2); # works , appends to end seek($archive_file_handel, 0, SEEK_END); # fails, writes to begining print { $archive_file_handel } "another piece of data to go after header\n"; # Write out junk for now