[ic] Perl / Session question
interchange at thedesignpeople.com
interchange at thedesignpeople.com
Wed Apr 14 20:42:58 EDT 2004
Could someone knowledgable in perl be kind enough to help me out here.
I have discovered that this works to manually set the discount:
$Session->{discount} = ({
'code1' => '199',
'code2' => '199',
'code3' => '199'
});
I thought the following would have the same effect but does not work:
# create empty array
@arrayval = ();
# create a hash
$hashval = {
'code1' => '199',
'code2' => '199',
'code3' => '199'
};
# put the hash into an array
push @arrayval, $hashval;
$Session->{discount} = @arrayval;
The script dies with the following error:
Runtime error: Can't use string ("1") as a HASH ref while "strict refs"
in use at /www/interchange/interchange-5/lib/Vend/Interpolate.pm line 5151.
I'm not sure what this error means.
Can someone please explain what I'm doing wrong?
Thanks
Mike Kang
More information about the interchange-users
mailing list