perl脚本删除代码抬头
"""
print "\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
print " ----------------- delect comany header --------------- \n";
print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
ARGV[0];
$indFlag = 0;
$CAFlag = 0;
$harqAllocFlag = 0;
chomp (outputFileName = outputFileName =~ s/.dec//;
outputFileName,"ecaojua_",".c");
print "output file is $outputFileName1\n";
open(inFile, "< inputFile !\n";
open(outFile1, "> outputFile1 !\n";
while(<inFile>)
{
_;
if (indFlag = 1;
next;
}
if (indFlag = 1;
next;
}
if (indFlag = 1;
next;
}
if (indFlag = 1;
next;
}
if (indFlag = 1;
next;
}
if (indFlag = 1;
next;
}
else
{
print outFile1 "$Line";
}
"""
"""
=pod
if (Line =~ /.* cellId (\d+)./)
{
1;
print outFile1 "Line =~ /. sfn (\d+)./)
{
1;
print outFile1 "Line =~ /. subFrameNo (\d+)./)
{
1;
print outFile1 "Line =~ /. dlSubframeNr (\d+)./)
{
1;
print outFile1 "Line =~ /. noOfHarqAllocations (\d+)./)
{
1;
if (harqAllocFlag = 1;
print outFile1 "noOfHarqAllocations == 0)
{
print outFile1 "indFlag = 0;
next;
}
}
if (Line =~ /. bbUeRef (\d+)./)
{
1;
print outFile1 "Line =~ /. crnti (\d+)./)
{
1;
print outFile1 "Line =~ /. rxPucchSector (\d+)./)
{
1;
print outFile1 "Line =~ /. freqOffEstPusch (\d+)./)
{
1;
print outFile1 "Line =~ /. nBundled (\d+)./)
{
1;
print outFile1 "Line =~ /. dlMaxNrOfBundledSubframes (\d+)./)
{
1;
print outFile1 "Line =~ /. bundlingSubframeIndex (\d+)./)
{
1;
print outFile1 "Line =~ /. firstCsPucchResource (\d+)./)
{
1;
print outFile1 "Line =~ /. valid (\d+)./)
{
1;
print outFile1 "Line =~ /. dlHarqProcessId (\d+)./)
{
1;
print outFile1 "Line =~ /. nrOfTb (\d+)./)
{
1;
print outFile1 "Line =~ /. maxNrOfTbs (\d+)./)
{
1;
print outFile1 "Line =~ /. isPCell (\d+).*/)
{
1;
print outFile1 "harqAllocFlag = 0;
CAFlag == 1)
{
if (firstCsPucchResource1 = firstCsPucchResource1,";
next;
}
if (valid1 = valid1,";
next;
}
if (dlHarqProcessId1 = dlHarqProcessId1,";
next;
}
if (nrOfTb1 = nrOfTb1,";
next;
}
if (maxNrOfTbs1 = maxNrOfTbs1,";
next;
}
if (isPCell1 = isPCell1\n";
$CAFlag = 0;
next;
}
}
=cut
}
close(outFile1);
close(inFile);
'''
"""