in reply to Removing the first record in a file containing fixed records

Why not have whatever creates this file instead create two files? name.header would contain the first line, while name.data would have the balance of the file.

  • Comment on Re: Removing the first record in a file containing fixed records

Replies are listed 'Best First'.
Re^2: Removing the first record in a file containing fixed records
by cdarke (Prior) on Jul 18, 2008 at 08:15 UTC
    If you are using Windows then store the control information in an ADS - "Additional Data Stream". This is just an ordinary file associated with the original. An ADS is identified by a ':' followed by the stream name, for example:
    open (my $handle, '>', $filename.':redtape') or die ...
    Perl is happy reading/writing ADS files just like any other.
    Gotchas: ADS files are not visible using Windows Explorer, dir, glob, or readdir (see Win32-StreamNames)
    ADS require NTFS 5 or later (not FAT)