title: Merging mutiple log files by timestamp in 2nd column
body: <p>I have multiple logfiles for same day . What I want to do is to merge them in to single one based on timestamp in logs using <code>Perl</code> script.</p>
  
  <p><strong>Log-1.log</strong></p>
  
  <pre><code>2014-06-02 21:54:38,805 INFO  com.HomeManeger [Executor:Thread-19]: MyInfo started for myid=TEST-401406
  2014-06-02 21:56:27,358 INFO  com.HomeManeger [Executor:Thread-13]: HomeManeger: populateMyInfo completed for my id = TEST-401406,  
  2014-06-02 21:59:32,358 INFO  com.HomeManeger [Executor:Thread-17]: MyInfo completed for myid=TEST-401405
  </code></pre>
  
  <p><strong>Log-2.log:</strong></p>
  
  <pre><code>2014-06-02 21:56:27,295 INFO  com.homeManeger.MyCommand [Proxy:ProxyService:TcpWorker:2]:     MyCommand::Processing reqest[AB:MyInfo] obj(Collection [ID={005A004A5B0F9}, ]
  ) client(POFFBObj [ID={XXXXXX-E8F5-11D5-YYY-0002B33D9D0C}, meta={}, fields=[XXX]]
  )
  2014-06-02 21:58:27,310 INFO  com.HomeManeger.UpdateMyInfoTask
  </code></pre>
  
  <p><strong>Merged Log:</strong></p>
  
  <pre><code>2014-06-02 21:54:38,805 INFO  com.HomeManeger [Executor:Thread-19]: MyInfo started for myid=TEST-401406
  2014-06-02 21:56:27,295 INFO  com.homeManeger.MyCommand [Proxy:ProxyService:TcpWorker:2]: MyCommand::Processing reqest[AB:MyInfo] obj(Collection[ID={005A004A5B0F9}, ]
  ) client(POFFBObj [ID={XXXXXX-E8F5-11D5-YYY-0002B33D9D0C}, meta={}, fields=[XXX]]
  )
  2014-06-02 21:56:27,358 INFO  com.HomeManeger [Executor:Thread-13]: HomeManeger: populateMyInfo completed for my id = TEST-401406,  
  2014-06-02 21:56:32,358 INFO  com.HomeManeger [Executor:Thread-17]: MyInfo completed for myid=TEST-401405    
  2014-06-02 21:58:27,310 INFO  com.HomeManeger.UpdateMyInfoTask
  </code></pre>
  
  <p>I am very new to <code>Perl</code> ,any help would be appreciated.</p>