Parse::Binary::FixedFormat

Parse::Binary::FixedFormat is a Perl module to convert between fixed-length fields and hashes.
Download

Parse::Binary::FixedFormat Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Autrijus Tang
  • Publisher web site:
  • http://search.cpan.org/~autrijus/

Parse::Binary::FixedFormat Tags


Parse::Binary::FixedFormat Description

Parse::Binary::FixedFormat is a Perl module to convert between fixed-length fields and hashes. Parse::Binary::FixedFormat is a Perl module to convert between fixed-length fields and hashes.SYNOPSIS use Parse::Binary::FixedFormat; my $tarhdr = new Parse::Binary::FixedFormat ; my $buf; read TARFILE, $buf, 512; # create a hash from the buffer read from the file my $hdr = $tarhdr->unformat($buf); # $hdr gets a hash ref # create a flat record from a hash reference my $buf = $tarhdr->format($hdr); # $hdr is a hash ref # create a hash for a new record my $newrec = $tarhdr->blank();Parse::Binary::FixedFormat can be used to convert between a buffer with fixed-length field definitions and a hash with named entries for each field. The perl pack and unpack functions are used to perform the conversions. Parse::Binary::FixedFormat builds the format string by concatenating the field descriptions and converts between the lists used by pack and unpack and a hash that can be reference by field name. Requirements: · Perl


Parse::Binary::FixedFormat Related Software