Perl: the Markov chain saw | |
PerlMonks |
Re^3: Splitting in while loopby AnomalousMonk (Archbishop) |
on Oct 07, 2021 at 07:21 UTC ( [id://11137290]=note: print w/replies, xml ) | Need Help?? |
Only a while-loop condition expression like assigns implicitly to $_ (see tybalt89's example) (update: but see kcott's post for a more complete discussion of $_ assignment special-casing). An arbitrary expression like split(...) does not. Had you had warnings enabled, Perl would have at least hinted at this problem. Give a man a fish: <%-{-{-{-<
In Section
Seekers of Perl Wisdom
|
|