Help for this page

Select Code to Download


  1. or download this
    my @numlist = (1,2,3,4,5);
    if (join (",", @numlist ) eq join (",", (1..$#numlist+1))) {
    ...
    } else {
           print "incorrect";
    }
    
  2. or download this
    print ( (join (",", @numlist) eq join (",", (1..$#numlist+1))) ? "corr
    +ect" : "incorrect" );