http://www.perlmonks.org?node_id=1025208

tfredett has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I know in some languages, such as java it is possible to create a unique variable type. What I mean by that, is you can create a variable type with a name of your choice, and it can contain different data types already defined. An example: you could create a variable type named foo, and in it, have it place two other variable types, a Boolean variable, and an int. Then anytime from then on in your code, if you create a variable of type foo, it will have in it a Boolean and a int.

The reason I am looking for this, is I am working on solving the queens problem, and my current algorithm, requires I create a two-dimensional array of the above described variable type foo. The Boolean to represent if a queen is present in a square, and the int to represent if a square is threatened by a queen. I however after looking through both perldocs and doing several different Google searches, have come up with no results that help resolve my predicament. I was hoping someone would be able to point me in the correct direction if this is indeed possible, or to be informed that this is not possible, so I may begin to contemplate an alternative.

I also ask for no help in solving the queens problem specifically, I am viewing this as a intellectual challenge, and receiving help in solving the actual problem I feel would defeat the purpose. Instead, the place where I have hit the roadblock, in this case, the creation of a new variable type. Any help is appreciated.