Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: regex issue

by TomDLux (Vicar)
on Aug 03, 2016 at 19:43 UTC ( #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 (Bishop) 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:  <%-{-{-{-<

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2019-12-09 18:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?