in reply to syscall() struct problem.
If you just want a subsecond sleep, there are two ways that don't involve syscall():
use Time::Hires; - that transforms the plain sleep call into a sleep call that understands fractions of seconds.
Use the four argument version of select as
select(undef, undef, undef, 0.25);
to sleep for 0.25 seconds
If you're bent on using syscall(), the pack (and unpack) function will become your best friends, as these allow you to create binary structures and pointers to them. pack has all about it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: syscall() struct problem.
by bart (Canon) on Mar 29, 2006 at 20:42 UTC |