Exact data and code. Please help me to resolve this string manipulation. Really some problem still hinders me.
$VAR1 = { 'cli_config' => 'logging size', 'jobid' => '982505', 'status +' => 'skip', 'component1' => 'archive-config-log', 'test_name' => 'BE +FORE-AFTER.etest', 'testcase_name' => 'TC11327641669.xml', 'color_boo +l' => 0 }; $VAR1 = { 'cli_config' => 'logging size', 'jobid' => '9825 +05', 'status' => 'skip', 'component1' => 'archive-config-log', 'test_ +name' => 'DEFAULT.etest', 'testcase_name' => 'TC11327641669.xml', 'co +lor_bool' => 1 }; $VAR1 = { 'cli_config' => 'logging size', 'jobid' = +> '982505', 'status' => 'skip', 'component1' => 'archive-config-log', + 'test_name' => 'ORDER-ROLLBACK.etest', 'testcase_name' => 'TC1132764 +1669.xml', 'color_bool' => '' }; $VAR1 = { 'cli_config' => 'logging s +ize', 'jobid' => '982505', 'status' => 'pass', 'component1' => 'archi +ve-config-log', 'test_name' => '{PRCIII.etest: logging size 200}', 't +estcase_name' => 'TC11327641669.xml', 'color_bool' => 1 }; $VAR1 = { +'cli_config' => 'logging size', 'jobid' => '982505', 'status' => 'ski +p', 'component1' => 'archive-config-log', 'test_name' => 'ROLLBACK.et +est', 'testcase_name' => 'TC11327641669.xml', 'color_bool' => '' }; $ +VAR1 = { 'cli_config' => 'logging size', 'jobid' => '982505', 'status +' => 'skip', 'component1' => 'archive-config-log', 'test_name' => 'SI +DE-EFFECTS.etest', 'testcase_name' => 'TC11327641669.xml', 'color_boo +l' => 1 }; $VAR1 = { 'cli_config' => 'logging size', 'jobid' => '9825 +05', 'status' => 'skip', 'component1' => 'archive-config-log', 'test_ +name' => 'SYNTAX.etest', 'testcase_name' => 'TC11327641669.xml', 'col +or_bool' => '' };

In total 7 hashes. I loop through for every hash and search for the key, "test_name" and parsing the data.

for my $j(0..$len - 1 ) { my ($component1,$cli_config,$testcase_name,$test_id, $test_name, $status) = split (/\,/,$test_status[$j]); my %row = (); %row = ( component1 => $component1, cli_config => $cli_config, testcase_name => $testcase_name, test_name => "$test_name", ### This IS THE ONE status => $status, jobid => $jobid, color_bool => $color); print Dumper \%row; ##### THIS DATA SHOWN ABOVE if( $row{test_name} =~ "BEFORE-AFTER" ) { push(@loop6,\%row); } elsif( $row{test_name} =~ "DEFAULT" ) { push(@loop7,\%row); } elsif( $row{test_name} =~ "ORDER-ROLLBACK" ) { push(@loop8,\%row); } elsif( $row{test_name} =~ "PRCIII" ) { print "PRCIII------"; push(@loop9,\%row); } elsif( $row{test_name} =~ "ROLLBACK" ) { push(@loop10,\%row); } elsif( $row{test_name} =~ "SIDE-EFFECTS" ) { push(@loop11,\%row); } elsif( $row{test_name} =~ "SYNTAX" ) { push(@loop12,\%row); } }

All other "test_name" i could parse. But not the "PRCIII". Please help me out.
Thanks
rsennat

In reply to Re: problem in search pattern by rsennat
in thread problem in search pattern by rsennat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.