Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Need advice for perl use as awk replacement

by hippo (Chancellor)
on Sep 22, 2020 at 08:34 UTC ( #11122064=note: print w/replies, xml ) Need Help??


in reply to Re^2: Need advice for perl use as awk replacement
in thread Need advice in for perl use as awk replacement

actually I user double quotes in th ebash script which requires me to pu \$1 to avoid $1 to be replaced by the shell

Ah yes, you are quite right. I have to agree with brother jcb that using a one-liner for this, especially with double quotes, is just asking for trouble and will be a maintenance nightmare. Just put it all in a script and then you won't have to worry about escaping everything. Eventually, when you become more familiar with Perl and what it can do you may see the benefit in replacing all of the bash parts with Perl.

There's a place for one-liners but this doesn't look like that place to me.


🦛

  • Comment on Re^3: Need advice for perl use as awk replacement

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2021-01-20 20:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?