Re: type comparison in perl
- From: noreply@xxxxxxxxx (Gunnar Hjalmarsson)
- Date: Fri, 31 Aug 2007 21:22:48 +0200
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 will always be a hashref or a string,
perldoc -f ref
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
.
- References:
- type comparison in perl
- From: Hunter Barrington
- type comparison in perl
- Prev by Date: type comparison in perl
- Next by Date: Re: debugging Perl/XS
- Previous by thread: type comparison in perl
- Index(es):
Relevant Pages
|
|