Friday, June 18, 2010

Perl: Read Text Files and Filter Data

Perl is the language for text manipulation. Its designed in a way, to handle the data in whatever the format, and process out the data into the desired format. Lets see some text processing examples from an external text file.

Step One:
Open a text file for reading,
 open (FILE, 'data.txt');
 while () {
   print $_;
 close (FILE);

No comments:

Post a Comment