Help for this page

Select Code to Download


  1. or download this
    open(my $fp, '<:raw', $filename) or die "Couldn't open $filename: $!";
    
    read($fp, my $type_id, 4);
    if ($type_id eq 'FORM') {
      ...
    }
    
  2. or download this
    read($fp, my $buffer, 4);
    my $type_id = unpack('A4', $buffer);
    if ($type_id eq 'FORM') {
      ...
    }