Help for this page

Select Code to Download


  1. or download this
    $ perl -le '[%h = (1 .. 4)]'   # Fine.
    $ perl -le '[%h = (1) x 4]'
    Bizarre copy of ARRAY in anonlist at -e line 1.
    
  2. or download this
    $ perl -le 'print join ".", %h = 1 .. $_ for 1 .. 20'
    1
    ...
    1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18
    1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19
    1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20
    
  3. or download this
    $ perl -le 'print join ".", %h = map {(1, $_)} 1 .. $_ for 1 .. 10'
    1.1
    ...
    1..1.8.1..1.8.1..1.8.1..1.8
    1.9.1..1.9.1..1.9.1..1.9.1..1.9
    1..1.10.1..1.10.1..1.10.1..1.10.1..1.10