in reply to Parse Question

No output? Works fine for me:

$ echo foo | perl 11109932.pl This is what line looks like foo $ echo -e "foo\nbar" | perl 11109932.pl This is what line looks like foo This is what line looks like bar .ELEPHANTS $

See also How to ask better questions using Test::More and sample data.

Replies are listed 'Best First'.
Re^2: Parse Question
by catfish1116 (Beadle) on Dec 10, 2019 at 20:30 UTC

    The code worked great for me as well … until I used a file that consisted of an XML message :(

      Still works fine for me even with XML input:

      $ cat base.xml <?xml version="1.0" encoding="UTF-8"?> <root> <foo>bar</foo> </root> $ perl 11109932.pl < base.xml This is what line looks like <?xml version="1.0" encoding="UTF-8"?> This is what line looks like <root> .ELEPHANTS This is what line looks like <foo>bar</foo> .ELEPHANTS This is what line looks like </root> .ELEPHANTS $

      Your steadfast reluctance to provide an SSCCE is doing you no favours.

      ... I used a file ...

      What file?!? Throw us a frickin' bone here!


      Give a man a fish:  <%-{-{-{-<