in reply to Deconstructed array won't return scalar value if integer?

Are you sure your '123412341234' string is really where you expect it to be in your data structure? You could use the following to make sure:
use Data::Dumper; ... print Dumper($record);

Replies are listed 'Best First'.
Re^2: Deconstructed array won't return scalar value if integer?
by rkmase (Novice) on Nov 29, 2007 at 18:28 UTC
    Yeah, Dumper returns nothing either. Real world code example:
    '016' => { 'ind1' => ' ', 'ind2' => ' ', 'subfield' => { 'a' => { 'content' => '2009600369' } } }, '546' => { 'ind1' => ' ', 'ind2' => ' ', 'subfield' => { 'a' => { 'content' => 'English' } } },
    Like I said before - 546's content will return English, while 016 will return an uninitialized value
      I wonder if the leading 0 in 016 is causing problems. Perhaps when referencing, you could try to force this number to be a string as follows:
      $gooddata=$record->{datafield}->{'016'}->{subfield}->{a}->{content};
      Just a thought.
        That was exactly it. Thanks again!