Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Doubt in code - Beginner in perl

by jimpudar (Pilgrim)
on Dec 28, 2018 at 08:45 UTC ( [id://1227780]=note: print w/replies, xml ) Need Help??


in reply to Doubt in code - Beginner in perl

Hi Perl_Programmer1992,

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!

πάντων χρημάτων μέτρον έστιν άνθρωπος.

Replies are listed 'Best First'.
Re^2: Doubt in code - Beginner in perl
by Perl_Programmer1992 (Sexton) on Dec 30, 2018 at 18:48 UTC

    That was really cool ! , it's amazing to see how a simple program like that can be written in much more efficient ways , thanks for your response and really looking forward to more great learnings.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1227780]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-24 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found