plural
I forgot how to display plural in Perl. Though I read Advanced Perl Programming before. Then it's solved by Lingua::EN::Inflect.
$ perl -MLingua::EN::Inflect=PL -le 'print PL("blog", 2)'
blogs
By the way, in python world, pipy has same module named inflect.
$ easy_install inflect
$ python
>>> import inflect
>>> p = inflect.engine()
>>> p.plural('blog', 2)
'blogs'
Okay, if I forgot again, first of all I'll search my blog :)
![]() |
Advanced Perl Programming Simon Cozens Oreilly & Associates Inc 2005-08-30 by G-Tools |
If you want an itaernctive shell in perl, the easiest way is to fire up the perl debugger in command mode.just run perl -de 1Be careful declaring lexical my vars this way. Scope becomes a single line. Aaron
Posted by: Dewa | 27 February 2012 at 08:48 PM
My partner and Ι absolutely love yоur blog and fiոd the majority of yоur post's tօ be precisely what I'm lookinɡ fοr. Ɗoes one offer guest writers to write content tߋ suit ʏour needs? I wouldn't mind creating a post οr elaborating օn a lot of the subjects yօu write about here. Aɡain, awesome web site!
Posted by: www.mystoriez.com | 17 February 2014 at 01:59 PM