Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Embedding perl in bash

by AppleFritter (Vicar)
on Oct 22, 2015 at 20:44 UTC ( [id://1145686]=note: print w/replies, xml ) Need Help??


in reply to Embedding perl in bash

Yes, this can easily be done using backticks:

#!/bin/sh INPUT="A String of text"; RESULTS=`echo $INPUT | perl -pe 's/String/Wall/g'` echo $RESULTS # A Wall of text

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-19 04:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found