Perl Reading A File
By ET
Read from a file, and write out. Just put it here for my own reference.
#!/usr/bin/perl
$data_file=”file.csv”;
open(DAT, $data_file) || die(“Could not open file!”);
@raw_data=;
close(DAT);
#print “Content-type: text/html\n\n”;
#print “”;
foreach $lines (@raw_data)
{
chomp($lines);
($var1,$var2,$var2)=split(/\|/,$lines);
print “$var1,$var2,$var3\n”;
# print ”
\n”;
}
#print “”;
