in reply to Roll your own!
he said he wants to rely on dos as much as possible to do the work (this is a windows shop), so rather than use builtin functions like readdir, he wants me to use a system call to 'dir' and parse the output by hand
Is your boss aware that the format of the output of dir is almost certainly changing in the next version of Windows, due to both the filesystem *and* the shell being completely overhauled? When that happens, readdir will continue to work as expected, but all legacy applications that hand-parse the dir output will break and have to be overhauled. This assumes your shop is fully committed to forever remaining a Microsoft-only shop. (If not, there are much more immediate and thorny issues with hand-rolling a readdir replacement.) It'll take you several months to hand-roll something as flexible and reliable as readdir, and it will have to be redone in 2006, if not sooner, meaning *more* months of testing.
Ask your boss if you should also code everything in machine code and rely on loops for timing.
Not using CPAN modules would be a questionable and suspect decision, but there could be arguments for it. Not using builtins sounds like something out of a Scott Adams book. If your boss is serious about this, you should be thinking about maybe taking some certifications or whatnot in your free time on the side, with a view toward getting your resume all nice and shiny-looking, in case you should happen to need it.
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
|
|---|