Help for this page

Select Code to Download


  1. or download this
    my @array = (1,2,3,4,5,6,7,8,9);
    my @array_2 = (1,2,3,4,5,6,7,8,9,,,,,,);
    
    print "Scalar of array 1 =",scalar @array,"\n";
    print "Scalar of array 2 =",scalar @array_2,"\n";
    
  2. or download this
    bash-2.03$ perl test.pl
    Scalar of array 1 =9
    Scalar of array 2 =9
    bash-2.03$
    
  3. or download this
    #split but do not toss out empty fields
    split ("\t",string,999999)