How has support for capturing groups changed across recent Perl versions?

Support for capturing groups in Perl has evolved over the years, enhancing the flexibility and power of regular expressions. As Perl continues to grow, these changes improve not just syntax but also the performance and capabilities of regex operations.
capturing groups, Perl regex, Perl versions, regex enhancements, Perl updates

    # Perl Example of Capturing Groups
    my $string = "Hello World";
    if ($string =~ /(Hello) (World)/) {
        print "Captured: $1 and $2\n";  # Outputs: Captured: Hello and World
    }
    

capturing groups Perl regex Perl versions regex enhancements Perl updates