hi i'll be glad if anyone could help me out with my problem.
i have an input file as :
ABC999991,020406,020406
BBD999992,020406,020406
FBE999993,020406,020406
ABF999994,020406,020406
999999991,020406,020406
999999992,020406,020406
999999993,020406,020406
999999994,020406,020406
FBE999993,020406,020406
ABF999994,020406,020406
999999995,020406,020406
i require output as:
ABC999991,020406,020406
BBD999992,020406,020406
FBE999993,020406,020406
ABF999994,020406,020406
FBE999993,020406,020406
ABF999994,020406,020406
i have written following code but it is not working
#!/usr/bin/perl -w
#Purpose : Reading from a file(input.txt)
open READ,"input.txt" || die "file does not exist $!";
while (<READ>)
{
$myfile .=$_;
}
print "$myfile";
$myfile=~s/^\d.*//gi;
print "************************************\n";
print "$myfile";
open ROUT,">>output1.txt" || die "problem $!";
print ROUT $myfile;
close ROUT;
close READ;
can someone help me out .
thanks and regards