Hello.
I have a text file including the lines below:
/* MY TXT File LINE */
/* MY TXT File LINE MORE */
constant private FileName = <A "C:\\TMP\\ALARM.TXT">
constant ConfigAlarms = <U1 0> /* Comment Here*/
I don't know how to divide the comment lines (/* something */
):
LINE1:
/* MY TXT File */
LINE2: (acturally i don't think the line is a really comment line.)
constant ConfigAlarms = <U1 0> /* Comment Here*/
my code below.
if ($val =~ /\/\*/){
print "<!-- $line -->";
print "\n";
}
LINE1 and LINE2 will be treated as comment.
I googled and found the information below.
^f # f at the beginning of a line
^ftp # ftp at the beginning of a line
e$ # e at the end of a line
tle$ # tle at the end of a line
but i don't know how to combine /*
with the ^
and $
character to improve my code to parse the Line starting with /*
and end with */
Thank you.