Help for this page

Select Code to Download


  1. or download this
    somecommand 4       # run index 4 from the command table
    somecommand 4-6     # run indices 4,5,6 from the command table
    somecommand 5-      # run indices 5,6,7,8,9,10 from the command table
    somecommand -2      # run indices 0,1,2 from the command table
    
  2. or download this
    use strict;
    use warnings;
    ...
    }
    my @apples = ( ":zero:", ":one:", ":two:", ":three:", ":four:" );
    print "apples ", @apples[range_to_list( $#apples, "1-3" )], "\n";
    
  3. or download this
    maxind=10
    rstr:x:...exc:range_to_list, 'x' not numeric at rl.pl line 21.
    ...
    rstr:10-:...ret:10:
    rstr:11-:...exc:range_to_list, '11' out of range at rl.pl line 34.
    apples :one::two::three: