At at least one point in your programming career, you’ll be asked to generate a PDF. Maybe receipts are legally required to be in PDF […]
Category: Programming
Perl Interview questions for freshers and experienced
Here is the collection of most frequently asked Perl interview questions. Perl Basics What is CPAN? Its uses? What does “use strict” , “use vars” […]
Installing XML::Parser fails and requires expat.h
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 […]
Fix Millennium Bug or y2038 Bug
Millennium Bug or y2038 Bug in Unix Machine This post is dedicated to backend programmers mainly and especially who are involved with *nix machine(s) or […]
How To fetch header information of a website using Perl
Fetching response header using Perl This is a part of banner grabbing methods and it is highly useful for penetration testers to gather server information. […]
How to find PHP version in Linux
There are many instances when we want to know which php version our server supports. It matters when you are trying to install some open […]
Various ways to print the content of hash in Perl
What is the various ways to print the contents of a hash?
Hash in Perl is nothing but an associative array i.e. Each key is associate with its value and can be displayed using either key or value. It is preferred over simpler array because instead of printing value based on index number, you can print by using key.
Ex:
[perl]$hash{'key'} = 'value';
[/perl]
We will discuss Hash fundamentals in another tutorial where I will explain everything which is required to understand hash clearly with some examples. Let’s see here, how we can display the contents of hash. We assume we have a hash defined as %hash = (some key value pairs);