in reply to Re^2: Any ideas for using perl as a simple pulse generator?
in thread Any ideas for using perl as a simple pulse generator?

Any tips for code to do the actual writing?
syswrite, and if you aren't checking whether your write actually succeeded, open the file in O_ASYNC mode (use sysopen for that).

But since you don't mind a variation of a couple of hundred msecs (on a delay of five hundred msecs) running it with autoflush and without O_ASYNC should be ok. Just as an unconditional sleep - writing a byte shouldn't take hundreds of msecs anyway (I presume the file you're writing to isn't on some NFS drive while the OS doesn't have any memory for file buffers). And as you said, the write takes a few tens of msecs.