Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: Perl script to delete files using regex

by GrandFather (Saint)
on Nov 24, 2020 at 01:30 UTC ( [id://11124105]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Perl script to delete files using regex
in thread Perl script to delete files using regex

Clarity is rather in the eye of the beholder. But as a general thing smaller code (as long as it's not obfuscated) is easier to unpack. In this case there are two Perlish things that are likely to trip up a novice. The first is grep which is easy to find documentation for. The second is the list assignment which is kinda hard to formulate a good search for!

The saving grace is for novices who don't know what they don't know the assignment looks kinda innocuous and it's likely their eyes just glaze over for a moment as they recognize it as a wobbly assignment and move on. For this example that's pretty much OK because the real lesson is filtering a list. That said, YMMV!

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
  • Comment on Re^4: Perl script to delete files using regex

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2024-04-25 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found