| Çؽà :: À¯Çü Çؽà :: À¯Çü ¸ðµâÀº "À¯Çü"(ÇÊµå ¸ñ·Ï)¿¡ ¹ÀÎ ¹è¿·Î¼ÀÇ ÀÇ»ç Çؽø¦ Æ÷ÇÔÇÕ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
Çؽà :: À¯Çü ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À̸§:
- Laurent Dami
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~dami/
Çؽà :: À¯Çü ű×
Çؽà :: À¯Çü ¼³¸í
Çؽà :: À¯Çü ¸ðµâÀº "À¯Çü"(ÇÊµå ¸ñ·Ï)¿¡ ¹ÀÎ ¹è¿·Î¼ÀÇ ÀÇ»ç Çؽø¦ Æ÷ÇÔÇÕ´Ï´Ù. Çؽà :: À¯Çü ¸ðµâÀº "À¯Çü"(ÇÊµå ¸ñ·Ï)¿¡ ¹ÀÎ ¹è¿·Î¼ÀÇ pseudo-hashes°¡ ÀÖ½À´Ï´Ù .Synopsis´Â Çؽà :: À¯ÇüÀ» »ç¿ëÇÕ´Ï´Ù. # hash :: type my $ persontype = new hash :: type (qw (firstname lastname city)); # ÀϺΠÇؽð¡ $ Persontype Tie % Wolfgang, $ PersonType, "Wolfgang Amadeus", "Mozart", "Salzburg"¿¡ ¹¿© ÀÖ½À´Ï´Ù. $ ludwig = »õ·Î¿î $ persontype ( "·çµåºñÈ÷", "van beethoven", "ºñ¿£³ª"); $ jsb = »õ $ personType; $ jsb -> {city} = "Leipzig"; @ {$ jsb} {qw (firstname lastname)} = ( "Johann Sebastian", "Bach"); # Çʵå Ãß°¡ $ PersonType-> Add ( "Ãâ»ý", "Á×À½") ¶Ç´Â DIE "Çʵ尡 Ãß°¡µÇÁö ¾ÊÀ½"; $ Wolfgang {Ãâ»ý} = 1750; # ´õ ¿Ïº®ÇÑ ¿¹ : ù ¹ø° ÁÙ ($ headerline, @datalines) = {Chomp; $ _}; ³» $ ht = »õ·Î¿î Çؽà :: À¯Çü (split / t /, $ headerline); Foreach My $ LINE (@Datalines) {My $ Data = New $ HT (Split / T /, $ LINE); work_with ($ data -> {somefield}, $ data -> {SoundotherField}); } # ½Ã°£ ´ëü :: GMTime ¹× Time :: Localtime My $ TimeType = New Hash :: Type QW (Sec Min ½Ã°£ Mday ¿ù ¿ù ÀϳâÀÏ ¿ùÀÏ yday); my $ localtime = new $ timeType (localtime); My $ GMTime = New $ TimeType (GMTime); $ localtime -> {h ½Ã°£} - $ GMTime -> {½Ã°£}, "GMT¿ÍÀÇ ½Ã°£ Â÷ÀÌ"; # ºñ±³ ÇÔ¼ö MY $ BYAGE = $ PersonType-> CMP ( "Ãâ»ý : -num, LastName, FirstName"); MY $ BYNAMELEGHT = $ PersonType-> CMP (lastname => {±æÀÌ ($ a) ±æÀÌ ($ a)}, lastname => 'alpha', firstname => alpha '); showperson ($ _) foreach ($ byage @people Á¤·Ä); showperson ($ _) foreach ($ bynamelength @people Á¤·Ä); # Ưº° ºñ±³ : My $ US_Datecmp = $ MyHashType-> CMP ( "SomedateField : M / D / Y"); MY $ FR_INVERSEDATECMP = $ MYHASHTYPE-> CMP ( "SOMEDATEFIELD : -D.M.Y"); ¿ä±¸ »çÇ× : ¡¤ Perl.
Çؽà :: À¯Çü °ü·Ã ¼ÒÇÁÆ®¿þ¾î