in reply to Re: Reading binary files - program structure
in thread Reading binary files - program structure
use constant TEMP1 => 'N A10 S'; my %discrete; @discrete{qw( this that theother )} = unpack TEMPL1, read( $file, $size ); print "this:", $discrete{ this };
The constants are more typo resistant, though.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Reading binary files - program structure
by BrowserUk (Patriarch) on May 20, 2010 at 16:01 UTC | |
by Anonymous Monk on May 24, 2010 at 17:16 UTC | |
by BrowserUk (Patriarch) on May 24, 2010 at 20:38 UTC | |
by Anonymous Monk on May 25, 2010 at 16:47 UTC | |
by BrowserUk (Patriarch) on May 25, 2010 at 20:50 UTC |