Skip to content

Instantly share code, notes, and snippets.

@Shinpeim
Created April 11, 2012 17:49
Show Gist options
  • Save Shinpeim/2360881 to your computer and use it in GitHub Desktop.
Save Shinpeim/2360881 to your computer and use it in GitHub Desktop.
きもい.pl
use strict;
use warnings;
use Data::Dumper;
my @arr = qw/ran miki suu dia/;
my %hash = map {$_ => "hoge", "piyo"} @arr;
warn Dumper \%hash;
# 結果
# +{
# 'piyo' => 'dia',
# 'suu' => 'hoge',
# 'ran' => 'hoge',
# 'hoge' => 'piyo'
# };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment