Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2021-10-28 00:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (95 votes). Check out past polls.

    Notices?