[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] MacPerl FAQ Announcement



From:   IN%"bob.dalgleish@sk.sympatico.ca" 13-JUL-1996 12:46:02.82
To:     IN%"mac-perl@iis.ee.ethz.ch"
CC:     
Subj:   [MacPerl] MacPerl FAQ Announcement

Return-path: <neeri@iis.ee.ethz.ch>
Received: from err.ethz.ch by LNS62.LNS.CORNELL.EDU (PMDF V4.3-13 #13710)
 id <01I70WF1I88G8XGKLN@LNS62.LNS.CORNELL.EDU>; Sat,
 13 Jul 1996 12:45:56 -0400 (EDT)
Received: (from daemon@localhost) by err.ethz.ch (8.7.5/8.7.3/IISmaster-1.73)
 id QAA27713 for mac-perl-outgoing; Sat, 13 Jul 1996 16:16:44 +0200 (MET DST)
Received: from orion.sk.sympatico.ca (orion.sk.sympatico.ca [142.165.21.5])
 by err.ethz.ch (8.7.5/8.7.3/IISmaster-1.73) with ESMTP id QAA27708 for
 <mac-perl@iis.ee.ethz.ch>; Sat, 13 Jul 1996 16:16:40 +0200 (MET DST)
Received: from [142.165.22.165] (a230-165.sasknet.sk.ca)
 by orion.sk.sympatico.ca with SMTP (1.39.111.2/16.2) id AA117057346; Sat,
 13 Jul 1996 08:15:46 -0600
Date: Sat, 13 Jul 1996 08:17:19 -0600
From: bob.dalgleish@sk.sympatico.ca (Bob Dalgleish)
Subject: [MacPerl] MacPerl FAQ Announcement
Sender: owner-mac-perl@iis.ee.ethz.ch
X-Sender: dalgl@mailhost.sk.sympatico.ca
To: mac-perl@iis.ee.ethz.ch
Message-id: <v01540b00ae0d5f2875f3@[142.165.22.165]>
MIME-version: 1.0
Content-type: text/plain; charset="us-ascii"
Content-transfer-encoding: 7BIT
Precedence: bulk

>The next revision of the MacPerl FAQ is now available.
>
>http://www.sasknet.com/~dalgl/MacPerlFAQ.html

Excellent work & very much appreciated! (I had a little trouble _this_ 
afternoon getting through to any page at www.sasknet.com - but ping told me it 
was alive.)

>http://www.sasknet.com/~dalgl/MacPerlFAQ.txt

>They will reside at this location until we get the more permanent homes
                                   ^^^^^
>mentioned in the FAQs.

Will they be removed from www.sasknet.com?

>Bob Wilkinson and I are soliciting feedback on how to make the FAQ more
>effective. We would also like to thank Hal Wine for putting the first
>revision together, and handing the torch to us with facts, plans, and
>details. Also, thanks to Matthias Ulrich Neeracher for guidance in
>preparation of the material, and more thanks to him for making MacPerl a
>reality.

Here are my comments:

!1.4.2) Other useful resources
!
!   Newsgroups: 
!   comp.lang.perl.announce 
!   comp.lang.perl.misc 
!   comp.lang.perl.misc 

Did you mean comp.lang.perl.modules ? Also having hyperlinks to the groups 
would be nice:

<UL>Newsgroups:
<LI><A HREF="news:comp.lang.perl.announce">comp.lang.perl.announce</A></LI>
<LI><A HREF="news:comp.lang.perl.misc">comp.lang.perl.misc</A></LI>
<LI><A HREF="news:comp.lang.perl.modules">comp.lang.perl.modules</A></LI>
</UL> 

!A searchable archive of the mailing list is available.

Does this statement belong in the answer to question 1.4.1 ?

!2.1) What are the differences in functions on MacPerl?
!
!Differences 

Is there any way I can convince you (or anybody on the web ? :-( that not 
everyone in the universe uses software from Netscape Communications Corporation 
or Microsoft Corporation? In particular the <TABLE> of functionality 
differences between MacPerl4 & 5 would look just fine to me & lots of other 
browsers if rendered in <PRE></PRE>. I am aware of the fact that few people 
like the fixed width fonts typically employed by browsers that encounter 
<PRE></PRE> but it sure makes for more legible reading of important 
information (IMO).

!<TR><TH ALIGN=LEFT>fctl<TD ALIGN=CENTER>Meaning of controls is system specific 
!<TD ALIGN=CENTER>Meaning of controls is system specific. POSIX.pm provides a 
!useful interface.

I've looked through many perl resources (camel, perl man pages, etc.) & find no 
reference to a function called 'fctl()' - do you mean 'fcntl()' and perhaps 
'Fcntl.pm' ?

!2.6) How do I get MacPerl to recognize the Mac character set?
!
!Best (for portability) is to not depend upon Mac character sets. However, even 
!if you don't require them, their presence can cause unexpected results in 
!some scripts, because perl only works with ASCII characters. 
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (sic)
Hmm.., I find this last statement quite misleading. While I am not fully up to 
speed on MacPerl I have made frequent use of functions like: hex(); 
oct(); ord(); pack(); unpack(); sprintf("%lx,$number); on Unix perl.
I have also embedded 8-bit file names in MacPerl scripts quite successfully.
If you confine your attention to _just_ regular expressions all these function 
calls can be used to form strings appropriate to tr///, s///, & m// calls. One 
should also note that there are also versions of "jperl" which allows one to 
write regular expressions for (I think at least two different) extended 8-bit 
japanese character encodings. While I am certainly not even qualified to 
volunteer for it I think something similar can be done for a Mac character set.

!5.3.1) How do I know that this script is running under MacPerl?
<snip>
! use Config;
!    if ( $Config{'osname'} =~ /^mac/i ) {
!        print "Running under MacPerl\n";
!    }

doesn't this run into trouble with machten?

!5.4) How do I know what directory the current script is in?
!
!As with Unix, $0 contains the full path to the script that is executing.

Hmmm.. not on my unices:

 % cat foo
 #!/usr/bin/perl
 print "hello! my name is >$0<\n";
 print "I am located in >$ENV{PWD}<\n";

 % perl foo
 hello! my name is >foo<
 I am located in >/home/pvhp<

 % uname -a 
 OSF1 lns309.lns.cornell.edu V3.2 214 alpha
 (with similar results on Ultrix [VMS required $ENV{DEFAULT} instead]).

!6.1.3) When I try to read a particular file, why does MacPerl complain that it 
!is "out of
!memory"?
<snip>
!    $/ = "\012";
!    $INPUT_RECORD_SEPARATOR = "\012";
!    $RS = "\012";

I thought these latter two (not the first) were useful only if one had already 
put "use English;" into one's script (my suspicion has not been tested on a 
Mac yet though)?


In summary: This document is _excellent_ as a MacPerl newbie I really 
appreciate it. Thanks to all of you.

Peter Prymmer
pvhp@lns62.lns.cornell.edu