Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: Re: how do I shorten code

by BrowserUk (Patriarch)
on May 09, 2003 at 04:39 UTC ( [id://256773]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: how do I shorten code
in thread how do I shorten code

Theoretically, you should be able to do something similar on case sensitive systems.

my @list = grep( -M < 1 } glob "$dir/b*.txt $dir/B*.txt";

I say theoretically as I don't such a system to test it on, but the multiple args in a string seems to work ok. Of course if its not just the 'B' that can vary case, then enumerating all the Txt TXt TXT tXT txT TxT tXt etc. isn't going to shorten anything:)


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-03-29 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found