\(\S*)( |\ )+(\S+)/)
{
$qmnum=$1;
$qmgrade=$3;
$n++;
if ($qmold[$n] =~ m/\<\/td\>\ | (\S*):([^\(^\{]*)/)
{
$area=$1;
$desc=$2;
}
else
{
print $qm[$n];
}
if ($qmold[$n] =~ m/\((.*)\)/)
{
$completion=$1;
}
if ($qmold[$n] =~ m/\[(.*)\]/)
{
$neareststation=$1;
}
print OUTPUT "\"$qmnum\",\"$qmgrade\",\"$area\",\"$desc\",\"\",\"$neareststation\",\"$completion\"\n";
}
else
{
print $qm[$n];
}
}
close OUTPUT;
|