- or download this
#! /usr/bin/perl -l
use strict;
...
my %h = map { "$_" => "$_" } @arr ;
print "$_ --> $h{$_}" foreach ( keys %h ) ;
- or download this
syntax error at ./t.pl line 7, near "} @arr "
Execution of ./t.pl aborted due to compilation errors.
- or download this
my %h = map { $_."" => "$_" } @arr ; - or download this
4 --> 4
1 --> 1
3 --> 3
2 --> 2
5 --> 5