From: "Dharshana Eswaran" <[EMAIL PROTECTED]>
> I was going thro the topic "Accessing packed data structures" in the Perl
> Complete Reference Book. I came across this example:
> 
> struct utmp {
> char ut_user[8]; /* User login name */
> char ut_id[4]; /* /etc/inittab id */
> char ut_line[12]; /* device name */
> short ut_pid; /* process ID */
> short ut_type; /* type of entry */
> struct exit_status ut_exit; /* The exit status of a process */
> /* marked as DEAD_PROCESS. */
> time_t ut_time; /* time entry was made */
> };
> 
> For the above structure:
> 
> The pack template given was "a8a4a12ssssl".
> 
> ...

You might also want to have a look at Inline::Struct 
http://search.cpan.org/~neilw/Inline-Struct-0.06/Struct.pod

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to