2004.05.18 17:47 "[Tiff] Recovering tiff faxes corrupted with 3.6.0", by Andrew McGill

2004.05.20 13:38 "Re: [Tiff] Re: Recovering tiff faxes corrupted with 3.6.0", by Thomas J. Kacvinsky

Hi Andrew,

The problem with \x0A is that is an LF character, which is ignored by the regexp. Also, I did not see an $IFS defined in English.pm.

Anyway, here is something that will catch the \x0A (the m option to s/// makes the ^ against the the embedded \x0A).

  #! /usr/bin/perl
  # Public domain
  # 266       03=short                      01=std, 02=rev
  # Tag       Type      Count               Value
  # 0    1    2    3    4    5    6    7    8

  undef $/ ;

  $data = <> ;

  $data =~ s{^x01\x03\x00\x01\x00\x00\x00\x02\x00}
            {\x01\x03\x00\x01\x00\x00\x00\x02\x00}gm;
  print $data ;

Tom