in reply to Re^2: Split and print hash based on regex
in thread Split and print hash based on regex
while (<DATA>)
is equivalent to
while ($_ = <DATA>)
which is interpreted as
while (defined($_ = <DATA>))
So that's how $_ is populated in the original script.
There's another question, though: How $1 is populated. Note that the matching uses =, not =~, so it's equivalent to
where the parentheses after my enforce the list context on the match, but without a capture group in the regex, there's no way to populate $1.my($regex) = ($_ =~ /This is/g)
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Split and print hash based on regex
by Maire (Scribe) on Mar 28, 2018 at 07:20 UTC | |
by AnomalousMonk (Archbishop) on Mar 28, 2018 at 15:09 UTC |