John Nowlin, Product Development Consultant for the College Center for Library Automation in Tallahassee, FL, noticed that LibraryLookup doesn't handle ISSNs correctly when used with DRA systems. His fix distinguishes between the ISBN and ISSN cases, hyphenates the latter, and for good measure tosses in a popup confirmation where the original LibraryLookup (in manly Unix fashion) just silently fails. Here's John's version, which I'll also roll into the DRA page and bookmarklet generator:
Nicely done! (I've added some whitespace so the text will format here; that whitespace should be stripped out for use.) This is a marvel of Perlish terseness. Extraneous variables are banished. The regular expression is tested directly. Question-mark-colon syntax concisely chooses between the ISBN and ISSN cases. In the latter case, the captured number (RegExp.$3) is directly sliced into four-digit components.
Former URL: http://weblog.infoworld.com/udell/2003/01/21.html#a579