in reply to Question on DeFoy's range operator example

Ah, dammit. I was using single quotes and he has double quotes. My bad.

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks

  • Comment on Re: Question on DeFoy's range operator example

Replies are listed 'Best First'.
Re^2: Question on DeFoy's range operator example
by nysus (Parson) on Jan 28, 2019 at 11:45 UTC

    but I'm still not sure why he is backslashing $,

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks

      It's not needed, but doesn't hurt. `$,` is not a valid variable name in bash, but if you don't remember the bash rules, you can safely quote every $.

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