in reply to Re: Capturing groups where the ending is optional
in thread Capturing groups where the ending is optional

Thank you. I'll examine this code. As for the $1 vs \1, there were no warnings --- I'm only using perl from the command line in a bash script. I'm pretty much a complete perl noob. Thank you for helping.
  • Comment on Re^2: Capturing groups where the ending is optional

Replies are listed 'Best First'.
Re^3: Capturing groups where the ending is optional
by AnomalousMonk (Archbishop) on Jan 15, 2018 at 03:48 UTC
    ... there were no warnings --- I'm only using perl from the command line .... I'm pretty much a complete perl noob.

    Perl noobs in particular should always enable warnings and strictures. One way to do this from the command line is
        perl -wMstrict -e "perl code here ..." whatever else ...
    (double-quotes for Windoze, single-quotes otherwise).


    Give a man a fish:  <%-{-{-{-<