eileen1017
MIS
I need to write a short perl script that will open a document and read into each lines and compare the lines, if there is a duplicate, remove the duplicate lines. How am I able to achieve this?
$report_file="/apps/oracle/as400/dspfdall.dat";
open (REPORT, $report_file)||die "Can't open report file!\n";
$count = 0;
while ($line =<REPORT>){
$count++}
close (REPORT);
what should I put inside the while loop to compare each lines and find the duplicate and remove the duplicate?
$report_file="/apps/oracle/as400/dspfdall.dat";
open (REPORT, $report_file)||die "Can't open report file!\n";
$count = 0;
while ($line =<REPORT>){
$count++}
close (REPORT);
what should I put inside the while loop to compare each lines and find the duplicate and remove the duplicate?