Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Applying regex to each line in a record.

by choroba (Archbishop)
on Oct 24, 2020 at 21:46 UTC ( #11123138=note: print w/replies, xml ) Need Help??


in reply to Re: Applying regex to each line in a record.
in thread Applying regex to each line in a record.

> without a regex at all, thanks to the split() function.

Note that the first argument to split, even if you write it as ':', is a regex. Only a space is special.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^3: Applying regex to each line in a record.
by stevieb (Canon) on Oct 25, 2020 at 16:01 UTC

    I was hoping that nobody would notice and point that out ;)

    But yes, choroba is absolutely correct in his assessment.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2021-01-18 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?