puterboy has asked for the wisdom of the Perl Monks concerning the following question:
Specifically, I want to "split" a string based on a (variable) regexp I am passing, *provided* that the match is less than N characters long
If it weren't in a split I could in general do "conjunction" by using two separate matches tied together with an "&&".
If I knew the regexp in advance, I could potentially refashion it to include the length restriction intrinsically.
But I don't and I'm at a loss on how or whether I can do this within a single "/PATTERN/" expression as required by split.
And I would prefer to avoid any of the "highly experimental" options in perlre since I don't want to wake up one morning after an upgrade only to find that my code no longer works (and not knowing why...)
|
---|
Back to
Seekers of Perl Wisdom