Re: Form feed
On Mon, 17 Feb 2003, Tom McDonough wrote: Thanks for confirming my suspicion that \f in the Perl shipped with mac os x 10.2 might not be working properly (or at all). Is anyone out there getting a form feed to work? The problem may not be with Perl's \f. Print to a file, and see if \f produces 0x0C characters in the file. If it does, perl is fine. It seems you are expecting \f to be universally recognized by printer drivers, and converted to whatever the printer actually uses to end one page and start another. You are not attaching a real line printer to the Mac (I'm pretty sure this is not possible anymore). A laser printer will use either Postscript or PCL to describe a page; \f would have to be converted to a snippet of one of these languages and sent to the printer. It is very possible, probable even, that ghostscript, which is in many cases what you are depending on, ignores \f rather than trying to convert it. The long answer is for you to figure out how to translate the line printer commands into the proper codes for your printer, as someone else has already commented. The filters you are going through know how to convert text into Postscript or PCL etc, but typically they are designed for text and do not handle the ASCII unprintables. The short answer is that you are not using a line printer, and you cannot expect line printer control codes in ASCII to work in a modern, multi-language, batch-printing environment. Another facet is that Apple starting using the CUPS printing subsystem in 10.2, which likely changed all the print filters you are going through. It is more likely your problems are there, rather than in Perl. -- MattLangford
Re: Form feed
Thanks Matt and drieux for the background and leads for exploring this further, especially along the lines of translating to Postscript, an area I was already wanting to learn more about. On Wednesday, February 19, 2003, at 10:06 AM, Matthew Langford wrote: The problem may not be with Perl's \f. Print to a file, and see if \f produces 0x0C characters in the file. If it does, perl is fine. As my experiments confirmed (earlier msg), Perl in all my installations (MacPerl, 5.6.0, 5.6.1, 5.8.0) does indeed output \f correctly. Also, using Perl formats gave me linebreaks the last time I needed them, so this question isn't as pressing for me as it was for the OP, who sought to avoid using formats. The problem was somewhere in the next steps down the way toward the printer: OS X, lpr, CUPS, filters, etc. When I found that lpr under darwin didn't implement some documented switches options, that seemed like the culprit. Matthew: It seems you are expecting \f to be universally recognized by printer drivers, and converted to whatever the printer actually uses to end one page and start another. ... [but] you cannot expect line printer control codes in ASCII to work in a modern, multi-language, batch-printing environment. Ah. My interest in this question lies in the need by some of my clients (such as political campaigns) for printed outputs long with the data enrichment and analysis I provide: things like mailing labels, precinct sheets, and phone lists. My practice has been to do most of my data work using Perl, and then at the end import the data into a commercial program like FileMaker for greater control than Perl formats provide over print layout and typography. Data search and retrieval, counts, and tasks like address normalization are way easier and faster with my Perl tools than with FileMaker, Access, etc. So I'd love to handle my own output via Perl as well. Anyone care to recommend their favorite Postscript-related modules? - Bruce __bruce__van_allen__santa_cruz__ca__
Re: dmg of perl 5.8.0 on Mac OS X
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Nathan Torkington) wrote: I'm not entirely sure. I think that a previous 5.8 install overwrote some of the 5.5 library (doing a 'configure.gnu --prefix=/blah' still made 5.8 install crap into /Library). hints/darwin.sh overrides the defaults. I want everything in /usr/local/, though, so this is what I do to mine, for Mac OS X: [pudge@bourque hints]$ diff -u darwin.sh.orig darwin.sh --- darwin.sh.orig Thu Jul 18 01:42:44 2002 +++ darwin.sh Wed Feb 19 19:53:46 2003 @@ -7,31 +7,7 @@ # Paths ## -# BSD paths -case $prefix in -'') - # Default install; use non-system directories - prefix='/usr/local'; # Built-in perl uses /usr - siteprefix='/usr/local'; - vendorprefix='/usr/local'; usevendorprefix='define'; - - # Where to put modules. - privlib='/Library/Perl'; # Built-in perl uses /System/Library/Perl - sitelib='/Library/Perl'; - vendorlib='/Network/Library/Perl'; - ;; -'/usr') - # We are building/replacing the built-in perl - siteprefix='/usr/local'; - vendorprefix='/usr/local'; usevendorprefix='define'; - - # Where to put modules. - privlib='/System/Library/Perl'; - sitelib='/Library/Perl'; - vendorlib='/Network/Library/Perl'; - ;; -esac - +prefix='/usr/local'; # 4BSD uses ${prefix}/share/man, not ${prefix}/man. man1dir=${prefix}/share/man/man1; man3dir=${prefix}/share/man/man3; -- Chris Nandor [EMAIL PROTECTED]http://pudge.net/ Open Source Development Network[EMAIL PROTECTED] http://osdn.com/
Re: dmg of perl 5.8.0 on Mac OS X
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Puneet Kishor) wrote: fwiw, I am using 10.2.3... I don't have wget. I could be wrong, but I remember something to the effect that wget is not only deprecated in favor of curl but also abolished. As usaul, I culd be wrong. wget was removed from Mac OS X, but it, itself, is not deprecated or abolished, and you can install it via fink. I believe the issue is primarily of Apple wanting to use non-GPL equivalents when possible; but OTOH, I think curl is a little nicer to use, so it might merely be that. -- Chris Nandor [EMAIL PROTECTED]http://pudge.net/ Open Source Development Network[EMAIL PROTECTED] http://osdn.com/