#!/usr/bin/env perl
use strict;
use lib $ENV{ 'MAIN_CONF'}  ;
use main_config ;
use File::Find ;


my $MTZ_FILE = "duzan.msk" ;
my $ICL ; my $record ;

open ( MTZ,  "< $MTZ_FILE" ) || die "FILE OPEN ERROR: >$MTZ_FILE< \n" ;
my @x ; my $y ; my $y2 ; my @ix ;
binmode(MTZ); 

my $sig = 0 ; my $r ; my $i; my $chrs ;
my $nn = 0 ;
while ( read( MTZ, $record, 4 ) && $sig == 0 )
{ 
#    read(MTZ, $record, 4); 
    $r = unpack("f", $record); 
    $i = unpack("i", $record); 
    $chrs = unpack("a4", $record ) ;
    $nn++ ;
    if ( $nn == 1000 ) { $sig++ }
    printf ( " $nn> {%d} {%f} {$chrs} \n", $i, $r ) ;  
} 

close ( MTZ ) ;
