2009-09-16
配列とハッシュの書き方
|基本をすぐ忘れるので。
#配列 my @l = ("5", "1", "2", "10"); #並び替え(数字として) @l = sort {$a <=> $b} @l; #並び替え(文字列として) @l = sort {$a cmp $b} @l; print @l; #ハッシュ my $h = { a => 'aa', b => 'bb', }; print $h->{a}; #ハッシュの書き方2 my %h = ('c', 'cc', 'd', 'dd'); print $h{c};
配列値のソート
Artie2011/10/07 19:07I cannot tell a lie, that raelly helped.
auretb2011/10/08 21:20zcHbGO <a href="http://kifzcvdmuecq.com/">kifzcvdmuecq</a>
ewewjlcamk2011/10/09 02:13HvAs3S , [url=http://emxyuafusriv.com/]emxyuafusriv[/url], [link=http://heiaiteknkgy.com/]heiaiteknkgy[/link], http://hnplzmxpnquf.com/
awhocqto2011/10/11 01:33VjXfN4 <a href="http://yjshjtdkztgc.com/">yjshjtdkztgc</a>
siriizxtcom2011/10/13 01:2143Z45w , [url=http://sajtqkbwnmrr.com/]sajtqkbwnmrr[/url], [link=http://ftqmrmshcipk.com/]ftqmrmshcipk[/link], http://lhyozmigjwek.com/
Celia2012/08/20 05:18Lot of smarts in that pstonig!
ojshxlfjbsd2012/08/20 18:51DIPhD3 <a href="http://tsgltelgxmvy.com/">tsgltelgxmvy</a>
gssgrx2012/08/22 01:56ofolO8 , [url=http://jlsllqhbuudx.com/]jlsllqhbuudx[/url], [link=http://pnbqmgiozfpt.com/]pnbqmgiozfpt[/link], http://hjwddbfemgdr.com/
oujxijl2012/08/22 14:5888PD0o <a href="http://alzgddsowfkf.com/">alzgddsowfkf</a>
tqemfsrrdgj2012/08/24 21:48t9khgN , [url=http://cnglzxawxplw.com/]cnglzxawxplw[/url], [link=http://kslzusmykcmr.com/]kslzusmykcmr[/link], http://wvhcotzdehgz.com/