Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Do as I say. Not as I do

by clintp (Curate)
on Dec 18, 2001 at 04:29 UTC ( [id://132746]=note: print w/replies, xml ) Need Help??


in reply to Do as I say. Not as I do

I didn't think that was obfuscatory at all, and actually I thought your first example was clearer than the second. On second glance I couldn't help but notice the split, substitute, split and thought of another way to make this a bit clearer still. Untested, I don't have the input data handy:
foreach (@in) { next unless m!(.*?) # Count \s+ ($in_prefix)? (([^/]+)/ # campaign ([^/]+)/ # month ([^/]+))!x; # fname $_ = { campaign => $4, month => $5, file => $3, count => $1, sort => "$4:$5:$6" }; }
I probably blew the regex but you get the idea. :)

Log In?
Username:
Password:

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

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

    No recent polls found