#!/usr/bin/perl use strict; use warnings; use Data::Dumper; $| = 1; $\ = "\n"; my $foo = {}; for (0..10){ $foo->{$_} = $_ } print Dumper $foo