Help for this page

Select Code to Download


  1. or download this
    sysread( FCS, my $data, $eData - $sData ) or die $!;
    
  2. or download this
    my %text = split $delim, $text;
    
  3. or download this
    my %text = split quotemeta( $delim ), $text;
    
  4. or download this
    if( $text{ '$DATATYPE' } eq 'I' and defined $text{ '$P1R' } ) {
        my $mask = $text{ '$P1R' } - 1;
        $_ &= $mask for @data;
    }
    
  5. or download this
    my $par = $text{ '$PAR' };
    
    for( my $i = 0; $i < @data; $i += $par ) {
        print join ' ', @data[ $i .. $i + $par - 1 ];
    }
    
  6. or download this
    my %tmpls = (
        '1,2,3,4' => {
    ...
            D => { 64 => 'd>*' },
        },
    );
    
  7. or download this
    my $tmpl = $tmpls{ $text{ '$BYTEORD' } }
                     { $text{ '$DATATYPE' } }
                     { $text{ '$P1B' } };
    
  8. or download this
    #! perl -slw
    use strict;
    ...
    for( my $i = 0; $i < @data; $i += $par ) {
        print join ' ', @data[ $i .. $i + $par - 1 ];
    }