| ArrayHashSearch. PerlÀÇ ¹è¿ ¹× Çؽà ¿ë °Ë»ö À¯Æ¿¸®Æ¼ |
Áö±Ý ´Ù¿î·Îµå |
ArrayHashSearch. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À̸§:
- Serge Tsafak
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~tsafserge/
ArrayHashSearch. ű×
ArrayHashSearch. ¼³¸í
PerlÀÇ ¹è¿ ¹× Çؽø¦À§ÇÑ °Ë»ö À¯Æ¿¸®Æ¼ ArrayHashSearch´Â ÁÖ¾îÁø °ª¿¡ ´ëÇÑ N Â÷¿ø ¹è¿ ¹× / ¶Ç´Â Çؽø¦ °Ë»öÇÏ´Â ·çƾÀ» Á¦°øÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù.ÀÌ ·çƾÀº ´Ù¸¥ ·çƾ¿¡¼ ¹Ýȯ ÇÑ º¹ÀâÇÑ µ¥ÀÌÅÍ ±¸Á¶¿¡¼ ƯÁ¤ °ªÀÇ Á¸À縦 Å×½ºÆ®ÇÏ´Â »ç¶÷µé¿¡°Ô À¯¿ëÇÕ´Ï´Ù. ÇöÀç Arrays / Çؽø¦ °Ë»öÇÏ´Â ÀÌ·¯ÇÑ ³»Àå ÇÔ¼ö´Â ¾Æ´Ï¸çÀÌ ¸ðµâÀ» »ç¿ëÇÏ¿© ½Ã°£À» Àý¾à ÇÒ ¼ö ÀÖ½À´Ï´Ù .Snopsis ArrayHashSearch¸¦ »ç¿ëÇϽʽÿÀ. My $ dummyarrayref = ; My $ DummyArrayRef2 = ; if (array_contain ($ dummyarrayref, 7)) {print "°ª 7ÀÌ ¹è¿¿¡ Á¸ÀçÇÕ´Ï´Ù!"; } if (array_deeply_contain ($ dummyarrayref2,7)) {print "°ª 7ÀÌ ¹è¿¿¡ Á¸ÀçÇÕ´Ï´Ù!"; } ´õ º¹ÀâÇÑ ¿¹ : ¾ö°ÝÇÑ »ç¿ë; °æ°í¸¦ »ç¿ëÇϽʽÿÀ. ArrayHashSearch¸¦ »ç¿ëÇϽʽÿÀ. My $ dummyarray1 = ; ³» $ dummyarray2 = ; ³» $ dummyarray3 = ; ³» $ dummyhash1 = {1 => 'a', 2 => 'b', 3 => 'c'}; My $ DummyHash2 = {1 => $ dummyhash1,2 => 'd', 3 => 'e'}; ³» $ dummyhash3 = {1 => 'f', 2 => 'g', 3 => $ dummyhash2}; My $ DummyTructure1 = ; ³» $ dummystructure2 = {1 => 'h', 2 => $ dummystructure1,3 => 'i'}; array_deeply_contain ($ dummyArray3,5)À̸é "¹è¿ ºù°í! \ n"Àμâ; hash_deeply_contain ($ dummyhash3, 'a')À» ÀμâÇÏ´Â °æ¿ì "Çؽà ºù°í! \ n"À» ÀμâÇϽʽÿÀ. Deeply_Contain ($ dummystructure1, 5)À̸é "Array / Çؽà ºù°í! \ n"À» ÀμâÇϽʽÿÀ. deeply_contain ($ dummystructure2, 'a')À» ÀμâÇÏ´Â °æ¿ì "Çؽà / ¹è¿ bingo! \ n"À» ÀμâÇϽʽÿÀ. ¿ä±¸ »çÇ× : ¡¤ Perl.
ArrayHashSearch. °ü·Ã ¼ÒÇÁÆ®¿þ¾î