Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Need a help for perl coding

by sundialsvc4 (Abbot)
on Apr 14, 2014 at 18:00 UTC ( [id://1082269]=note: print w/replies, xml ) Need Help??

in reply to Need a help for perl coding

First blush ...

1):- Need to get the worst path report, basically there is a word "slack" in this file & we need to search for that. each slack belongs to a particular start & end point. we need to get all the lines from "startpoint" to "slack" for this worst slack number. 2):- Now as we got the worst path, once section of this is data path & other is clock path, we need to get the all the lines from startpoint to "data arrival time". 3):- now we need to make a table from first column & fifth column in this table .sort this table & find the worst delay gate in this path.

Presumably, this is a “line by line” massive text file – who really cares how many hundreds of megabytes it is, which presumably consists of lines that begin-with or that contain (among other things) startpoint and slack.   Therefore, your first order of business will be to know how to identify those lines, and how to parse interesting bits of data from them.   Your description implies that slack_number is some kind of grouping-field but does not explain what that might be ... is the input-file, for instance, “sorted by” that field?

Moving on ... presumably the presence of a startpoint record marks the beginning of a new group (hence, the ending of the previous one), and slack, say, denotes the presence of some “interesting-to-us” data point within the present group.   I also deduce that this data must contain data_path and clock_path.   So now, at this point, I can hazard a guess as to what marks the boundaries of a particular “set of data” within this file, and what constitutes “interesting data points” within each set.

Moving on, I see a very vague (so far ...) description of what you actually want to do with each set of data ... however many such sets-of-data there might be ... expressed (as usual) in terms of what you wish to be “the final output.”   Unfortunately, at this point there are simply too-many unanswered questions.

At this point, I suggest that you add a new post to this thread, including a representative sample of the data records (i.e. enough to clearly show at least two groups of data).   Given this, you will probably get enough specific details to enable you to create the final solution to this problem ... yourself.   There is at this point no question in my mind that Perl can give you what you are looking for, and that it is a very-appropriate power tool by which to do so.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1082269]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-06-21 19:46 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.