When I run the code below, it works fine for a couple thousand MARC records, then starts this: str outside of string at C:/Perl64/lib/bytes_heavy.pl line 11. of uninitialized value in integer eq (==) at C:/Perl64/site/lib/MARC/File/USMARC.pm line 175. of uninitialized value $tagdata in substr at C:/Perl64/site/lib/MARC/File/USMARC.pm line 178. str outside of string at C:/Perl64/lib/bytes_heavy.pl line 11. of uninitialized value in integer eq (==) at C:/Perl64/site/lib/MARC/File/USMARC.pm line 175. of uninitialized value $tagdata in substr at C:/Perl64/site/lib/MARC/File/USMARC.pm line 178. str outside of string at C:/Perl64/lib/bytes_heavy.pl line 11. of uninitialized value in integer eq (==) at C:/Perl64/site/lib/MARC/File/USMARC.pm line 175. of uninitialized value $tagdata in substr at C:/Perl64/site/lib/MARC/File/USMARC.pm line 178. of uninitialized value $tagdata in split at C:/Perl64/site/lib/MARC/File/USMARC.pm line 195. of uninitialized value $indicators in concatenation (.) or string at C:/Perl64/site/lib/MARC/File/USMARC.pm line 200. str outside of string at C:/Perl64/lib/bytes_heavy.pl line 11. of uninitialized value in integer eq (==) at C:/Perl64/site/lib/MARC/File/USMARC.pm line 175. of uninitialized value $tagdata in substr at C:/Perl64/site/lib/MARC/File/USMARC.pm line 178. of uninitialized value $tagdata in split at C:/Perl64/site/lib/MARC/File/USMARC.pm line 195. of uninitialized value $indicators in concatenation (.) or string at C:/Perl64/site/lib/MARC/File/USMARC.pm line 200.
It does that a few dozen times, then finally dies with: str outside of string at C:/Perl64/lib/bytes_heavy.pl line 11. of uninitialized value in integer eq (==) at C:/Perl64/site/lib/MARC/File/USMARC.pm line 175. of uninitialized value $tagdata in substr at C:/Perl64/site/lib/MARC/File/USMARC.pm line 178. of uninitialized value $tagdata in split at C:/Perl64/site/lib/MARC/File/USMARC.pm line 195. of uninitialized value $indicators in concatenation (.) or string at C:/Perl64/site/lib/MARC/File/USMARC.pm line 200. 't call method "as_string" on an undefined value at getsomefields.pl line 25. Code is attached. (NOTE: When I ran this, my @tags was written so that "24." was the first $tag, so it pulled 001, but then choked on the 245.) Here's the record it appears to have choked on while pulling the 245: 00791nam a2200229 a 450000100070000000500170000700800410002400700140006501100150007903500200009403500140011404000130012804900090014109000090015009900180015910000390017724500580021626000520027430000210032653301630034787000510051075969419991129184505.0840128s1881 ctu a 00011 eng dhd-afa014baca a16-6998//r a(OCoLC)10350544 9ADH7271AM aGUAcLWS aTXAI aPS15 afilmaBa155110aBurnham, Clara Louise,d1854-1927.10a"No gentlemen"hmicroform /cby Clara Louise Burnham.0 aBoston ;aNew York :bHoughton Mifflin,cc1881. a348 p. ;c18 cm. aMicrofilm.bWoodbridge, Conn. :cResearch Publications,d1970-1978.e1 microfilm reel ; 35 mm.f(Wright American fiction ; v.3 (1876-1900), rel B-81, no. 827)13j100/1aBurnham, Clara Louise Root,d1854-1927. Suggestions what that might mean? Am I doing something wrong in my code? (As opposed to inefficient, which I'd also love to hear suggestions on if you have any.) Thanks, Mike Barrett
GetSomeFields.pl
Description: Binary data