Thanks everybody will work out the Feasible option from all these......Thanks a lot
On Mon, Jun 23, 2014 at 10:12 PM, Charles DeRykus <dery...@gmail.com> wrote: > On Mon, Jun 23, 2014 at 2:42 AM, Uday Vernekar <vernekaru...@gmail.com> > wrote: > > Hi All, > > > > > > I have following Pattern from which I need to grep only the Fail count > and > > store that in a variable. > > > > U/A/S|Test| Test |Loop | Run |Pass |Fail | > > Arguments > > | Name |Count|Count|Count|Count | > > > -----+----+---------------------------+-----+-----+-----+-----+--------------+--------------- > > | 72| Traffic Test | 1| 11| 11| > 0| > > (none) > > > > based on fail count value need to print > > > > if 0------Sucess > > if >0------Fail > > > > Another way: > > while ( <DATA>) { > ... > my $fail_count - ( split( /\|/, $_ ) )[-2]; > ... > } > > See: perldoc -f split > > -- > Charles DeRykus > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > > -- ********************************************************* Don't ask them WHY they hurt you, because all they'll tell you is lies and excuses. Just know they were wrong, and try to move on. **********************************************************