Re: Determining Reference Type

2006-06-02 Thread Luke Bakken
I, ahem, did some more digging and found that the great Perl gods have already thunk this one through and provided the ref() operator. It returns the reference type just as I need. Thanks for letting me think this out on the list. You should also look at the Scalar::Util module. -- To uns

RE: Determining Reference Type

2006-06-02 Thread Ryan Frantz
> -Original Message- > From: Ryan Frantz > Sent: Friday, June 02, 2006 1:48 PM > To: beginners > Subject: RE: Determining Reference Type > > > > > -Original Message- > > From: Ryan Frantz > > Sent: Friday, June 02, 2006 1:25 PM

Re: Determining Reference Type

2006-06-02 Thread Mr. Shawn H. Corey
On Fri, 2006-02-06 at 13:25 -0400, Ryan Frantz wrote: > If I create a reference, can I determine if it's an > arrayref of hashref? if( ref( $ref ) eq 'HASH' ){ print "It's a hash\n"; }elsif( ref( $ref ) eq 'ARRAY' ){ print "It's an array\n"; }elsif( ref( $ref ) eq 'SUB' ){ print "It's a sub

RE: Determining Reference Type

2006-06-02 Thread Ryan Frantz
> -Original Message- > From: Ryan Frantz > Sent: Friday, June 02, 2006 1:25 PM > To: beginners > Subject: Determining Reference Type > > Perlers, > > I've delving into XML for the first time, bear with me... > > I've constructed a document t

Determining Reference Type

2006-06-02 Thread Ryan Frantz
Perlers, I've delving into XML for the first time, bear with me... I've constructed a document type that is modeled after the objects found in the ADSI namespace for an IIS server and there are cases where some objects have multiple instances (new to objects too, so I hope I didn't butcher that t

Re: determining reference type

2004-04-07 Thread JupiterHost.Net
Andrew Gaffney wrote: How do you determine what type of data a reference points to? I have a function (one in previous post) that can take either an array of scalars or an array of hash references. I want to execute different code based on which one it was. How can I do that? perldoc -f ref

Re: determining reference type

2004-04-06 Thread Andrew Gaffney
WC -Sx- Jones wrote: Andrew Gaffney wrote: How do you determine what type of data a reference points to? I have a function (one in previous post) that can take either an array of scalars or an array of hash references. I want to execute different code based on which one it was. How can I do tha

Re: determining reference type

2004-04-06 Thread Wiggins d Anconia
> How do you determine what type of data a reference points to? I have a function (one in > previous post) that can take either an array of scalars or an array of hash references. I > want to execute different code based on which one it was. How can I do that? > perldoc -f ref Alternatively

Re: determining reference type

2004-04-06 Thread WC -Sx- Jones
Andrew Gaffney wrote: How do you determine what type of data a reference points to? I have a function (one in previous post) that can take either an array of scalars or an array of hash references. I want to execute different code based on which one it was. How can I do that? use the ref() func

Re: determining reference type

2004-04-06 Thread Paul Johnson
On Tue, Apr 06, 2004 at 05:15:17PM -0500, Andrew Gaffney wrote: > How do you determine what type of data a reference points to? I have a > function (one in previous post) that can take either an array of scalars or > an array of hash references. I want to execute different code based on > which

determining reference type

2004-04-06 Thread Andrew Gaffney
How do you determine what type of data a reference points to? I have a function (one in previous post) that can take either an array of scalars or an array of hash references. I want to execute different code based on which one it was. How can I do that? -- Andrew Gaffney Network Administrator S