Perl File Reader

Here is a quick snipet of code to read a file in perl:

#!/usr/bin/perl

$file = 'title2';
open(FILE, $file);
@lines = <FILE>;

foreach $line(@lines)
{
    print $line;
}

close(FILE);
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License