Re: Type distinguishing

2002-05-23 Thread Piers Cawley
Ovid <[EMAIL PROTECTED]> writes: > --- Barry Jones <[EMAIL PROTECTED]> wrote: >> If I have a hash full of values, and some of those values point to >> arrays of more values...in a loop, how could I distinguish which ones >> pointed to an array and which were just string values? > > Barry, > > Use

Re: Type distinguishing

2002-05-21 Thread drieux
On Tuesday, May 21, 2002, at 03:45 , Ovid wrote: > --- drieux <[EMAIL PROTECTED]> wrote: [..] >> >> http://www.wetware.com/drieux/pbl/perlTrick/WhatIsMeetsIsa.txt [..] > > Ah, but that's the point of ref. If you have a reference, it returns the > type of reference. If you have a simple scalar,

Re: Type distinguishing

2002-05-21 Thread John W. Krahn
Barry Jones wrote: > > If I have a hash full of values, and some of those values point to > arrays of more values...in a loop, how could I distinguish which ones > pointed to an array and which were just string values? > > If that doesn't make sense, here's jotted diagram: > > Hash > Key 1

Re: Type distinguishing

2002-05-21 Thread Ovid
--- drieux <[EMAIL PROTECTED]> wrote: > > On Tuesday, May 21, 2002, at 12:23 , Ovid wrote: > > > Use the 'ref' function for this: > > > > perldoc -f ref > > my complements. > > why can I never remember that one > once again thanks... I have updated > > http://www.wetware.com/drieux/pb

Re: Type distinguishing

2002-05-21 Thread drieux
On Tuesday, May 21, 2002, at 12:23 , Ovid wrote: > Use the 'ref' function for this: > > perldoc -f ref my complements. why can I never remember that one once again thanks... I have updated http://www.wetware.com/drieux/pbl/perlTrick/WhatIsMeetsIsa.txt and I think I have a possible so

Re: Type distinguishing

2002-05-21 Thread drieux
On Tuesday, May 21, 2002, at 12:17 , Barry Jones wrote: > If I have a hash full of values, and some of those values point to > arrays of more values...in a loop, how could I distinguish which ones > pointed to an array and which were just string values? eg: while ( my ( $key , $val ) =

Re: Type distinguishing

2002-05-21 Thread Ovid
--- Barry Jones <[EMAIL PROTECTED]> wrote: > If I have a hash full of values, and some of those values point to > arrays of more values...in a loop, how could I distinguish which ones > pointed to an array and which were just string values? Barry, Use the 'ref' function for this: perldoc -f

Type distinguishing

2002-05-21 Thread Barry Jones
If I have a hash full of values, and some of those values point to arrays of more values...in a loop, how could I distinguish which ones pointed to an array and which were just string values? If that doesn't make sense, here's jotted diagram: Hash Key 1 => Value Key 2 => Value Key