Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6601109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:42:38+00:00 2026-05-25T18:42:38+00:00

I need to read one block from file and then need to match the

  • 0

I need to read one block from file and then need to match the particular patterns and get the values for the matched pattern.

> Call report:$VAR1 = {
>           'service_status' => 'DIAL-IN-SEQUENTIAL',
>           'called_id' => '761',
>           'id' => '41298',
>           'redirect_number' => undef,
>           'profile_id' => '137',
>           'not_answered_action' => '0',
>           'call_landed_day' => '1',
>           'call_end_status' => 'CALLER_HANGSUP',
>           'announce_caller_type' => '0',
>           'user_id' => '143',
>           'follow_me_group' => '135',
>           'call_end_time' => '29/11/2010 09:39:57',
>           'findme_id' => '135',
>           'fmsonenumber' => '43902761',
>           'profile_cause' => 'IMMEDIATE_OVERRIDE',
>           'fms_id' => '85dd3b2a-fb6e-11df-a0b0-a1f3d600a5a6',
>           'caller_type' => 'UNKNOWN',
>           'fms_type' => 'FOLLOWME',
>           'profile_desc' => 'office',
>           'caller_id' => '43902761',
>           'call_landed_time' => '29/11/2010 09:39:55'
>         };

From the above block I need to read the block between two { } braces.After that I want to match the particular pattern like service_status and then after matching the service_status pattern should retrieve the value of the service_status as DIAL-IN-SEQUENTIAL.Likewise I need to match the patterns in some of the lines and get the values for that patterns. How can we achieve this?. If anyone know the way to solve this pls give me the solution.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:42:39+00:00Added an answer on May 25, 2026 at 6:42 pm

    You can process the file so that it became a valid perl module that contains a definition of an array of hashes. Write a filter (or do it with emacs/vim or your favorite editor) to substitute the “Call report:$VAR1 = {” to a statement that pushes the hash into an array, something like “push @all_hashes, {“.

    Then you can use the module and iterate through the variables as normal perl hashes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to read different values stored in a file one by one. So
I need to read the editurl from one jqgrid for use in a DND
Actually in one of my project i need to read images from remote server
I need to read 16 bits from the binary file as std::string or char
I need to read data from XML to a List<>. The XML file contains
Is it possible to read/write data from/to a file in a PL/SQL block without
I really need to use $this->Session->read('id') in one of the model's method therefore I
I need to make a query to one of Google's services. I read this
I need to read test.TXT file(tab delimited) into MATLAB. TXT file have form: Datum
I need to read certain statistics from iw_statistics structure, here's the code: struct net_device

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.