in reply to [OneLiner] What am I doing wrong in my regex?

Most likely, shell quoting was tripping up your oneliners.

In most shells, double quotes interpolate variables. As you put your Perl oneliner in between double quotes, all the dollar signs were expanded to (empty) variables. You were unlucky in the sense that your program seems to have remained valid Perl even with all variables removed.

  • Comment on Re: [OneLiner] What am I doing wrong in my regex?

Replies are listed 'Best First'.
Re^2: [OneLiner] What am I doing wrong in my regex?
by perlfan (Vicar) on Jul 18, 2014 at 20:17 UTC
    > You were unlucky in the sense that your program seems to have remained valid Perl even with all variables removed.

    Classic.