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 ) = each %hash ) {
my $weBe = weAreSomeWhat($val) ;
if ( $weBe eq "ARRAY" ) {
dealwithArray($val);
}elseif ( $weBe eq "HASH" ) {
....
}....
}
hence we want to resolve what this
sub weAreSomeWhat {
}
would have between the curly braces....
cf:
http://www.wetware.com/drieux/pbl/perlTrick/WhatIsMeetsIsa.txt
the other strategy is to feel more at home with doing
the OO approach and the full encapsulation of your data
cf: perldoc perlboot, perloot, perlootc
this way you put your 'sets and gets' in such a way
that you have hidden from everyone how exactly the
my $thingie = FOO::BAR->new(@configMe);
did, and that if they wish to do
my $data = $thingie->getKey2();
your mileage will vary.
ciao
drieux
---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]