Help for this page

Select Code to Download


  1. or download this
    @array = ('a'..'z');
    print $_,$/ for @array;
    
  2. or download this
    printf "%02d: %s\n", $_+1, $array[$_] for 0..$#array;
    
  3. or download this
    $ perl -MO=Deparse foo.pl
    @array = ('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
    ...
        printf "%02d: %s\n", $_ + 1, $array[$_];
    }
    foo.pl syntax OK