Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: sed/awk/grep to Perl

by choroba (Archbishop)
on Nov 09, 2020 at 15:15 UTC ( #11123529=note: print w/replies, xml ) Need Help??


in reply to sed/awk/grep to Perl

If they work and you have other urgent tasks, it's OK to leave them as they are.

The main benefits of not shelling out are a performance and safety improvements: A single Perl process usually works much faster than Perl calling a shell calling grep etc. And as variables are real variables in Perl (while in the shell, we only have simple expanding macros), you don't need to worry about whitespace or quotes in their values.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2021-01-21 23:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?