[WpProQuiz 3]
[WpProQuiz_toplist 3]
Perl quiz on Operators
Learning through sharing
Perl is such a nice language that even a beginner can write the fully working code by using simpler things available in Perl. More you know about Perl more crazy you will be about it. Its very famous for one liner stuffs and even it has many functions which can minimize our code, run time and our work too!
Map function in Perl is a nice example for it. You can replace you whole foreach code with map in a single line.
Note: Block does not need comma but expression needs coma explicitly see the examples using { block } and (expression). In simple ,it is
For fully working code on map function please visit this link For more details on map click here
There can be a situation where we need to convert IPv4 Address(32 bit) from 4 octet format i.e. 127.0.0.1 to it decimal equivalent value i.e. 2130706433 and vice-versa. We can use pack, unpack in-built Perl functions to achieve this situation or we can use Socket.pm module (if allowed) along with pack and unpack, whichever you feel easier; you can use it in your code.
I had to install XML::Parser CPAN module to parse some of the xml files. But I was getting “requires expat.h” error while installing it. In […]
Visitor Rating: 1 Stars
Visitor Rating: 5 Stars