Help for this page

Select Code to Download


  1. or download this
    >perl -e"print qq{\x03\x1A}" | perl -le"print uc unpack 'H*', <STDIN>"
    031A
    ...
    $perl -e'print qq{\x03\x1A}' | perl -le'print uc unpack "H*", <STDIN>'
    031A
    
  2. or download this
    my @records = map parse_rec($_),
                  map /(.{$RECSIZE})/sg,
                  do { local $/; <$fh> };
    
  3. or download this
    my @records;
    local $/ = \$RECSIZE;
    ...
    while (<$fh>) {
       push @records, parse_rec($_);
    }
    
  4. or download this
    my @records;
    local *_;
    while (read($fh, $_, $RECSIZE)) {
       push @records, parse_rec($rec);
    }