I've newly started coding in Perl and I've some problems while reading lines from word files.

Lets assume that I have a line retrieved from a MS Word file and that is assigned to $prg:

My line format that I want to read in the word file is like:

4.1.12 Speed Heading and Time

I read that line with this code:

Code

$prg->Range->Text

But it gets only the text inside the line. It doesn't get the level numbers on the left. I need to get the level numbers. I've been looking for a code on the net but unfortunately I couldn't find anything.