I'm curious if there is a way to pass a hash as parameters in a perl CGI script.
For example, I tried this, which doesn't seem to work:
This just passes a string that says "HASH(0x3jshdf29)" or somesuch.$test_hash{$switch_name}{'port_desc'} = 'Whatever'; $test_hash{$switch_name}{'speed'} = 'auto'; $test_hash{$switch_name}{'duplex'} = 'auto'; $test_hash{$switch_name}{'reserve_status'} = 'active'; $test_hash{$switch_name}{'port_vlan'} = '999'; $test_hash_ref = \%test_hash; print qq~<input type=hidden name="test_ref" value="$test_hash_ref">\ +n~;
Beyond breaking the hash down into its component key=>value pairs and passing each individually, then reassembling them into a hash again, is there a more elegant way to pass a data structure to a CGI form? I'd like to pass a REALLY big data structure, and the idea of doing it as 400 key=>value pairs really doesn't appeal.
Thanks for any info.
CT
In reply to Pass a hash as parameter to a CGI? by C_T
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |