| 作者: Bruce. | |
| 日時: 2004/4/17(00:16) |
Bruce. です。ありがとうございます。
> %hash = (a => b, c => d, e => f);
> $hashref = \%hash;
> print keys %$hashref; # hashのデリファレンス
>
> でいいのでは。
おっと、なんかえらい勘違いしていたようです。typoしてたし。
> 無名ハッシュというなら次のように書くほうがいいのでしょう。
>
> $hashref = { a => b, c => d, e => f};
> print keys %$hashref;
ですね。最初はちゃんと無名ハッシュでやっていたのですが。
--
木村浩一
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
mail kbk@...
web www.kt.rim.or.jp/~kbk/
番号順一覧Top
スレッド順一覧Top
368. Re: keys of anonymous hash [Koichi Yamamoto] 2004/4/17(00:10)
370. Re: keys of anonymous hash [Bruce.] 2004/4/17(00:21)
366. Re: keys of anonymous hash [藤岡和夫] 2004/4/16(22:54)