Hatena::Groupperl

Press::Alt_R

2010-07-01

Perlわかば(リスト/map)

#!perl
use strict;

my @list = qw( apple banana cherry dorian);
my @nlist = (10,20,30,40,50,60);
my %hash = ( "a"=> "apple", "b"=>"banana");

my @l_list = map{uc $_;} @list;

print join "\n", @l_list;