Help for this page

Select Code to Download


  1. or download this
    tabcount( "a\tb\tc", 'three fields' );
    tabcount( "a\tb\t",  'two fields, trailing tab' );
    ...
        printf "scalar split %d\n", scalar split( /\t/, $tabby);
        printf "tr/\\t/:      %d\n", $tabby =~ tr/\t//;
    }
    
  2. or download this
    *** three fields ***
    scalar split 3
    ...
    *** two fields, leading tab ***
    scalar split 3
    tr/\t/:      2