Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Doubt in code - Beginner in perlby jimpudar (Pilgrim) |
on Dec 28, 2018 at 08:45 UTC ( [id://1227780]=note: print w/replies, xml ) | Need Help?? |
Glad you got your question answered. Just wanted to reiterate, welcome to the wonderful world of Perl. You have truly chosen one of the most interesting and useful languages available! I encourage you to check out perlrun to learn about some of Perl's many command line options. These enable you to write very cool "one-liners" such as the following reproduction of your program: perl -wlnE '$w{$_}++; END { say "$_ has appeared $w{$_} times" for sort keys %w }' Happy coding! πάντων χρημάτων μέτρον έστιν άνθρωπος.
In Section
Seekers of Perl Wisdom
|
|