| 作者: 藤岡和夫 | |
| 日時: 2004/4/16(22:54) |
On Fri, 16 Apr 2004 22:09:05 +0900 "Bruce." <kbk@...> さんwrote: > %hash = (a => b, c=>d, e=>f); > $hareshre = \%hash; > print keys $hashref; > > とすると > > Type of arg 1 to keys must be hash (not scalar dereference) at hash.pl line 3, near "$hashref;" > Execution of hash.pl aborted due to compilation errors. %hash = (a => b, c => d, e => f); $hashref = \%hash; print keys %$hashref; # hashのデリファレンス でいいのでは。 藤岡 和夫 FGALTS@... kazuf@... TS Networkのために http://homepage1.nifty.com/kazuf/
番号順一覧Top
スレッド順一覧Top
365. keys of anonymous hash [Bruce.] 2004/4/16(22:09)
367. Re: keys of anonymous hash [藤岡和夫] 2004/4/16(23:41)
365. keys of anonymous hash [Bruce.] 2004/4/16(22:09)
369. Re: keys of anonymous hash [Bruce.] 2004/4/17(00:16)