[ CnUnix ] in KIDS 글 쓴 이(By): parresia (누구게) 날 짜 (Date): 2004년 5월 19일 수요일 오전 08시 27분 00초 제 목(Title): Re: [Q] Perl에서 hash 변수를 parameter로 reference로 넘기면 된답니다. #!/usr/bin/perl sub printKey { my ($myhash,$key) = @_; print "Key=$key, Value=$myhash->{$key}\n"; } %testHash = ( a => "AKey", b => "BKey", c => "CKey" ); printKey( \%testHash, "a"); printKey( \%testHash, "c"); printKey( \%testHash, "x"); |