in reply to Question on DeFoy's range operator example

Maybe you are on MSWin where quotes behave differently to *nix? The \$, is there to prevent the shell from expanding the $, (which wouldn't happen anyway), on MSWin, you are safe to remove the backslash (as we're on *nix).

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

Replies are listed 'Best First'.
Re^2: Question on DeFoy's range operator example
by BillKSmith (Monsignor) on Jan 27, 2019 at 23:06 UTC

    Windows requires double quotes and does not allow the backslash.

    >perl -le "\$, = q( ); print q(a)..q(z)" Experimental aliasing via reference not enabled at -e line 1. >perl -le "$, = q( ); print q(a)..q(z)" a b c d e f g h i j k l m n o p q r s t u v w x y z >perl -le '$, = q( ); print q(a)..q(z)' Can't find string terminator "'" anywhere before EOF at -e line 1. >perl -le '\$, = q( ); print q(a)..q(z)' Can't find string terminator "'" anywhere before EOF at -e line 1.
    Bill
Re^2: Question on DeFoy's range operator example
by nysus (Parson) on Jan 28, 2019 at 11:32 UTC

    I'm on a Mac, bash 4.4.23.

    $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