Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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
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 contemplating the Monastery: (4)
As of 2020-10-01 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (172 votes). Check out past polls.

    Notices?