Perl Script File Manipulation Easy

Verify Perl Installation in Computer:
Once the perl binary is installed it is possible to check the version of perl installed in your system. This simple command helps us find information on the version of perl being installed in the system.
D:>perl -v
This is perl 5, version 12, subversion 1 (v5.12.1) built for MSWin32-x86-multi-t
hread
Copyright 1987-2010, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
We've been constantly adding new features to our websites that I launched recently. I added a drop down menu of 200+countries across the globe today. I had a text file with one country each line. I had to add option tag before and after the country name. If I'd have done it manually it would have taken more than 20 minutes. I wanted to automate this task and did write a simple perl script which does file manipulation. All the script does is opening of text file, read line by line, print the country name between option tags and create an output file.
$LOGFILE="country.txt";
open(LOGFILE) or die("could not open file");
foreach $line ()
{
chomp ($line); #removes new line
print "$line";
}
Say if the text file has five country names of the form :
usa
uk
canada
singapore
india
This script would produce outputUSAUKCanadasingaporeIndiaThis is power of perl scripting. Here is the reason why many companies choose between perl, PHP, python. If you are familiar with one such scripting language you can choose to find a promising career in web based startups, internships without any fail