Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: How to make code smaller--saving steps and writing one liners

by perrin (Chancellor)
on May 09, 2009 at 03:46 UTC ( #762996=note: print w/replies, xml ) Need Help??


in reply to How to make code smaller--saving steps and writing one liners

In general, making things easy to read is more important than making them short. In this case though, I'd agree that you're taking the long way around without a good reason. I'd do something like this (untested!):
print ($File::Find::name =~ m/^C:\/users\/User\/Music\/(.*)$/i);
P.S. Please use strict and warnings!

Replies are listed 'Best First'.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2019-12-11 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?