Re: [SPAM] Re: Accessing packed data structures

2007-03-14 Thread Vincent Li
On Wed, 14 Mar 2007, Dharshana Eswaran wrote: On 3/13/07, Tom Phoenix <[EMAIL PROTECTED]> wrote: On 3/13/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: > I was going thro the topic "Accessing packed data structures" in the Perl > Complete Reference Book

Re: Accessing packed data structures

2007-03-14 Thread Chas Owens
On 3/14/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: snip > The data which i need to pack and unpack to these elements are in hex > format(0x0B 0x1C 0x34 etc). It is a string of hex bytes. > Can i know about the format in which i need to supply the input? Coz i am unable to accept the hex st

Re: Accessing packed data structures

2007-03-14 Thread Jenda Krynicky
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

Re: Accessing packed data structures

2007-03-13 Thread Dharshana Eswaran
On 3/14/07, Chas Owens <[EMAIL PROTECTED]> wrote: On 3/14/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: snip > Now how do i come up with the pack template? I dont know how a enum should > be represented in the pack template. :-( > > /I8(enum)I8i8I8/ => pack template > > The above mentioned en

Re: Accessing packed data structures

2007-03-13 Thread Chas Owens
On 3/14/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: snip Now how do i come up with the pack template? I dont know how a enum should be represented in the pack template. :-( /I8(enum)I8i8I8/ => pack template The above mentioned enum just contains two elements. The data which i need to pack

Re: Accessing packed data structures

2007-03-13 Thread Dharshana Eswaran
On 3/13/07, Tom Phoenix <[EMAIL PROTECTED]> wrote: On 3/13/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: > I was going thro the topic "Accessing packed data structures" in the Perl > Complete Reference Book. I came across this example: > > struct utmp { >

Re: Accessing packed data structures

2007-03-13 Thread John W. Krahn
Tom Phoenix wrote: > On 3/13/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: > >> I was going thro the topic "Accessing packed data structures" in the Perl >> Complete Reference Book. I came across this example: >> >> struct utmp { >> ch

Re: Accessing packed data structures

2007-03-13 Thread Tom Phoenix
On 3/13/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: 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 */

Accessing packed data structures

2007-03-13 Thread Dharshana Eswaran
Hi all, 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; /*