Skip to main content

Posts

Showing posts with the label programming

Listing Installed Modules in Perl

perl (Swiss Army Knife of Programming) is quite efficient in data processing. Though though not enterprise class as python, perl has a substantial presence in many packages including - git downloads for Windows - present in all Linux Enterprise installations - PAR (Perl Archive Toolkit) acts like a JAR file to be packaged up One of the main problems you hit is the non-availability of packages or modules within perl. For instaance take the example of CSV module in perl. This is a very useful module if you want to play around with manipulating CSV. If you need to do cross platform scripts, below script is an efficient way to check the packages that are available "locally" in that server or machine before you start configuring your complex code.  This can be a life saver and thus you can include your packages alongside if you need. #!/usr/bin/perl # list all of the perl modules installed use File::Find ; for (@INC) { find(\&modules,$_) ; } sub modules {