in reply to Uninitialized value error

Where are you setting $cur_reg_comment? The code you presented never set a value in $cur_reg_name, $cur_reg_offset, $cur_reg_comment, or @cur_fields. If that's all the code, their values are undef (except for the array which is ()). You pass undefined values into the constructor, it passes them straight through to its underlying object stash, and then you print one of those undef values back out in line 23. Perl is kind enough to issue a warning that you might be doing something wrong.

I'm sure there's more code than you're presenting, but it looks reasonably clear that if $cur_reg_comment is empty when you call the constructor, $obj->{comment} will be empty when you try to print it.


Dave