How To Use Tie::IxHash In Perl Strict Mode

Published Date Author: , Posted October 17th, 2010 at 8:58:54am

The following syntax FAILS:
[code]
use strict;
my %hash;
use Tie::IxHash;
tie %hash, Tie::IxHash;
[/code]

The SOLUTION is to wrap the Tie::IxHash declaration in single quotes. Parentheses added for better syntax:
[code]
tie (%hash, ‘Tie::IxHash’);
[/code]

No comments as yet.

Leave Your Comment  Leave a comment

All fields marked with "*" are required.