Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^9: Adding object identifiers corresponding to matched headers and sub-headers.

by Melly (Hermit)
on Jan 19, 2007 at 15:07 UTC ( #595462=note: print w/ replies, xml ) Need Help??


in reply to Re^8: Adding object identifiers corresponding to matched headers and sub-headers.
in thread Adding object identifiers corresponding to matched headers and sub-headers.

In for a penny, in for a pound... what's the problem? Is it just specifying the files to be read or something else?

map{$a=1-$_/10;map{$d=$a;$e=$b=$_/20-2;map{($d,$e)=(2*$d*$e+$a,$e**2 -$d**2+$b);$c=$d**2+$e**2>4?$d=8:_}1..50;print$c}0..59;print$/}0..20
Tom Melly, pm@tomandlu.co.uk


Comment on Re^9: Adding object identifiers corresponding to matched headers and sub-headers.
Download Code
Re^10: Adding object identifiers corresponding to matched headers and sub-headers.
by Kiran Kumar K V N on Jan 19, 2007 at 17:42 UTC

    Hi Melly,

    We have the Log Data in 2 log files viz :- "File1.dat" and "File2.dat". The data in both the Files is as follows:

    Need to perform the following operations and store the resultant output in the file "Output.dat".

    The following to be done in both the files for the operations to be performed :-

    1) In the first instance, we have to match the headers upto the first 4 positions and neglect the last 2 digits. For eg:- we have the first headers respectively in both the files viz |8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|10|2|105 and |8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|10|2|141. They are similar, as digits are same upto the first 4 positions.

    Note :- Now as the first headers are same, we can only concentrate on these, as for rest of the matched headers, the corresponding operations would be the same.

    2) After this, we go for the second matching. Under each header, there are sub-headers. We compare the sub-headers. There are 3 sub-headers in File1.dat viz:- 36242050|58, |38929186|58 and |33554850|58. In File2.dat, the 3 sub-headers are :- |33554850|58, |36242050|58 and |36241938|58.

    We compare the sub-headers for comparing the respective digits (irrespective of their Location like 1st, 2nd, 3rd positions of each header) in both the Files.

    For eg:- In File1.dat, the 1st and 3rd sub-headers viz.:- 36242050|58 and |33554850|58 exactly match respectively in File2.dat, the 2nd and 1st sub-headers viz.:- |36242050|58 and |33554850|58.

    Now we are done with the 2nd matching.

    3) Object or Message Object is data (in the Form |5|1|6) in a Packet(a Networking Term). For eg:- |5|1|6 is one Object. Similarly |5|1|66 is another Object and so on. Identifier is one of the component in the Message Object. For eg:- in the Object |5|1|6, 5 is the first identifier, 1 is the second identifier and 6 is the third identifier. There are 'N' number (N being a real number) of Message Objects (I have mentioned just 6) under each header and sub-header.

    Now the third operation being :-

    For each matched sub-header for eg:- lets say 36242050|58 in both the Files, add the identifiers of objects (ignoring the 1st and 2nd place identifiers which are always common and adding only the identifiers at the 3rd place).

    Request you to please give your very valuable Inputs.

    Thanks and Regards,

    KiranKumar K.

      I think everyone is still waiting to see your Perl code, so we can show you where you might be able to improve it.

      How is this post different from your previous post that looks identical?

      We need to see you making an effort to solve this problem, rather than just post the same thing, over and over and over and over again.

      Alex / talexb / Toronto

      "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2014-08-30 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (290 votes), past polls