I am parsing a text file and I get multiple lines in the form shown below.
Then I try to split each line to three segments: Part1: sf; part2: name; part3:direction.
But now I am encountering difficulty in how to write my regular expression. I have thought about splitting on whitespace and using an array to concatenate new strings:
S15,F49 Large Recipe Download Request (LRDR) S,H->E,reply
my ($sf, $name, $direction) =~ / I don't know how to implement here/
How can I get $sf = S15,F49 // other lines like S1,F11; S6,F1; etc
$name = Large Recipe Download Request (LRDR) // different name for different $sf.
$direction = S,H->E,reply; // some time it is M,H<-E,reply or S,H<->E or S,H->E,[reply], etc. There is no white space between each of sub items for part3: $direction