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

Re: I have Wma file jammed in my regex

by ChOas (Curate)
on Jan 19, 2001 at 18:41 UTC ( [id://52991]=note: print w/replies, xml ) Need Help??


in reply to I have Wma file jammed in my regex

Hey!!!

No offence, but is this pseudo code ??
I mean it doesn't pass -w/strict in a million
years...

And I really want to help, but right now I wouldn't
know where to start hacking into it
I have to admit I hacked a bit, and now it passes strict
and -w...

My advice would be to join up your @types, and then optimize
your regex with /o... other than that...

maybe use this for your inner loop (untested, but I'm sure it's close)
foreach my $server (@servers) { my $in="$server\.txt"; open IN,"<$in" or next; my @CurType=grep /\.$type/i, <IN>; close IN; print OUT $total+=(stat)[7]/1000," KB\n" for @CurType; }

or maybe going per server instead of per type
but I'm having too much difficulty with this code to REALLY
optimize it (or see where you can gain speed otherwise) ;))

Hoped this helped though

GreetZ!,
    ChOas

print "profeth still\n" if /bird|devil/;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-20 05:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found