in reply to Re: split string at variable position with matching
in thread split string at variable position with matching

TIMTOWT-KISS ;)

Once you have the position with rindex (which is a great idea), why not apply substr instead of a sophisticated regex in split?

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

  • Comment on Re^2: split string at variable position with matching

Replies are listed 'Best First'.
Re^3: split string at variable position with matching
by choroba (Cardinal) on Sep 11, 2021 at 22:01 UTC
    I wanted to use "some backwards regex" ;-)

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