Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: neglect warnings in open 3 HANDLE_OUT

by sandeepda (Novice)
on May 14, 2013 at 14:03 UTC ( #1033470=note: print w/ replies, xml ) Need Help??


in reply to Re: neglect warnings in open 3 HANDLE_OUT
in thread neglect warnings in open 3 HANDLE_OUT

My output stream

<May 7, 2013 1:21:59 AM IST> <Info> <Security> <BEA-090905> <Disabl +ing CryptoJ JCE Provider self-integrity check for better startup perf +ormance. To enable this check, specify -Dweblogic.security.allowCrypt +oJDefaultJCEVerification=true> <May 7, 2013 1:21:59 AM IST> <Info> <Security> <BEA-090906> <Chang +ing the default Random Number Generator in RSA CryptoJ from ECDRBG to + FIPS186PRNG. To disable this change, specify -Dweblogic.security.all +owCryptoJDefaultPRNG=true> <May 7, 2013 1:21:59 AM IST> <Notice> <Security> <BEA-090898> <Ign +oring the trusted CA certificate "CN=CertGenCA,OU=FOR TESTING ONLY,O= +MyOrganization,L=MyTown,ST=MyState,C=ka". The loading of the trusted +certificate list raised a certificate parsing exception PKIX: Unsuppo +rted OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.> <Composites> i=0 compositedetail=swlib:soaprov/soacomposite=eis/FileAdapter#eis/Fil +eAdapter# swlib:soaprov/soacomposite=eis/FileAdapter#eis/FileAdapter# starts + with swlib </Composites>
I want to print only below lines at single go not line by line
<Composites> i=0 compositedetail=swlib:soaprov/soacomposite=eis/FileAdapter#eis/Fil +eAdapter# swlib:soaprov/soacomposite=eis/FileAdapter#eis/FileAdapter# starts + with swlib </Composites>
I am using backtick I want to parse this. print `$command`;


Comment on Re^2: neglect warnings in open 3 HANDLE_OUT
Select or Download Code
Re^3: neglect warnings in open 3 HANDLE_OUT
by kennethk (Monsignor) on May 14, 2013 at 14:11 UTC
    Perhaps I just don't understand what you mean by "at single go"; given that your output stream is naturally new-line delimited, I fail to see the problem encountered by:
    while(<HANDLE_OUT>) { next if /<BEA-\d+>/; next if !/\S/; print; }
    which is pretty much what I posted above.

    Update: And then this node's parent added

    I am using backtick I want to parse this. print `$command`;
    Are you using IPC::Open3 or are you using backticks? For the latter, you would presumably need to capture the output filter it, probably by splitting on new-lines and feeding it through the loop above.

    #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

      Let me tell u bigger picture I am calling this perl from java which inturn call somejava file for validation.My server side java expects the output stream as i mentioned above .If i am printing line by line my java is getting only 1st line
        I love me some Perl, don't get me wrong; but why would you wrap Java in Perl and then in Java again? Why are you invoking 3 different technologies (there's some shell in there) when 1 will do? If the inner Java requires an external call, why aren't you invoking it from Java?

        If you are debugging a complex system, the easiest approach is to systematically debug sub systems. It sounds like your inner Java is outputting incorrectly. That means you should be debugging your Java or call-parameters, not hiding the problem in Perl.

        If you do want to just ignore the issue with Perl, then see if invoking the Perl on the command line yields the expected output. If it does, then you are invoking Perl incorrectly in your Java; if it doesn't, then modify your Perl, perhaps as I've suggested above. I can't be more specific without seeing the actual code you are using at these interfaces.


        #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2014-08-28 05:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (257 votes), past polls