Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Trouble with back-references on Windows

by Laurent_R (Canon)
on Mar 14, 2019 at 23:23 UTC ( #1231297=note: print w/replies, xml ) Need Help??

in reply to Trouble with back-references on Windows

Quoting is somewhat of a mess in Perl one-liners under Windows (which is one of the reasons why I prefer to use Cygwin or bash for Windows when I have to work with Windows). It is usually better to use double quotes for the one-liner script, but that makes interpolating quotes slightly more difficult to use.

This works with the Windows command prompt:

C:\Users\Laurent>echo "abcd" | perl -nle "/(b).(d)/ && print qq/$1 $2/ +;" b d

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1231297]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2023-03-27 03:12 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (63 votes). Check out past polls.