Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Applying regex to each line in a record.

by pritesh_ugrankar (Monk)
on Oct 24, 2020 at 20:41 UTC ( #11123133=note: print w/replies, xml ) Need Help??


in reply to Applying regex to each line in a record.

Hi Choroba and Tybalt,

Thank you for the answer!! Truly amazing. It gets rid of the "m" vs "s" confusion by simply not using them!!

I was breaking my head on this for quite a while, and you guys have given such an elegant answer in no time. Some times makes me feel like giving up scripting, but it's too fun and productive. Besides, I still haven't been shooed away from here, so till then I'll stick around. :D

Replies are listed 'Best First'.
Re^2: Applying regex to each line in a record.
by AnomalousMonk (Bishop) on Oct 24, 2020 at 21:09 UTC
    It gets rid of the "m" vs "s" confusion by simply not using them!!

    /pattern/ is equivalent to m/pattern/. | Nope, pritesh_ugrankar is referring to the /m and /s modifiers! But the following are still a good read. :) See perlre, perlretut (highly recommended!) and perlreref for regex info; also perlop for the m// and s/// (and tr///) operators.


    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://11123133]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2021-10-24 19:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (89 votes). Check out past polls.

    Notices?