Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^2: regex issue

by TomDLux (Vicar)
on Aug 03, 2016 at 19:43 UTC ( [id://1169100] : note . print w/replies, xml ) Need Help??

in reply to Re: regex issue
in thread regex issue

Why are you using ';;' every blank line? If you want a blank line, leave a blank line. If you want a comment, use the perl comment character, '#'.

As Occam said: Entia non sunt multiplicanda praeter necessitatem.

Replies are listed 'Best First'.
Re^3: regex issue
by AnomalousMonk (Archbishop) on Aug 04, 2016 at 05:49 UTC

    What you're seeing is a  perl -e " ... code ... " Windose command line padded out with spaces to emulate the appearance of multi-line source. The code comes from the Windoze clipboard. The original intent was to quickly cut/paste, possibly modify, and test posted code snippets, so I decided to eliminate blank lines. If I want to have something that looks like a blank line, "something" has to be there, and by convention, I use  ;; as that something.

    By the same token, because what's after the  -e switch is just a single string/line, any  # comment-to-end-of-line just clobbers the entire remainder of the line, even though the remainder appears multi-line. So, no comments.

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