Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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:  <%-{-{-{-<

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2025-07-19 23:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.