Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Trouble with back-references on Windows

by Laurent_R (Canon)
on Mar 14, 2019 at 23:23 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-24 00:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found