Peter Scott wrote:
On Fri, 31 Aug 2007 15:08:01 -0400, Hunter Barrington wrote:
is there a type() function in perl? i need to be able to test the
contents of an array and
if (type($value)=='string' or type($value)=='int') {print "i win";}
thats basically what i need to be able to do. if it
On Fri, 31 Aug 2007 15:08:01 -0400, Hunter Barrington wrote:
> is there a type() function in perl? i need to be able to test the
> contents of an array and
> if (type($value)=='string' or type($value)=='int') {print "i win";}
>
> thats basically what i need to be able to do. if it helps i know ah
On 8/31/07, Ken Foskey <[EMAIL PROTECTED]> wrote:
> On Fri, 2007-08-31 at 15:08 -0400, Hunter Barrington wrote:
> > is there a type() function in perl? i need to be able to test the
> > contents of an array and
> > if (type($value)=='string' or type($value)=='int') {print "i win";}
>
> if( $value =
On Fri, 2007-08-31 at 15:08 -0400, Hunter Barrington wrote:
> is there a type() function in perl? i need to be able to test the
> contents of an array and
> if (type($value)=='string' or type($value)=='int') {print "i win";}
if( $value =~ m/^\d+$/ ) {
print "I am a number\n";
}
--
Ken Foskey
On 8/31/07, Hunter Barrington <[EMAIL PROTECTED]> wrote:
> is there a type() function in perl? i need to be able to test the
> contents of an array and
> if (type($value)=='string' or type($value)=='int') {print "i win";}
You probably meant to use the 'eq' (string equality) comparison
operator in
Hunter Barrington wrote:
is there a type() function in perl? i need to be able to test the
contents of an array and
if (type($value)=='string' or type($value)=='int') {print "i win";}
thats basically what i need to be able to do. if it helps i know ahead
of time that the two type in the array
is there a type() function in perl? i need to be able to test the
contents of an array and
if (type($value)=='string' or type($value)=='int') {print "i win";}
thats basically what i need to be able to do. if it helps i know ahead
of time that the two type in the array will always be a hashref o