I am trying to parse a file that looks like this :
TIME: 07/24/13 15:30:04
ASPATH: 172193 19601 14835 19074 19420 4704 8266 9486 8580
I already starting working on the parser, but since i am new to perl, i can't figure out how i may parse a particular line that troubles me which is,
ASPATH: 172193 19601 14835 4758 15731 3341
These are graph nodes, meaning links 172193-->19601--->14835 and so on. I don't want to store this Data in my database as it is, rather, i want to break it and insert each node in the database(because of relation with the database of node which this table will link to) with an index representing the path. So for example,
node index
172193 1
19601 2
14835 3
and so on.....
So the index is meant to make me know the connection between the nodes. So if i start to process the next record, it will start from index 1 again.
This is what i already have not including all attributes (especially ASPATH) yet which troubles me.
} elsif (/^ASPATH/) {
##HERE IS WHERE I AM LOST AS EXPLAINED**
}