Re: Timeout required for FTP

2003-07-21 Thread Paul Hoffman
1179 B15 2SQ Fax+44 (0)121 472 0298 United Kingdom E-Mail [EMAIL PROTECTED] [...] -- Paul Hoffman :: Taubman Medical Library :: Univ. of Michigan [EMAIL PROTECTED] :: [EMAIL PROTECTED] :: http://www.nkuitse.com/

Re: newbie question: isbn -> marc?

2003-08-21 Thread Paul Hoffman
Z39.50 a bit simpler: use Zoose; $z = Zoose->new( 'host' => $host, 'port' => $port, ... ); $rs = $z->search('isbn' => $isbn); foreach my $i (1..$rs->count) { $book = $rs->match($i); print $book->title_

Re: newbie question: isbn -> marc?

2003-08-21 Thread Paul Hoffman
me error message from Event.pm ("Can't call method "attributes" without a package or object reference") and I *think* it was the result of my using the wrong search syntax or options, or otherwise screwing up -- and I'm *not* behind a firewall. Paul. -- Pau

Re: newbie question: isbn -> marc?

2003-08-22 Thread Paul Hoffman
. -- Paul Hoffman :: Taubman Medical Library :: Univ. of Michigan [EMAIL PROTECTED] :: [EMAIL PROTECTED] :: http://www.nkuitse.com/

Re: NACO Normalization and Text::Normalize

2003-08-25 Thread Paul Hoffman
MARC::Transform::StripInitialArticles->new, some_other_transforms(), ); foreach my $t (@ transforms) { $t->transform($_) foreach @records; } Thanks for your hard work. Paul. -- Paul Hoffman :: Taubman Medical Library :: Univ. of Michigan [EMAIL PROTECTED] :: [EMAIL PROTECTED] :: http://www.nkuitse.com/

Re: Inserting a list into an object's attribute

2003-09-25 Thread Paul Hoffman
f: my @ids = @{ $self->term_ids }; foreach (@ids) { ... } } HTH, Paul. -- Paul Hoffman :: Taubman Medical Library :: Univ. of Michigan [EMAIL PROTECTED] :: [EMAIL PROTECTED] :: http://www.nkuitse.com/

Re: creating a standard Perl module

2003-10-01 Thread Paul Hoffman
ew CPAN authors. at some point Also, you might want to look into Module::Build -- you can use it instead of, or in addition to, ExtUtils::MakeMaker. HTH, Paul. -- Paul Hoffman :: Taubman Medical Library :: Univ. of Michigan [EMAIL PROTECTED] :: [EMAIL PROTECTED] :: http://www.nkuitse.com/

Re: Return values from MARC::Record

2003-11-06 Thread Paul Hoffman
the method 'subfield' on the value it returns. You could also do it like this if you want to keep things concise: $subfield = ($record->field($tag) || die "No tag '$tag' in record")->subfield($sub); But that's getting a wee bit obfuscated. Paul. --

Re: Return values from MARC::Record

2003-11-07 Thread Paul Hoffman
eval { $record->field('035')->subfield('9') }; But this it will fail getting 035 $a $subfield = eval { $record->field('035')->subfield('a') }; @subfields = eval { $record->field('035')->subfield('a') }; I don't see h

Re: Return values from MARC::Record

2003-11-07 Thread Paul Hoffman
On Friday, November 7, 2003, at 08:23 AM, Paul Hoffman wrote: On Thursday, November 6, 2003, at 08:45 PM, Leif Andersson wrote: Assume we have a record with two 035 fields 035 -- $91234567 035 -- $a(XX)12345678 Now, this code will get the 035 $9 subfield: $subfield = eval { $record->fi

Re: Return values from MARC::Record

2003-11-07 Thread Paul Hoffman
On Friday, November 7, 2003, at 02:07 AM, Leif Andersson wrote: At the top of MARC::Record we add: use Want; This would introduce a dependency on Perl 5.6, which Want requires. MARC::Record currently only requires 5.5, as far as I can tell. Paul. -- Paul Hoffman :: Taubman Medical Library

Re: Return values from MARC::Record

2003-11-07 Thread Paul Hoffman
On Friday, November 7, 2003, at 11:29 AM, Leif Andersson wrote: You mean 5.005? Maybe that's what is required. Oops, yes, thanks for the correction. Paul. -- Paul Hoffman :: Taubman Medical Library :: Univ. of Michigan [EMAIL PROTECTED] :: [EMAIL PROTECTED] :: http://www.nkuitse.com/

Re: Early Confusion with MARC::Record

2003-11-14 Thread Paul Hoffman
they also belong in 245 $a. I suggest looking at MARC records for works that you own, comparing the MARC record with the title page etc. That should help you get a better feel for practical MARC usage more quickly than just reading documentation. Paul. -- Paul Hoffman :: Taubman Medical Library :: Univ. of Michigan [EMAIL PROTECTED] :: [EMAIL PROTECTED] :: http://www.nkuitse.com/

Re: Early Confusion with MARC::Record

2003-11-14 Thread Paul Hoffman
pget')) { warn "Edit this script--MARC::File now has a skipget() method"; } else { *MARC::File::skipget = sub { ... your code here ... }; } These tricks sometimes come in handy. Paul. -- Paul Hoffman :: Taubman Medical Library :: Univ. of Michigan [EMAIL PROTECTED] :: [EMAIL PROTECTED] :: http://www.nkuitse.com/

Re: MARC::Record in CVS and testing

2003-11-25 Thread Paul Hoffman
mined MARC::Record's test suite closely, but what I've seen looks very well done, so you should be able to learn from it. Paul. -- Paul Hoffman :: Taubman Medical Library :: Univ. of Michigan [EMAIL PROTECTED] :: [EMAIL PROTECTED] :: http://www.nkuitse.com/

Re: Extracting data from an XML file

2004-01-05 Thread Paul Hoffman
have XML::Twig installed, I'm just going by the documentation on CPAN. For more info (including a tutorial) see http://www.xmltwig.com/xmltwig/>. Paul. -- Paul Hoffman :: Taubman Medical Library :: Univ. of Michigan [EMAIL PROTECTED] :: [EMAIL PROTECTED] :: http://www.nkuitse.com/

Re: Extracting data from an XML file

2004-01-06 Thread Paul Hoffman
ath => sub {$id = $_[1]->text; $twig->purge }}); $twig->parsefile($file); $twig->purge; print " author: $author\n title: $title\n id: $id\n\n"; Have you considered using a regular expression to extract the teiHeader? Maybe the folks at PerlMonks would hav

Re: MARC.pm questions

2004-05-18 Thread Paul Hoffman
ng $record unnecessarily; I doubt this is the problem, but you never know. (What's in $record?) Try $marc->addfield({record=>$record, ...}) instead. (The examples in MARC.pm use unnecessary stringification, so I don't blame you!) Paul. -- Paul Hoffman :: Taubman Medical Libra

Re: Displaying diacritics in a terminal vs. a browser

2004-07-01 Thread Paul Hoffman
ttle and need some basic documentation on how to run the Perl scripts. Andy. Andrew Houghton, OCLC Online Computer Library Center, Inc. http://www.oclc.org/about/ http://www.oclc.org/research/staff/houghton.htm -- Paul Hoffman :: Taubman Medical Library :: Univ. of Michigan [EMAIL PROTECTED] :: [EMAIL PROTECTED] :: http://www.nkuitse.com/

Re: Syntax for Multiple conditions

2005-03-23 Thread Paul Hoffman
mp; $fix eq '1' and $juvie eq 'j') This is because 'a eq b' expressions are evaluated before 'c && d' expressions, which are evaluated before 'e and f' expressions. Paul. -- Paul Hoffman :: [EMAIL PROTECTED] :: http://www.nkuitse.com/

Re: History of MARC/Perl

2008-11-06 Thread Paul Hoffman
CPAN) of the software that you're seeking. > > Hope this gives you some leads to the early history that you're > documenting! > > Harvey You might also check BackPAN: http://backpan.perl.org/ http://backpan.cpan.org/ The oldest I saw (from a cursory search) was MARC-0.81 from 1999-10-05: http://backpan.perl.org/authors/id/B/BB/BBIRTH/ Paul. -- Paul Hoffman <[EMAIL PROTECTED]>

Re: A library agnostic datastructure for MARC ?

2010-11-12 Thread Paul Hoffman
rint the record if there were any my $changed; $changed = $_->[DELETE] = 1 for grep { $_->[TAG] =~ /9/ } @$fields; print marcbuild($leader, $fields) if $changed; } \*STDIN; It's meant to be simple (one module, three main functions, ca. 340 LOC total), robust (won't barf on invalid UTF-8 or bad leaders), and *fast* -- but if you prefer an object-oriented interface then it's probably not a good fit. Paul. -- Paul Hoffman

Re: MARC-in-JSON in MARC::Record

2011-01-18 Thread Paul Hoffman
IMO this belongs in a separate module, not in MARC::Batch or MARC::Record. Small pieces, loosely joined! Paul. -- Paul Hoffman

Re: MARC-in-JSON in MARC::Record

2011-01-18 Thread Paul Hoffman
On Tue, Jan 18, 2011 at 09:09:59AM -0500, Galen Charlton wrote: > Hi, > > On Tue, Jan 18, 2011 at 9:06 AM, Paul Hoffman wrote: > > IMO this belongs in a separate module, not in MARC::Batch or > > MARC::Record.  Small pieces, loosely joined! > > MARC::Record and MARC

Re: Add 006 and 007 tags to records?

2011-05-12 Thread Paul Hoffman
On Thu, May 12, 2011 at 11:58:07AM -0400, Nolte, Jennifer wrote: > I am working on a shell script that will process the MARC records that > represent items from our e-serials management database, and the thing > I am stuck on is adding brand new 006 and 007 fixed field tags to each > record. I am u

Re: Anybody know what this USMARC.pm error is?

2011-05-23 Thread Paul Hoffman
somefields.pl line > 25. Sorry, I can't help with the Perl code, but it sounds to me like a bad record. > Here's the record it appears to have choked on while pulling the 245: Could you please repost the record as an attachment? Paul. -- Paul Hoffman

Re: Invalid UTF-8 characters causing MARC::Record crash.

2011-06-17 Thread Paul Hoffman
to the raw MARC record. (Fixing miscoded records that MARC::Record et al. couldn't handle was what motivated me to write it in the first place.) Paul. -- Paul Hoffman

Re: Anyone create MFHD records using MARC/Perl

2011-09-09 Thread Paul Hoffman
>[VALREF] } } grep { $_->[TAG] eq '001' } @$fields; Paul. -- Paul Hoffman

Re: Fwd: some transformations on file

2013-01-20 Thread Paul Hoffman
->8---->8---- Let us know if you need help writing read_next_record_from() or sysnum(). Paul. -- Paul Hoffman

Re: reading and writing of utf-8 with marc::batch

2013-03-26 Thread Paul Hoffman
rchiconfrérie de la Sainte-Face > 13000 records > $ This looks like double-encoding: 6c 27 41 72 63 68 69 63 6f 6e 66 72 c3 83 c2 a9 |l'ArchiconfrÃ.©| 0010 72 69 65 |rie| LATIN SMALL LETTER E WITH ACUTE is supposed to be c3 a9 (as it is in the first marcdump output) not c3 83 c2 a9. Paul. -- Paul Hoffman