PERL(Practical Extraction and Reporting Language)
Just declare a variable like $var=undef;
and forget about its datatype or parsing while assignment operations because Perl does it all for you.
It automatically parses your variable name to the datatype by looking at the value that has been assigned to it and also handles the conversions on its own(Pretty amazing ..Right!!).Some people call Perl as a dirty language because of things like this ,I call it Smart and flexible.
Another feature of Perl that is a boon is CPAN(Comprehensive Perl Archive Network) which is an archive that started in October 1995,where authors like me(fledglings...as of now) and more experienced authors write modules and upload it on CPAN for public use. Example
File Handle Input/Output
Networking Devices
Documentation
Server Damon Utilities
World Wide Web etc
Just download it and use it as your own without fear of copy right issues or anything else.For example Perl "sort" operation implements the MergeSort module by default hence giving time Complexity O(nlogn) which is as good as it gets without worrying about running complexity for sorting.Even while reading files you don't have to worry about whether it supports UTF-8 ,binary,html,xml encoding; just open a filehandler and read it unlike Scanner class in Java which can be sometimes troublesome with the encoding.
Code for reading a file in perl
open(filehandler,"<Filename");
while($line=<filehandler>){
print $line;
}
Just try this amazing language out,I know you will fall in love with it too.
References-
http://www.perl.org/
http://en.wikipedia.org/wiki/Perl
I’ve been thinking of picking up a scripting language to add to my reservoir of programming languages and was thinking between Python and Perl. When I saw the Perl code, I kind of shied away from it because of the amount of different syntaxes it uses. Python also has a few weird syntaxes, but I believe the overall structure and readability of the Python code is a lot cleaner and easier to understand for some one just starting a scripting language to pick up. I eventually plan to tackle Perl and I hope I end up feeling the same way about Perl as you do.
ReplyDelete