Help for this page

Select Code to Download


  1. or download this
    my $string = "293F:2945";
    
    my ( $low, $high ) = unpack( 'nn', pack( 'H4H4', unpack( 'A4xA4', $str
    +ing ) ) );
    print "$_  " for unpack( '(H4)*', pack( 'n*', $low .. $high ) );
    
  2. or download this
    293f  2940  2941  2942  2943  2944  2945
    
  3. or download this
    sub enum_hex_range_from_string {
        my ( $low, $high ) 
            = unpack( 'nn', pack( 'H4H4', unpack( 'A4xA4', $string ) ) );
        return unpack( '(H4)*', pack( 'n*', $low .. $high ) );
    }