?

Log in

Previous Entry | Next Entry

Woot, first time since my AP computer science class five years ago I've had a use for a recursive function!

sub runner {
    get_users();
    
    if (scalar @bad_userids >= $flush_chunk) {
        flush();
    } else {
        runner();
    }
}

Comments

( 4 comments — Leave a comment )
vanbeast
Oct. 22nd, 2005 04:25 am (UTC)
recursion is badass and scary. I tend to try to avoid it but every time I have to use it I'm so glad it exists :)
daveman692
Oct. 22nd, 2005 04:26 am (UTC)
Didn't really have to use it, just the order I wrote this script it ended up being hella easy and useful.
whitaker
Oct. 22nd, 2005 06:41 am (UTC)
Dude, no use for recursion? *cries*
daveman692
Oct. 22nd, 2005 06:49 am (UTC)
Redic ain't it!!!!!1
( 4 comments — Leave a comment )