perl.macperl http://www.nntp.perl.org/group/perl.macperl/ ... Copyright 1998-2016 perl.org Sat, 13 Feb 2016 05:58:21 +0000 ask@perl.org Re: [MacPerl] $PREMATCH Question by Jonathan Levi via macperl Ronald and Matthew, many thanks. jl<br/> <br/><br/> <br/><br/> <br/><br/>-----Original Message-----<br/>From: Ronald J Kimball &lt;rjk-perl-mac@tamias.net&gt;<br/>To: Jonathan Levi &lt;drjlevi6@aol.com&gt;<br/>Cc: macperl &lt;macperl@perl.org&gt;<br/>Sent: Wed, Feb 3, 2016 12:55 pm<br/>Subject: Re: [MacPerl] $PREMATCH Question<br/><br/>On Tue, Feb 02, 2016 at 08:59:44PM -0500, Jonathan Levi via macperl wrote:<br/>&gt; Can someone explain why the following:<br/>&gt; <br/>&gt; echo alphabet | perl -e &#39;$_=&lt;STDIN&gt;; if (m/pha/){print $PREMATCH, &quot;\n&quot;}&#39;<br/>&gt; <br/>&gt; yields &quot;&quot; instead of &quot;al&quot;, as I expected?<br/>&gt; <br/>&gt; Jonathan<br/><br/>If you want the long name, you need to use the English module, as<br/>mentioned near the top of perlvar &lt;http://perldoc.perl.org/perlvar.html&gt;.<br/>For example:<br/><br/>echo alphabet | perl -MEnglish -e &#39;$_=&lt;STDIN&gt;; if (m/pha/){print $PREMATCH, &quot;\n&quot;}&#39;<br/><br/>Using /p and ${^PREMATCH}, as Matthew suggested, will avoid performance<br/>penalties in longer scripts, however.<br/><br/>Ronald<br/> http://www.nntp.perl.org/group/perl.macperl/2016/02/msg3114.html Wed, 03 Feb 2016 23:49:25 +0000 Re: [MacPerl] $PREMATCH Question by Ronald J Kimball On Tue, Feb 02, 2016 at 08:59:44PM -0500, Jonathan Levi via macperl wrote:<br/>&gt; Can someone explain why the following:<br/>&gt; <br/>&gt; echo alphabet | perl -e &#39;$_=&lt;STDIN&gt;; if (m/pha/){print $PREMATCH, &quot;\n&quot;}&#39;<br/>&gt; <br/>&gt; yields &quot;&quot; instead of &quot;al&quot;, as I expected?<br/>&gt; <br/>&gt; Jonathan<br/><br/>If you want the long name, you need to use the English module, as<br/>mentioned near the top of perlvar &lt;http://perldoc.perl.org/perlvar.html&gt;.<br/>For example:<br/><br/>echo alphabet | perl -MEnglish -e &#39;$_=&lt;STDIN&gt;; if (m/pha/){print $PREMATCH, &quot;\n&quot;}&#39;<br/><br/>Using /p and ${^PREMATCH}, as Matthew suggested, will avoid performance<br/>penalties in longer scripts, however.<br/><br/>Ronald<br/> http://www.nntp.perl.org/group/perl.macperl/2016/02/msg3113.html Wed, 03 Feb 2016 17:55:35 +0000 Re: [MacPerl] $PREMATCH Question by Matthew Fischer From http://perldoc.perl.org/perlreref.html -<br/><br/>p Preserve a copy of the matched string -<br/> ${^PREMATCH}, ${^MATCH}, ${^POSTMATCH} will be defined.<br/><br/>fishbookAirMobile:~ fishman$ echo alphabet | perl -e &#39;$_=&lt;STDIN&gt;; if<br/>(m/pha/p){print ${^PREMATCH}, &quot;\n&quot;}&#39;<br/>al<br/><br/><br/>On Tue, Feb 2, 2016 at 8:59 PM, Jonathan Levi via macperl &lt;macperl@perl.org&gt;<br/>wrote:<br/><br/>&gt; Can someone explain why the following:<br/>&gt;<br/>&gt; echo alphabet | perl -e &#39;$_=&lt;STDIN&gt;; if (m/pha/){print $PREMATCH, &quot;\n&quot;}&#39;<br/>&gt;<br/>&gt; yields &quot;&quot; instead of &quot;al&quot;, as I expected?<br/>&gt;<br/>&gt; Jonathan<br/>&gt;<br/><br/><br/><br/>-- <br/>Matthew Fischer<br/>Director of Technology Services<br/>Connecticut Association of Schools<br/>Connecticut Interscholastic Athletic Conference<br/>W: 203.250.1111 || M: 203.314.9915<br/>casciac.org || cas.casciac.org || ciacsports.com http://www.nntp.perl.org/group/perl.macperl/2016/02/msg3112.html Wed, 03 Feb 2016 14:57:35 +0000 $PREMATCH Question by Jonathan Levi via macperl Can someone explain why the following:<br/><br/>echo alphabet | perl -e &#39;$_=&lt;STDIN&gt;; if (m/pha/){print $PREMATCH, &quot;\n&quot;}&#39;<br/><br/>yields &quot;&quot; instead of &quot;al&quot;, as I expected?<br/><br/>Jonathan http://www.nntp.perl.org/group/perl.macperl/2016/02/msg3111.html Wed, 03 Feb 2016 01:59:51 +0000 Re: [MacPerl] Re: MacPerl::DoAppleScript and Perl v5.10.0 by Chris Nandor On Mar 6, 2011, at 09:44, David Micklem wrote: <br/> <br/>&gt; I thought that MacPerl::DoAppleScript dated back to pre-OS X MacPerl <br/> <br/>MacPerl::DoAppleScript() is part of Mac-Carbon, which is a port of much of the old MacPerl modules to Mac OS X (which is actually included with every Mac, although it won&#39;t work unless you tell it to use 32 bits!). <br/> <br/> <br/>&gt; You might try osascript instead. <br/> <br/>Yes, although it&#39;s usually significantly slower, and slightly more error-prone (because of the shell interface). <br/> <br/>-- <br/>Chris Nandor <br/>pudge@pobox.com <br/>http://pudge.net/ <br/>360-474-5090 <br/> <br/> http://www.nntp.perl.org/group/perl.macperl/2011/03/msg3110.html Tue, 08 Mar 2011 00:23:46 +0000 Re: MacPerl::DoAppleScript and Perl v5.10.0 by David Micklem Wow, you wait four years for a post on MacPerl digest and along come <br/>two at once.<br/><br/>I thought that MacPerl::DoAppleScript dated back to pre-OS X MacPerl <br/>(like this whole mailing list does).<br/><br/>You might try osascript instead. See for example:<br/><br/>http://oreilly.com/pub/a/mac/2003/11/07/scripting_osx.html<br/><br/>David<br/><br/><br/><br/>&gt;<br/>&gt; From: Alan Fry &lt;ajf@afco.demon.co.uk&gt;<br/>&gt; Date: 6 March 2011 15:38:02 GMT+01:00<br/>&gt; To: macperl@perl.org<br/>&gt; Subject: MacPerl::DoAppleScript and Perl v5.10.0<br/>&gt;<br/>&gt;<br/>&gt; I have made a small Applet containing a Perl script intended for use <br/>&gt; by folk not necessarily conversant with Perl. The script is inside <br/>&gt; the applet bundle, is called by AppleScript and works as intended.<br/>&gt;<br/>&gt; Unfortunately the Perl script itself calls &#39;MacPerl::DoAppleScript&#39; <br/>&gt; which causes an error if the version of Perl is 5.10.0, which is the <br/>&gt; case of course on &#39;Snow Leopard&#39; machines. The problem can be <br/>&gt; resolved by setting &#39;Prefer-32-Bit&#39; to &#39;Yes&#39; in <br/>&gt; &#39;com.apple.versioner.perl.plist&#39;. The question is how to achieve <br/>&gt; this, bearing in mind some (possibly most) of the users will be <br/>&gt; unused to Perl and terrified of using the Terminal.<br/>&gt;<br/>&gt; I have resolved this difficulty for the moment by placing another <br/>&gt; Perl script in the applet bundle which reads simply<br/>&gt;<br/>&gt; if (qx(file /usr/bin/perl) =~ /executable x86_64/) {<br/>&gt; qx(defaults write com.apple.versioner.perl Prefer-32-Bit -bool yes)<br/>&gt; }<br/>&gt;<br/>&gt; The notion behind this is that if the default version of the perl <br/>&gt; executable is compiled for Intel 64 bit architecture it probably is <br/>&gt; 64 bit perl (?) and Prefer-32-Bit should therefore be set to &#39;Yes&#39;. <br/>&gt; This script is run before the main Perl script is launched by which <br/>&gt; time &#39;com.apple.versioner.perl.plist&#39; will have been updated.<br/>&gt;<br/>&gt; The first question is this. Is it acceptable to change the setting <br/>&gt; of &#39;com.apple.versioner.perl.plist&#39; on someone else&#39;s machine? What <br/>&gt; if the owner wants to use 64 bit Perl? It is not sensible to restore <br/>&gt; the setting of Prefer-32-Bit to &#39;No&#39; at the end of the run because <br/>&gt; the owner may have already set it to &#39;Yes&#39; anyway.<br/>&gt;<br/>&gt; The second question is this. Is there a better way to resolve the <br/>&gt; problem of how to contrive a portable Perl script incorporating a <br/>&gt; &#39;MacPerl::DoAppleScript call?<br/>&gt;<br/>&gt; Suggestions would be most welcome.<br/>&gt;<br/>&gt; Alan Fry<br/>&gt;<br/> http://www.nntp.perl.org/group/perl.macperl/2011/03/msg3109.html Mon, 07 Mar 2011 01:38:26 +0000 MacPerl != Perl on Mac OS X by Chris Nandor Hi folks, <br/> <br/>Just pointing out that this mailing list is not for Mac OS X perl, but for MacPerl, the app that runs on Mac OS (Classic). There&#39;s a separate macosx@perl.org mailing list for Mac OS X. <br/> <br/> http://lists.perl.org/list/macosx.html <br/> <br/>-- <br/>Chris Nandor <br/>pudge@pobox.com <br/>http://pudge.net/ <br/> <br/> http://www.nntp.perl.org/group/perl.macperl/2011/03/msg3108.html Mon, 07 Mar 2011 01:38:21 +0000 MacPerl::DoAppleScript and Perl v5.10.0 by Alan Fry I have made a small Applet containing a Perl script intended for use by folk not necessarily conversant with Perl. The script is inside the applet bundle, is called by AppleScript and works as intended. <br/> <br/>Unfortunately the Perl script itself calls &#39;MacPerl::DoAppleScript&#39; which causes an error if the version of Perl is 5.10.0, which is the case of course on &#39;Snow Leopard&#39; machines. The problem can be resolved by setting &#39;Prefer-32-Bit&#39; to &#39;Yes&#39; in &#39;com.apple.versioner.perl.plist&#39;. The question is how to achieve this, bearing in mind some (possibly most) of the users will be unused to Perl and terrified of using the Terminal. <br/> <br/>I have resolved this difficulty for the moment by placing another Perl script in the applet bundle which reads simply <br/> <br/>if (qx(file /usr/bin/perl) =~ /executable x86_64/) { <br/> qx(defaults write com.apple.versioner.perl Prefer-32-Bit -bool yes) <br/>} <br/> <br/>The notion behind this is that if the default version of the perl executable is compiled for Intel 64 bit architecture it probably is 64 bit perl (?) and Prefer-32-Bit should therefore be set to &#39;Yes&#39;. This script is run before the main Perl script is launched by which time &#39;com.apple.versioner.perl.plist&#39; will have been updated. <br/> <br/>The first question is this. Is it acceptable to change the setting of &#39;com.apple.versioner.perl.plist&#39; on someone else&#39;s machine? What if the owner wants to use 64 bit Perl? It is not sensible to restore the setting of Prefer-32-Bit to &#39;No&#39; at the end of the run because the owner may have already set it to &#39;Yes&#39; anyway. <br/> <br/>The second question is this. Is there a better way to resolve the problem of how to contrive a portable Perl script incorporating a &#39;MacPerl::DoAppleScript call? <br/> <br/>Suggestions would be most welcome. <br/> <br/>Alan Fry http://www.nntp.perl.org/group/perl.macperl/2011/03/msg3107.html Sun, 06 Mar 2011 06:38:09 +0000 Net::ARP install problem by kurtz le pirate <br/>hello,<br/><br/>i try to install the Net::ARP module.<br/><br/>here is the screen messages :<br/><br/>---<br/>...<br/>...<br/> CPAN.pm: Going to build C/CR/CRAZYDJ/Net-ARP-1.0.6.tgz<br/><br/>Checking if your kit is complete...<br/>Looks good<br/>Writing Makefile for Net::ARP<br/>cp ARP.pm blib/lib/Net/ARP.pm<br/>/usr/bin/perl /System/Library/Perl/5.8.6/ExtUtils/xsubpp -typemap <br/>/System/Library/Perl/5.8.6/ExtUtils/typemap ARP.xs &gt; ARP.xsc &amp;&amp; mv <br/>ARP.xsc ARP.c<br/>Please specify prototyping behavior for ARP.xs (see perlxs manual)<br/>cc -c -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp <br/>-fno-strict-aliasing -I/usr/local/include -Os -DVERSION=\&quot;1.0\&quot; <br/>-DXS_VERSION=\&quot;1.0\&quot; <br/>&quot;-I/System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE&quot; -DBSD <br/>ARP.c<br/>ARP.xs:30:27: error: netinet/ether.h: No such file or directory<br/>In file included from ARP.xs:33:<br/>arp.h:62: error: parse error before &#39;__THROW&#39;<br/>arp.h:62: warning: data definition has no type or storage class<br/>make: *** [ARP.o] Error 1<br/> CRAZYDJ/Net-ARP-1.0.6.tgz<br/> /usr/bin/make -- NOT OK<br/>Running make test<br/> Can&#39;t test without successful make<br/>Running make install<br/> Make had returned bad status, install seems impossible<br/>Failed during this command:<br/> CRAZYDJ/Net-ARP-1.0.6.tgz : make NO<br/><br/> <br/>cpan&gt; <br/>---<br/><br/><br/><br/>&quot;kit&quot; is complete and looks good... but install seems impossible.<br/><br/><br/>have you any idea what is happening ? <br/>thanks for yout help.<br/><br/><br/><br/>the perl version is v5.8.6 built for darwin-thread-multi-2level<br/>and make is GNU Make 3.80 in /usr/bin/make.<br/><br/>-- <br/>klp<br/> http://www.nntp.perl.org/group/perl.macperl/2011/03/msg3106.html Sun, 06 Mar 2011 05:49:56 +0000 Re: Not able to send email through MAc perl. by Joel Rees Rapunzel (ritugoyal12 at gmail of com) asked<br/><br/>&gt; Hi ,<br/>&gt;<br/>&gt; I want to send email through MAc perl. I have an SMTP server and my OS<br/>&gt; is MAC.<br/><br/>Mac OS X (jaguar/panther/leopard) or the classic Macintosh (System 7, <br/>Mac OS 8/9)?<br/><br/>You say you have an SMTP server, which one? How did you set it up? Do <br/>you have documentation for it?<br/><br/>&gt; I used Mail::Sender perl module and was successfully able to send<br/>&gt; email through windows platform.<br/><br/>Microsoft tends to be very helpful in ways that, after you think <br/>about it, you wish they hadn&#39;t. (Do you really want just any old <br/>process to be able to send mail?)<br/><br/>&gt; But if I execute same script on MAC OS<br/>&gt; it is giving me error saying authentication required.<br/><br/>Which is how it should be, unless you have the authentication already <br/>set up.<br/><br/>&gt; Following is my code snippet.<br/>&gt;<br/>&gt; #!/usr/bin/perl<br/>&gt; use Mail::Sender;<br/>&gt; $sender = new Mail::Sender {<br/>&gt; smtp =&gt; &#39;smtpserverIP&#39;,<br/>&gt; from =&gt; &#39;sender_Email&#39;<br/>&gt; };<br/>&gt; die &quot;Can&#39;t create the Mail::Sender object: <br/>&gt; $Mail::Sender::Error<br/>&gt; \n&quot;<br/>&gt; unless ref $sender;<br/>&gt; ref $sender-&gt;Open({<br/>&gt; to =&gt; &#39;receiver_Email&#39;,<br/>&gt; subject =&gt; &#39;test mail.&#39;<br/>&gt; })<br/>&gt; or die &quot;Can&#39;t open the message: $sender-&gt;{&#39;error_msg&#39;}<br/>&gt; \n&quot;;<br/>&gt; $sender-&gt;SendLineEnc(&quot;Hi&quot;);<br/>&gt; ref $sender-&gt;Close<br/>&gt; or die &quot;Failed to send the message: $sender-<br/>&gt;<br/>&gt;&gt; {&#39;error_msg&#39;}\n&quot;;<br/>&gt;&gt;<br/>&gt;<br/>&gt; On executing the script I am getting following error:<br/>&gt; Can&#39;t open the message: Server error 503 5.0.0 Authentication<br/>&gt; required&quot;<br/><br/>Unfortunately, I never learned how to do the authentication stuff, <br/>but my understanding is that you need to tell perl how to <br/>authenticate with your server(s).<br/><br/>&gt; Please help me to make this work. Also is there any other way of<br/>&gt; sending an email through Mac perl.<br/><br/>Can&#39;t answer that question either, but if your Mac OS machine is a <br/>recent one (less than seven years old), you are probably running on <br/>Mac OS X, and there are a lot more people who can help with this kind <br/>of question on the Mac OS X list: &lt;macosx@perl.org&gt;.<br/><br/>Even if you really are running a 7+ year old machine, if no one <br/>better able to answer your question than I responds here, you might <br/>want to post a note to the Mac OS X list to see if you can get some <br/>of the other guys who still hang around there to drop back in here to <br/>help.<br/><br/>Joel Rees<br/>(waiting for a 3+GHz ARM processor to come out,<br/>to test Steve&#39;s willingness to switch again.)<br/><br/><br/> http://www.nntp.perl.org/group/perl.macperl/2007/11/msg3105.html Fri, 09 Nov 2007 17:11:33 +0000 Re: Not able to send email through MAc perl. by kurtz le pirate In article &lt;1194344373.342567.135470@i38g2000prf.googlegroups.com&gt;,<br/> ritugoyal12@gmail.com (Rapunzel) wrote:<br/><br/>&gt; Hi ,<br/>&gt; <br/>&gt; I want to send email through MAc perl. I have an SMTP server and my OS<br/>&gt; is MAC.<br/>&gt; <br/>&gt; I used Mail::Sender perl module and was successfully able to send<br/>&gt; email through windows platform. But if I execute same script on MAC OS<br/>&gt; it is giving me error saying authentication required.<br/>&gt; Following is my code snippet.<br/>&gt; <br/>&gt; [snip]<br/>&gt; <br/>&gt; On executing the script I am getting following error:<br/>&gt; Can&#39;t open the message: Server error 503 5.0.0 Authentication<br/>&gt; required&quot;<br/>&gt; <br/>&gt; Please help me to make this work. Also is there any other way of<br/>&gt; sending an email through Mac perl.<br/><br/>i think that this problem is not a perl problem but a simple <br/>authentication problem.<br/><br/> - there is and active directory ?<br/> - there is an exchange erver ?<br/> - is mac member of ad ?<br/> - how mac&#39; authentication is made to the server ?<br/><br/><br/>-- <br/>klp<br/> http://www.nntp.perl.org/group/perl.macperl/2007/11/msg3104.html Fri, 09 Nov 2007 15:37:49 +0000 Not able to send email through MAc perl. by Rapunzel Hi ,<br/><br/>I want to send email through MAc perl. I have an SMTP server and my OS<br/>is MAC.<br/><br/>I used Mail::Sender perl module and was successfully able to send<br/>email through windows platform. But if I execute same script on MAC OS<br/>it is giving me error saying authentication required.<br/>Following is my code snippet.<br/><br/>#!/usr/bin/perl<br/>use Mail::Sender;<br/> $sender = new Mail::Sender {<br/> smtp =&gt; &#39;smtpserverIP&#39;,<br/> from =&gt; &#39;sender_Email&#39;<br/> };<br/> die &quot;Can&#39;t create the Mail::Sender object: $Mail::Sender::Error<br/>\n&quot;<br/> unless ref $sender;<br/> ref $sender-&gt;Open({<br/> to =&gt; &#39;receiver_Email&#39;,<br/> subject =&gt; &#39;test mail.&#39;<br/> })<br/> or die &quot;Can&#39;t open the message: $sender-&gt;{&#39;error_msg&#39;}<br/>\n&quot;;<br/> $sender-&gt;SendLineEnc(&quot;Hi&quot;);<br/> ref $sender-&gt;Close<br/> or die &quot;Failed to send the message: $sender-<br/>&gt;{&#39;error_msg&#39;}\n&quot;;<br/><br/>On executing the script I am getting following error:<br/>Can&#39;t open the message: Server error 503 5.0.0 Authentication<br/>required&quot;<br/><br/>Please help me to make this work. Also is there any other way of<br/>sending an email through Mac perl.<br/><br/>Thanks,<br/>Rapunzel<br/><br/> http://www.nntp.perl.org/group/perl.macperl/2007/11/msg3103.html Tue, 06 Nov 2007 02:55:17 +0000 [MacPerl] passing arguments: AppleScript to MacPerl by Louis Pouzin Hello Nobumi,<br/><br/>On Sun, 8 Jul 2007 11:32:52 +0900, Nobumi Iyanaga wrote:<br/><br/>&gt;Why don&#39;t you use the normal &#39;tell application &quot;MacPerl&quot;&#39; scheme?<br/><br/>Oh I do. In my scripting, &quot;perl&quot; is just an nickname for &quot;MacPerl 5.20r4&quot;<br/><br/>&gt;Anyway, please try the script as I wrote:<br/><br/>Since I have a different folder structure, I did adjust it to my environment.<br/>- - -<br/>set my_script to &quot;Labo:Privat:MacPerl bench:PL minitests &#159;:lsm &#159;:argv.pl&quot;<br/>set args to {&quot;dog&quot;, &quot;cat&quot;}<br/><br/>set perl_arg to {}<br/><br/>set perl_arg to perl_arg &amp; my_script<br/>set perl_arg to perl_arg &amp; args<br/><br/>tell application &quot;MacPerl 5.20r4&quot;<br/> Do Script perl_arg mode Batch<br/>end tell<br/><br/>(*in result window:<br/>&quot;nb args: 2<br/>dog<br/>cat<br/>&quot;<br/>*)<br/><br/>== This one works too:<br/><br/>set my_script to &quot;Labo:Privat:MacPerl bench:PL minitests &#159;:lsm &#159;:argv10&quot;<br/>set args to {&quot;four&quot;, &quot;five&quot;, &quot;six&quot;}<br/><br/>set perl_arg to {} &amp; my_script &amp; args<br/><br/>tell application &quot;MacPerl 5.20r4&quot;<br/> Do Script perl_arg mode Batch<br/>end tell<br/><br/>(*in result window:<br/>&quot;nb args: 3<br/>four<br/>five<br/>six<br/>&quot;<br/>*)<br/><br/>== and finally, what I was after initially:<br/><br/>set my_script to &quot;Labo:Privat:MacPerl bench:PL minitests &#159;:lsm &#159;:argv10&quot;<br/><br/>tell application &quot;Finder&quot;<br/> set names to selection -- list of selected files<br/>end tell<br/><br/>set args to {}<br/>repeat with nam in names<br/> set args to args &amp; (nam as string) -- list of file names<br/>end repeat<br/><br/>set perl_arg to {} &amp; my_script &amp; args<br/><br/>tell application &quot;MacPerl 5.20r4&quot;<br/> Do Script perl_arg mode Batch<br/>end tell<br/><br/>(*in result window:<br/>&quot;nb args: 3<br/>PPC_HD:download:isoc:essais AS:isoc_06251447.zip<br/>PPC_HD:download:isoc:essais AS:isoc_06261029.zip<br/>PPC_HD:download:isoc:essais AS:isoc_06271306.zip<br/>&quot;<br/>*)<br/><br/>Great. Thanks so much Nobumi. You set me on the right track.<br/>I&#39;m a lame duck in AppleScript.<br/><br/>Best regards<br/><br/><br/> http://www.nntp.perl.org/group/perl.macperl/2007/07/msg3102.html Fri, 13 Jul 2007 08:33:11 +0000 passing arguments: AppleScript to MacPerl by Louis Pouzin David,<br/><br/>Nobumi&#39;s statement:<br/> Do Script perl_arg mode Batch<br/>doesn&#39;t open the regular Macperl window. Instead it opens a &quot;Result&quot; window that is managed by Applescript, and shows what the Macperl script produced. This window may hide behind the AS script window. It doesn&#39;t open if there is no output.<br/><br/>OTOH<br/> Do Script perl_arg<br/>opens a Macperl window if and only if the Macperl script produced an output.<br/><br/>And if both statements are run:<br/> Do Script perl_arg mode Batch<br/> Do Script perl_arg<br/>only the regular Macperl window opens.<br/><br/>Anyway this is what happens in my systems OS 7.5.5 and OS 9.0.4 !!<br/><br/>Best<br/>- -<br/>On Sun, 08 Jul 2007 05:47:12 -0700, David Micklem wrote:<br/><br/>Nobumi&#39;s method (with the direct tell application &quot;MacPerl&quot;) works perfectly for me on OS9.2 and MacPerl 5.6.1.<br/><br/>However, I only get output returned if MacPerl has previously ever had an output window open.<br/><br/>That is, if MacPerl isn&#39;t running, then it starts up OK when I run the script but I get no output/returned value. Re-running the script -&gt; still no output.<br/><br/>But if I go into MacPerl and either run a script, or syntax check a script so that the MacPerl output window opens, then re-running the AppleScript gives me the expected output. Even after I close the MacPerl output window, running the AppleScript still works OK.<br/><br/>So, just out of curiosity, is it possible to make the script work WITHOUT the user having to manually go into MacPerl and persuade it to open an output window?<br/><br/> http://www.nntp.perl.org/group/perl.macperl/2007/07/msg3101.html Fri, 13 Jul 2007 08:33:09 +0000 passing arguments: AppleScript to MacPerl by Louis Pouzin David, <br/> <br/>Nobumi&#39;s statement: <br/> Do Script perl_arg mode Batch <br/>doesn&#39;t open the regular Macperl window. Instead it opens a &quot;Result&quot; window that is managed by Applescript, and shows what the Macperl script produced. This window may hide behind the AS script window. It doesn&#39;t open if there is no output. <br/> <br/>OTOH <br/> Do Script perl_arg <br/>opens a Macperl window if and only if the Macperl script produced an output. <br/> <br/>And if both statements are run: <br/> Do Script perl_arg mode Batch <br/> Do Script perl_arg <br/>only the regular Macperl window opens. <br/> <br/>Anyway this is what happens in my systems OS 7.5.5 and OS 9.0.4 !! <br/> <br/>Best <br/>- - <br/>On Sun, 08 Jul 2007 05:47:12 -0700, David Micklem wrote: <br/> <br/>Nobumi&#39;s method (with the direct tell application &quot;MacPerl&quot;) works perfectly for me on OS9.2 and MacPerl 5.6.1. <br/> <br/>However, I only get output returned if MacPerl has previously ever had an output window open. <br/> <br/>That is, if MacPerl isn&#39;t running, then it starts up OK when I run the script but I get no output/returned value. Re-running the script -&gt; still no output. <br/> <br/>But if I go into MacPerl and either run a script, or syntax check a script so that the MacPerl output window opens, then re-running the AppleScript gives me the expected output. Even after I close the MacPerl output window, running the AppleScript still works OK. <br/> <br/>So, just out of curiosity, is it possible to make the script work WITHOUT the user having to manually go into MacPerl and persuade it to open an output window? <br/> http://www.nntp.perl.org/group/perl.macperl/2007/07/msg3100.html Wed, 11 Jul 2007 23:48:46 +0000 [MacPerl] passing arguments: AppleScript to MacPerl by Louis Pouzin Hello Nobumi, <br/> <br/>On Sun, 8 Jul 2007 11:32:52 +0900, Nobumi Iyanaga wrote: <br/> <br/>&gt;Why don&#39;t you use the normal &#39;tell application &quot;MacPerl&quot;&#39; scheme? <br/> <br/>Oh I do. In my scripting, &quot;perl&quot; is just an nickname for &quot;MacPerl 5.20r4&quot; <br/> <br/>&gt;Anyway, please try the script as I wrote: <br/> <br/>Since I have a different folder structure, I did adjust it to my environment. <br/>- - - <br/>set my_script to &quot;Labo:Privat:MacPerl bench:PL minitests &#159;:lsm &#159;:argv.pl&quot; <br/>set args to {&quot;dog&quot;, &quot;cat&quot;} <br/> <br/>set perl_arg to {} <br/> <br/>set perl_arg to perl_arg &amp; my_script <br/>set perl_arg to perl_arg &amp; args <br/> <br/>tell application &quot;MacPerl 5.20r4&quot; <br/> Do Script perl_arg mode Batch <br/>end tell <br/> <br/>(*in result window: <br/>&quot;nb args: 2 <br/>dog <br/>cat <br/>&quot; <br/>*) <br/> <br/>== This one works too: <br/> <br/>set my_script to &quot;Labo:Privat:MacPerl bench:PL minitests &#159;:lsm &#159;:argv10&quot; <br/>set args to {&quot;four&quot;, &quot;five&quot;, &quot;six&quot;} <br/> <br/>set perl_arg to {} &amp; my_script &amp; args <br/> <br/>tell application &quot;MacPerl 5.20r4&quot; <br/> Do Script perl_arg mode Batch <br/>end tell <br/> <br/>(*in result window: <br/>&quot;nb args: 3 <br/>four <br/>five <br/>six <br/>&quot; <br/>*) <br/> <br/>== and finally, what I was after initially: <br/> <br/>set my_script to &quot;Labo:Privat:MacPerl bench:PL minitests &#159;:lsm &#159;:argv10&quot; <br/> <br/>tell application &quot;Finder&quot; <br/> set names to selection -- list of selected files <br/>end tell <br/> <br/>set args to {} <br/>repeat with nam in names <br/> set args to args &amp; (nam as string) -- list of file names <br/>end repeat <br/> <br/>set perl_arg to {} &amp; my_script &amp; args <br/> <br/>tell application &quot;MacPerl 5.20r4&quot; <br/> Do Script perl_arg mode Batch <br/>end tell <br/> <br/>(*in result window: <br/>&quot;nb args: 3 <br/>PPC_HD:download:isoc:essais AS:isoc_06251447.zip <br/>PPC_HD:download:isoc:essais AS:isoc_06261029.zip <br/>PPC_HD:download:isoc:essais AS:isoc_06271306.zip <br/>&quot; <br/>*) <br/> <br/>Great. Thanks so much Nobumi. You set me on the right track. <br/>I&#39;m a lame duck in AppleScript. <br/> <br/>Best regards <br/> <br/> http://www.nntp.perl.org/group/perl.macperl/2007/07/msg3099.html Wed, 11 Jul 2007 23:48:45 +0000 Re: [MacPerl] Re: passing arguments: AppleScript to MacPerl by Nobumi Iyanaga Hello David,<br/><br/>On Jul 8, 2007, at 9:47 PM, David Micklem wrote:<br/><br/>&gt; Hi,<br/>&gt;<br/>&gt; Nobumi&#39;s method (with the direct tell application &quot;MacPerl&quot;) works<br/>&gt; perfectly for me on OS9.2 and MacPerl 5.6.1.<br/>&gt;<br/>&gt; However, I only get output returned if MacPerl has previously ever<br/>&gt; had an output window open.<br/>&gt;<br/><br/>That is strange. On my machine, I get the result without the output <br/>window open. But...<br/><br/>&gt; That is, if MacPerl isn&#39;t running, then it starts up OK when I run the<br/>&gt; script but I get no output/returned value. Re-running the script -&gt;<br/>&gt; still no output.<br/>&gt;<br/>&gt; But if I go into MacPerl and either run a script, or syntax check a<br/>&gt; script so that the MacPerl output window opens, then re-running the<br/>&gt; AppleScript gives me the expected output. Even after I close the<br/>&gt; MacPerl output window, running the AppleScript still works OK.<br/>&gt;<br/>&gt; So, just out of curiosity, is it possible to make the script work<br/>&gt; WITHOUT the user having to manually go into MacPerl and persuade it to<br/>&gt; open an output window?<br/><br/>I think the following will open the output window:<br/><br/>tell application &quot;MacPerl&quot;<br/> activate<br/> Do Script &quot;print \&quot;hello!\&quot;;&quot; with check<br/>end tell<br/><br/>So, if you want, you can do something like:<br/><br/>set my_script to &quot;myDocument:Users:ni:Desktop:dog.pl&quot;<br/>set args to {&quot;dog&quot;, &quot;cat&quot;}<br/><br/>set perl_arg to {}<br/><br/>set perl_arg to perl_arg &amp; my_script<br/>set perl_arg to perl_arg &amp; args<br/><br/>tell application &quot;MacPerl&quot;<br/> activate -- or you can comment out this line, if MacPerl is running...<br/> Do Script &quot;print \&quot;hello!\&quot;;&quot; with check<br/> Do Script perl_arg mode Batch<br/>end tell<br/><br/>Best regards,<br/><br/>Nobumi Iyanaga<br/>Tokyo,<br/>Japan<br/><br/> http://www.nntp.perl.org/group/perl.macperl/2007/07/msg3098.html Sun, 08 Jul 2007 22:38:40 +0000 use Mac::Files, Mac::MoreFiles; by Xiong Glad to see traffic on the list!<br/><br/>Is it just me or are the docs for Mac::Files and Mac::MoreFiles <br/>hopelessly obscure? Example:<br/><br/>FSpDirectoryCopy fails (a) when attempting to copy over an existing <br/>folder -- as expected but without calling COPYERRHANDLER as <br/>advertised; and (b) when attempting to copy a very large folder -- <br/>unexpectedly. I&#39;d like to know more.<br/><br/>This is the Shuck for this routine:<br/><br/>* * *<br/><br/>FSpDirectoryCopy SRCSPEC, DSTSPEC, PREFLIGHT, [COPYERRHANDLER]<br/><br/>Make a copy of a directory structure in a new location. The <br/>FSpDirectoryCopy function makes a copy of a directory structure in a <br/>new location. COPYERRHANDLER is the Perl routine name to handle an <br/>error, should one arise. It will be called as:<br/><br/> $bailout = &amp;$COPYERRHANDLER(ERRORCODE,OPERATION,SRCSPEC,DSTSPEC);<br/><br/>* * *<br/><br/>What is PREFLIGHT? What is $bailout? What is OPERATION? What, <br/>*exactly*, are the permissible values of SRCSPEC and DSTSPEC? What <br/>must I do to make COPYERRHANDLER work? What obscure little bit of <br/>magic is implied by &amp;$COPYERRHANDLER? Where would I go to find a <br/>table of ERRORCODEs? (I know, Inside Macintosh, right?)<br/><br/>There doesn&#39;t seem to be any more info, anywhere. Call me an old fart <br/>but I started programming in a world where there was a page or <br/>several on every word ever used anywhere *in* the manual. This makes <br/>for big manuals, since, well, every page has many words on it -- but <br/>eventually the writer starts to reuse words and so the size is <br/>finite. There&#39;s also a problem of circular reference but patience and <br/>experience is usually enough to catch the drift of what&#39;s being said. <br/>With every term defined, nothing is left to chance.<br/><br/>The MacPerl stuff seems particularly poorly documented but I find the <br/>problem across the world of Perl. All the docs seem to assume that <br/>you already know what they&#39;re about to say; they&#39;re just handy to jog <br/>your memory. Where is:<br/><br/>* * *<br/><br/>THING<br/><br/>Thing does *this*. It accepts /foo/ and /bar/ as inputs and produces <br/>/baz/. Thing requires this, this, and this. It fails if this or that. <br/>The exact format of /baz/ is:<br/><br/>bip bip bip bip boo<br/><br/>FOO<br/><br/>Foo is a data structure of type /gimble/. Its contents are explained <br/>in this long, exhaustive table in which every key and field is <br/>listed, the types of every element of the structure, the permissible <br/>values.<br/><br/>. . . . .<br/><br/>* * *<br/><br/>Perl docs seem to breeze through it all with:<br/><br/><br/> $baz = Thing (foo, bar);<br/><br/>-- and a 3-line explanation. It&#39;s like the blonde&#39;s cocktail dress -- <br/>it looks very nice but it doesn&#39;t quite cover the subject.<br/><br/>-- <br/>Xiong Changnian<br/>xiong@mochamail.com<br/><br/>You must be the change you want to see in the world.<br/> -- Mahatma Gandhi<br/> http://www.nntp.perl.org/group/perl.macperl/2007/07/msg3097.html Sun, 08 Jul 2007 18:59:09 +0000 Re: passing arguments: AppleScript to MacPerl by David Micklem Hi,<br/><br/>Nobumi&#39;s method (with the direct tell application &quot;MacPerl&quot;) works<br/>perfectly for me on OS9.2 and MacPerl 5.6.1.<br/><br/>However, I only get output returned if MacPerl has previously ever<br/>had an output window open.<br/><br/>That is, if MacPerl isn&#39;t running, then it starts up OK when I run the<br/>script but I get no output/returned value. Re-running the script -&gt;<br/>still no output.<br/><br/>But if I go into MacPerl and either run a script, or syntax check a<br/>script so that the MacPerl output window opens, then re-running the<br/>AppleScript gives me the expected output. Even after I close the<br/>MacPerl output window, running the AppleScript still works OK.<br/><br/>So, just out of curiosity, is it possible to make the script work<br/>WITHOUT the user having to manually go into MacPerl and persuade it to<br/>open an output window?<br/><br/>David<br/><br/><br/> http://www.nntp.perl.org/group/perl.macperl/2007/07/msg3096.html Sun, 08 Jul 2007 09:45:58 +0000 Re: [MacPerl] passing arguments: AppleScript to MacPerl by Nobumi Iyanaga Hello Louis,<br/><br/>On Jul 8, 2007, at 2:43 AM, Louis Pouzin wrote:<br/><br/>&gt; Hello Nobumi,<br/>&gt;<br/>&gt; Great to hear from you again. Thank you for your suggestions. <br/>&gt; Indeed I am using Mac OS on old MACs. One OS is 7.5.5, the other <br/>&gt; 9.0.4.<br/>&gt;<br/>&gt; I have tried your scheme.<br/>&gt; On OS 9.0.4, it fails, and I don&#39;t understand why.<br/>&gt;<br/>&gt; -- args is an argument list of class &quot;list&quot;, each item is a string<br/>&gt; copy dog to the beginning of args<br/>&gt; activate perl<br/>&gt; tell perl to do script args -- error on script<br/>&gt; or<br/>&gt; tell perl<br/>&gt; Do Script args mode batch -- error on script<br/>&gt; end tell<br/>&gt;<br/>&gt; The diag is: end of line, etc. expected but &quot;script&quot; found<br/><br/>Why don&#39;t you use the normal &#39;tell application &quot;MacPerl&quot;&#39; scheme?<br/><br/>&gt;<br/>&gt; On OS 7.5.5 the statement &quot;tell perl to do script args&quot; calls dog.<br/>&gt; &quot;Do Script args mode batch&quot; fails on &quot;mode&quot;, with the diag:<br/>&gt; Expected end of line but found identifier<br/>&gt;<br/>&gt; However, even when dog is called, no argument is copied to @ARGV.<br/><br/>If you don&#39;t use &#39;tell application &quot;MacPerl&quot;&#39; scheme, I think the <br/>script would not compile, and then I don&#39;t understand how &#39;dog&#39; can <br/>be called??<br/><br/>Anyway, please try the script as I wrote:<br/><br/>set my_script to &quot;myDocument:Users:ni:Desktop:dog.pl&quot;<br/>set args to {&quot;dog&quot;, &quot;cat&quot;}<br/><br/>set perl_arg to {}<br/><br/>set perl_arg to perl_arg &amp; my_script<br/>set perl_arg to perl_arg &amp; args<br/><br/>tell application &quot;MacPerl&quot;<br/> Do Script perl_arg mode Batch<br/>end tell<br/><br/>The contents of &quot;dog.pl&quot; is the same as the one you wrote, that is:<br/><br/>$\ = &quot;\n&quot;; # print with EOL<br/>print &quot;nb args: &quot;, scalar @ARGV;<br/>$&quot; = &quot;\n&quot;; # separator<br/>print &quot;@ARGV&quot;;<br/><br/>Best regards,<br/><br/>Nobumi Iyanaga<br/>Tokyo,<br/>Japan<br/><br/> http://www.nntp.perl.org/group/perl.macperl/2007/07/msg3095.html Sat, 07 Jul 2007 21:05:00 +0000 Re: [MacPerl] passing arguments: AppleScript to MacPerl by Joshua Juran On Jul 7, 2007, at 10:43 AM, Louis Pouzin wrote:<br/><br/>&gt; On Fri, 29 Jun 2007 23:14:37 -0700, Joshua Juran wrote:<br/>&gt;<br/>&gt; set names to {...}<br/>&gt; set argv to names<br/>&gt; copy dog to beginning of argv<br/>&gt; tell perl to do script argv<br/>&gt;<br/>&gt; Hi Josh,<br/>&gt;<br/>&gt; Thanks for your answer. As you can read in my response to Nobumi, <br/>&gt; this scheme fails on both my mac&#39;s. I suspect it is an AppleScript <br/>&gt; problem, not a MacPerl one.<br/><br/>I verified the contents of argv in OS X&#39;s Script Editor. Obviously, <br/>you still have to set perl to application &quot;MacPerl&quot;, and it&#39;s Do <br/>Script handler has to accept a list, which I didn&#39;t check, since it <br/>seemed to be assumed in the original post.<br/><br/>&gt;&gt; These days I don&#39;t use MacPerl anymore -- I have my own port of <br/>&gt;&gt; perl to a Unix-like environment that runs on classic Mac OS.<br/>&gt;<br/>&gt; Why ? Is this more effective than running OS X ?<br/><br/>On old Macs, you can&#39;t run an acceptably recent version of OS X, if <br/>you can run it at all. If you can, the performance is awful. I have <br/>an OldWorld G3 tower monitoring the modem port and logging incoming <br/>calls via a Perl script.<br/><br/>If you have a processor-intensive non-Carbon app, it runs much better <br/>in native OS 9 than in Classic. My example is ToolServer, for <br/>running the Metrowerks developer tools.<br/><br/>And it&#39;s definitely more effective to run perl in a stdio environment <br/>than not. :-)<br/><br/>Josh<br/><br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.macperl/2007/07/msg3094.html Sat, 07 Jul 2007 18:15:41 +0000 [MacPerl] passing arguments: AppleScript to MacPerl by Louis Pouzin Hello Nobumi, <br/> <br/>Great to hear from you again. Thank you for your suggestions. Indeed I am using Mac OS on old MACs. One OS is 7.5.5, the other 9.0.4. <br/> <br/>I have tried your scheme. <br/>On OS 9.0.4, it fails, and I don&#39;t understand why. <br/> <br/> -- args is an argument list of class &quot;list&quot;, each item is a string <br/> copy dog to the beginning of args <br/> activate perl <br/> tell perl to do script args -- error on script <br/>or <br/> tell perl <br/> Do Script args mode batch -- error on script <br/> end tell <br/> <br/>The diag is: end of line, etc. expected but &quot;script&quot; found <br/> <br/>On OS 7.5.5 the statement &quot;tell perl to do script args&quot; calls dog. <br/>&quot;Do Script args mode batch&quot; fails on &quot;mode&quot;, with the diag: <br/>Expected end of line but found identifier <br/> <br/>However, even when dog is called, no argument is copied to @ARGV. It seems that I&#39;ll have to rig the perl script and use the clipboard (or resort to the perlfire interface I wrote years ago). But I&#39;d prefer the classic interface via @ARGV. <br/> <br/>Best regards <br/>- - <br/>On Mon, 2 Jul 2007 09:49:08 +0900, Nobumi Iyanaga wrote: <br/> <br/>&gt;If you are using Classic MacPerl, then this works on my machine: <br/> <br/>set my_script to &quot;myDocument:Users:ni:Desktop:dog.pl&quot; <br/>set args to {&quot;dog&quot;, &quot;cat&quot;} <br/> <br/>set perl_arg to {} <br/> <br/>set perl_arg to perl_arg &amp; my_script <br/>set perl_arg to perl_arg &amp; args <br/> <br/>tell application &quot;MacPerl&quot; <br/> Do Script perl_arg mode Batch <br/>end tell <br/> <br/>I hope this helps you. <br/> <br/> http://www.nntp.perl.org/group/perl.macperl/2007/07/msg3093.html Sat, 07 Jul 2007 12:13:02 +0000 [MacPerl] passing arguments: AppleScript to MacPerl by Louis Pouzin On Fri, 29 Jun 2007 23:14:37 -0700, Joshua Juran wrote: <br/> <br/>set names to {...} <br/>set argv to names <br/>copy dog to beginning of argv <br/>tell perl to do script argv <br/> <br/>Hi Josh, <br/> <br/>Thanks for your answer. As you can read in my response to Nobumi, this scheme fails on both my mac&#39;s. I suspect it is an AppleScript problem, not a MacPerl one. <br/> <br/>&gt;These days I don&#39;t use MacPerl anymore -- I have my own port of perl to a Unix-like environment that runs on classic Mac OS. <br/> <br/>Why ? Is this more effective than running OS X ? <br/> <br/>Best <br/> http://www.nntp.perl.org/group/perl.macperl/2007/07/msg3092.html Sat, 07 Jul 2007 12:12:55 +0000 Re: [MacPerl] passing arguments: AppleScript to MacPerl by Nobumi Iyanaga Hello Louis,<br/><br/>On Jun 29, 2007, at 10:36 AM, Louis Pouzin wrote:<br/><br/>&gt; Hi,<br/>&gt;<br/>&gt; Calling a macperl script (dog) from AS, with arguments a, b c, <br/>&gt; would read:<br/>&gt; tell perl to do script {dog, a, b, c}<br/>&gt;<br/>&gt; Assuming that a, b, c are strings, they are copied to @ARGV in dog.<br/>&gt;<br/>&gt; The problem I have is passing a list of arguments, e.g.<br/>&gt; set names to selection -- nb of selected objects not predictable<br/>&gt; tell perl to do script {dog, names} -- names conversion fails<br/>&gt;<br/>&gt; Then I can converts names to a list of strings:<br/>&gt; set snames to {}<br/>&gt; repeat with nam in names<br/>&gt; set snames to snames &amp; (nam as text)<br/>&gt; end repeat<br/>&gt; tell perl to do script {dog, snames} -- dog is called, @ARGV is empty<br/>&gt;<br/>&gt; dog could be:<br/>&gt; $\ = &quot;\n&quot;; # print with EOL<br/>&gt; print &quot;nb args: &quot;, scalar @ARGV;<br/>&gt; $&quot; = &quot;\n&quot;; # separator<br/>&gt; print &quot;@ARGV&quot;;<br/><br/>If you are using Classic MacPerl, then this works on my machine:<br/><br/>set my_script to &quot;myDocument:Users:ni:Desktop:dog.pl&quot;<br/>set args to {&quot;dog&quot;, &quot;cat&quot;}<br/><br/>set perl_arg to {}<br/><br/>set perl_arg to perl_arg &amp; my_script<br/>set perl_arg to perl_arg &amp; args<br/><br/>tell application &quot;MacPerl&quot;<br/> Do Script perl_arg mode Batch<br/>end tell<br/><br/>I hope this helps you.<br/><br/>Best regards,<br/><br/>Nobumi Iyanaga<br/>Tokyo,<br/>Japan<br/><br/> http://www.nntp.perl.org/group/perl.macperl/2007/07/msg3091.html Sun, 01 Jul 2007 21:29:54 +0000 passing arguments: AppleScript to MacPerl by David.Micklem &gt;Hi,<br/>&gt;<br/>&gt;Calling a macperl script (dog) from AS, with arguments a, b c, would read:<br/>&gt; tell perl to do script {dog, a, b, c}<br/>&gt;<br/>&gt;Assuming that a, b, c are strings, they are copied to @ARGV in dog.<br/>&gt;<br/>&gt;The problem I have is passing a list of arguments, e.g.<br/>&gt; set names to selection -- nb of selected objects not predictable<br/>&gt; tell perl to do script {dog, names} -- names conversion fails<br/>&gt;<br/>&gt;Then I can converts names to a list of strings:<br/>&gt; set snames to {}<br/>&gt; repeat with nam in names<br/>&gt; set snames to snames &amp; (nam as text)<br/>&gt; end repeat<br/>&gt; tell perl to do script {dog, snames} -- dog is called, @ARGV is empty<br/>&gt;<br/>&gt;dog could be:<br/>&gt; $\ = &quot;\n&quot;; # print with EOL<br/>&gt; print &quot;nb args: &quot;, scalar @ARGV;<br/>&gt; $&quot; = &quot;\n&quot;; # separator<br/>&gt; print &quot;@ARGV&quot;;<br/>&gt;<br/>&gt;Could anyone suggest a way around ?<br/>&gt;<br/>&gt;Thanks<br/><br/>Hi,<br/><br/>I don&#39;t have MacPerl (the OS9-specific version of perl) installed anymore to<br/>test it, but if you are really using OSX then the following does seem to work OK:<br/><br/>set names to {&quot;one&quot;, &quot; two&quot;, &quot; three&quot;}<br/>do shell script &quot;perl dog.pl &quot; &amp; names<br/><br/>You do need to make sure that your items are separated by spaces... and if<br/>&quot;names&quot; actually contains more complicated stuff that might include quote marks<br/>or $ signs then you should probably use your repeat loop to produce a quoted<br/>string using &quot;quoted form of nam:<br/><br/>repeat with nam in names<br/> set snames to snames &amp; &quot; &quot; &amp; quoted form of nam<br/>end repeat<br/><br/><br/>Alternatively, I&#39;m pretty sure that MacPerl had a &quot;DoAppleScript&quot; function:<br/>could you turn things around to start off in perl? So instead of AppleScript<br/>calling your perl script, your perl script calls AppleScript and gets the<br/>selection from the returned value.<br/><br/>David<br/> http://www.nntp.perl.org/group/perl.macperl/2007/07/msg3090.html Sun, 01 Jul 2007 11:07:25 +0000 Re: [MacPerl] Re: passing arguments: AppleScript to MacPerl by kurtz le pirate In article &lt;C26EC51A-EA3F-43F6-B6A8-3BFF606F4D81@metamage.com&gt;,<br/> wanderer@metamage.com (Joshua Juran) wrote:<br/><br/>&gt; This resource shows how to call AppleScript from Perl. Louis is <br/>&gt; trying to call MacPerl from AppleScript.<br/>&gt; <br/>sorry :(( read too quickly.<br/><br/><br/>-- <br/>klp<br/> http://www.nntp.perl.org/group/perl.macperl/2007/07/msg3089.html Sun, 01 Jul 2007 10:43:36 +0000 Re: [MacPerl] Re: passing arguments: AppleScript to MacPerl by Joshua Juran On Jun 29, 2007, at 9:26 AM, kurtz le pirate wrote:<br/><br/>&gt; In article &lt;200706290136.l5T1aQJU012861@merlin.enst.fr&gt;,<br/>&gt; pouzin@email.enst.fr (Louis Pouzin) wrote:<br/>&gt;<br/>&gt;&gt; Calling a macperl script (dog) from AS, with arguments a, b c, <br/>&gt;&gt; would read:<br/>&gt;&gt; tell perl to do script {dog, a, b, c}<br/>&gt;<br/>&gt; - google is your friend.<br/>&gt;<br/>&gt; - &lt;http://www.bradrice.com/wposx/archives/42&gt;<br/><br/>This resource shows how to call AppleScript from Perl. Louis is <br/>trying to call MacPerl from AppleScript.<br/><br/>Josh<br/><br/><br/> http://www.nntp.perl.org/group/perl.macperl/2007/06/msg3088.html Fri, 29 Jun 2007 23:34:04 +0000 Re: [MacPerl] passing arguments: AppleScript to MacPerl by Joshua Juran On Jun 28, 2007, at 6:36 PM, Louis Pouzin wrote:<br/><br/>&gt; Calling a macperl script (dog) from AS, with arguments a, b c, <br/>&gt; would read:<br/>&gt; tell perl to do script {dog, a, b, c}<br/>&gt;<br/>&gt; Assuming that a, b, c are strings, they are copied to @ARGV in dog.<br/>&gt;<br/>&gt; The problem I have is passing a list of arguments, e.g.<br/>&gt; set names to selection -- nb of selected objects not predictable<br/>&gt; tell perl to do script {dog, names} -- names conversion fails<br/><br/>Right, AppleScript doesn&#39;t have interpolating lists like Perl does.<br/><br/>&gt; Then I can converts names to a list of strings:<br/>&gt; set snames to {}<br/>&gt; repeat with nam in names<br/>&gt; set snames to snames &amp; (nam as text)<br/>&gt; end repeat<br/>&gt; tell perl to do script {dog, snames} -- dog is called, @ARGV is empty<br/><br/>&#39;&amp;&#39; is a string concatentation operator. I think you mean &quot;copy nam <br/>to end of snames&quot;. If instead you wrote &#39;set snames to &quot;&quot;&#39;, you&#39;d <br/>tell perl to do script { dog, &quot;foo bar baz&quot; } rather than { dog, <br/>&quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot; }.<br/><br/>&gt; dog could be:<br/>&gt; $\ = &quot;\n&quot;; # print with EOL<br/>&gt; print &quot;nb args: &quot;, scalar @ARGV;<br/>&gt; $&quot; = &quot;\n&quot;; # separator<br/>&gt; print &quot;@ARGV&quot;;<br/>&gt;<br/>&gt; Could anyone suggest a way around ?<br/><br/>set names to {...}<br/>set argv to names<br/>copy dog to beginning of argv<br/>tell perl to do script argv<br/><br/>(The double-set is there for clarity and can be elided.)<br/><br/>These days I don&#39;t use MacPerl anymore -- I have my own port of perl <br/>to a Unix-like environment that runs on classic Mac OS.<br/><br/>Josh<br/><br/><br/> http://www.nntp.perl.org/group/perl.macperl/2007/06/msg3087.html Fri, 29 Jun 2007 23:14:48 +0000 Re: passing arguments: AppleScript to MacPerl by kurtz le pirate In article &lt;200706290136.l5T1aQJU012861@merlin.enst.fr&gt;,<br/> pouzin@email.enst.fr (Louis Pouzin) wrote:<br/><br/>&gt; Hi,<br/>&gt; <br/>&gt; Calling a macperl script (dog) from AS, with arguments a, b c, would read:<br/>&gt; tell perl to do script {dog, a, b, c}<br/>&gt; <br/>&gt; Assuming that a, b, c are strings, they are copied to @ARGV in dog.<br/>&gt; <br/>&gt; The problem I have is passing a list of arguments, e.g.<br/>&gt; set names to selection -- nb of selected objects not predictable<br/>&gt; tell perl to do script {dog, names} -- names conversion fails<br/>&gt; <br/>&gt; Then I can converts names to a list of strings:<br/>&gt; set snames to {}<br/>&gt; repeat with nam in names<br/>&gt; set snames to snames &amp; (nam as text)<br/>&gt; end repeat<br/>&gt; tell perl to do script {dog, snames} -- dog is called, @ARGV is empty<br/>&gt; <br/>&gt; dog could be:<br/>&gt; $\ = &quot;\n&quot;; # print with EOL<br/>&gt; print &quot;nb args: &quot;, scalar @ARGV;<br/>&gt; $&quot; = &quot;\n&quot;; # separator<br/>&gt; print &quot;@ARGV&quot;;<br/>&gt; <br/>&gt; Could anyone suggest a way around ?<br/>&gt; <br/>&gt; Thanks<br/><br/> - google is your friend.<br/><br/> - &lt;http://www.bradrice.com/wposx/archives/42&gt;<br/><br/><br/><br/>-- <br/>klp<br/> http://www.nntp.perl.org/group/perl.macperl/2007/06/msg3086.html Fri, 29 Jun 2007 15:43:35 +0000 passing arguments: AppleScript to MacPerl by Louis Pouzin Hi,<br/><br/>Calling a macperl script (dog) from AS, with arguments a, b c, would read:<br/> tell perl to do script {dog, a, b, c}<br/><br/>Assuming that a, b, c are strings, they are copied to @ARGV in dog.<br/><br/>The problem I have is passing a list of arguments, e.g.<br/> set names to selection -- nb of selected objects not predictable<br/> tell perl to do script {dog, names} -- names conversion fails<br/><br/>Then I can converts names to a list of strings:<br/> set snames to {}<br/> repeat with nam in names<br/> set snames to snames &amp; (nam as text)<br/> end repeat<br/> tell perl to do script {dog, snames} -- dog is called, @ARGV is empty<br/><br/>dog could be:<br/> $\ = &quot;\n&quot;; # print with EOL<br/> print &quot;nb args: &quot;, scalar @ARGV;<br/> $&quot; = &quot;\n&quot;; # separator<br/> print &quot;@ARGV&quot;;<br/><br/>Could anyone suggest a way around ?<br/><br/>Thanks<br/> http://www.nntp.perl.org/group/perl.macperl/2007/06/msg3085.html Fri, 29 Jun 2007 05:50:55 +0000 Re: building DBD::mysql on Mac OS X 10.4.9 by Chris Sarnowski <br/>Hi Mark,<br/><br/>Sorry if this was already answered: I get the digest version of the <br/>list.<br/><br/>This list is intended for a particular version of Perl for Mac OS <br/>7-9. There is a separate list for perl on Mac OS X.<br/><br/>For help with DBD::mysql, try http://lists.mysql.com/perl (which I <br/>got from the README).<br/><br/>You can also try the perl DBI-users list; see http://lists.cpan.org/ <br/>showlist.cgi?name=dbi-users .<br/><br/>In any case, I suggest mentioning the version of DBD::mysql, the <br/>version of mySQL, and something more specific about the errors.<br/><br/>I have version 4.001 successfully installed on 10.4.8 - I had to fix <br/>something, but I don&#39;t remember what. I tracked down the solution <br/>with google, I suspect, but I&#39;ve installed a lot of DBD modules on a <br/>lot of machines, and I didn&#39;t keep any notes for this particular <br/>install.<br/><br/>good luck,<br/>Chris<br/><br/><br/>On Jun 7, 2007, at 9:55 PM, macperl-digest-help@perl.org wrote:<br/><br/>&gt;<br/>&gt; From: Mark Harris &lt;mark@acerbate.org&gt;<br/>&gt; Date: June 7, 2007 9:55:24 PM EDT<br/>&gt; To: macperl@perl.org<br/>&gt; Subject: building DBD::mysql on Mac OS X 10.4.9<br/>&gt;<br/>&gt;<br/>&gt; I attempted to build this module using CPAN, and got multiple <br/>&gt; errors. Please advise on how to successfully build this.<br/>&gt;<br/>&gt; Thanks,<br/>&gt;<br/>&gt; Mark in Tigard, OR<br/>&gt;<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.macperl/2007/06/msg3084.html Fri, 08 Jun 2007 10:52:20 +0000 Re: [MacPerl] building DBD::mysql on Mac OS X 10.4.9 by Chris Nandor Hi Mark, try the macosx@perl.org list. This is for MacPerl, the<br/>implementation of perl for &quot;Classic&quot; Mac OS.<br/><br/>-- <br/>Chris Nandor pudge@pobox.com http://pudge.net/<br/>Slashdot / SourceForge pudge@slashdot.org http://slashdot.org/<br/> http://www.nntp.perl.org/group/perl.macperl/2007/06/msg3083.html Thu, 07 Jun 2007 19:16:40 +0000 building DBD::mysql on Mac OS X 10.4.9 by Mark Harris I attempted to build this module using CPAN, and got multiple <br/>errors. Please advise on how to successfully build this.<br/><br/>Thanks,<br/><br/>Mark in Tigard, OR<br/> http://www.nntp.perl.org/group/perl.macperl/2007/06/msg3082.html Thu, 07 Jun 2007 18:55:32 +0000 Re: Trying to install DBD::Pg by Tom Allison I was able to get it working.<br/>I installed fink and then pulled in the dbd-pg module in from that.<br/><br/>DBI and DBD::Pg work great.<br/>I do not have a user command line psql.<br/>but right now I&#39;m not sure if I really need it.<br/><br/>I think the right answer is to eventually just install postgresql and <br/>not start the database.<br/><br/>On Apr 30, 2007, at 8:20 PM, Chris Sarnowski wrote:<br/><br/>&gt;<br/>&gt; Tom,<br/>&gt; This is probably not the best forum for this question. The intended <br/>&gt; audience are users of MacPerl on OS 9 (&quot;Classic&quot;), and the list is <br/>&gt; pretty moribund.<br/>&gt;<br/>&gt; Try dbi-users@perl.org ( I know it&#39;s active) or dbdpg- <br/>&gt; general@gborg.postgresql.org (from the DBD-Pg 1.49 README).<br/>&gt;<br/>&gt; I&#39;ve got DBD::Pg running on my G5, but I also did a full install of <br/>&gt; postgres, and I don&#39;t have a detailed record of what I did. I have <br/>&gt; a new Intel MacBook Pro, on which I am planning to install DBI and <br/>&gt; DBD::Pg, but I haven&#39;t done it yet and I don&#39;t have time tonight. <br/>&gt; I&#39;ll let you know how that goes, but I probably won&#39;t get to it <br/>&gt; until this weekend.<br/>&gt;<br/>&gt; I&#39;m confident it&#39;s doable. Sorry I can&#39;t be of more specific help <br/>&gt; right now.<br/>&gt;<br/>&gt; good luck,<br/>&gt; Chris<br/>&gt;<br/>&gt; Tom Allison wrote:<br/>&gt;<br/>&gt; &lt;snip&gt;<br/>&gt;&gt;<br/>&gt;&gt; I have installed the following today:<br/>&gt;&gt; Xcode (gcc &amp; make)<br/>&gt;&gt; DBI<br/>&gt;&gt; Bundle::CPAN<br/>&gt;&gt;<br/>&gt;&gt; from CPAN. This also included YAML.<br/>&gt;&gt;<br/>&gt;&gt; and Fink &amp; MacPorts -- but nothing else from these.<br/>&gt;&gt;<br/>&gt;&gt; I also have found that pgsql is already on the notebook and works <br/>&gt;&gt; correctly.<br/>&gt;&gt; I also found the pg_config file in:<br/>&gt;&gt; /System/Library/CoreServices/RemoteManagement/rmdb.bundle/bin/ <br/>&gt;&gt; pg_config<br/>&gt;&gt; But when I put this in for my path to pg_config I get the <br/>&gt;&gt; following (YAML?) related error immediately afterwards.:<br/>&gt;&gt;<br/>&gt;&gt; Checking if your kit is complete...<br/>&gt;&gt; Looks good<br/>&gt;&gt; Note (probably harmless): No library found for -lpq<br/>&gt;&gt; Using DBI 1.54 (for perl 5.008006 on darwin-thread-multi-2level) <br/>&gt;&gt; installed in /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI/<br/>&gt;&gt; Writing Makefile for DBD::Pg<br/>&gt;&gt; YAML Warning: Parsing a 1.2 document with a 1.0 parser<br/>&gt;&gt; Code: YAML_PARSE_WARN_BAD_MINOR_VERSION<br/>&gt;&gt; Line: 2<br/>&gt;&gt; Document: 1<br/>&gt;&gt; at /Library/Perl/5.8.6/YAML/Base.pm line 88<br/>&gt;&gt; YAML::Base::warn(&#39;YAML::Loader=HASH(0x4f939e0)&#39;, <br/>&gt;&gt; &#39;YAML_PARSE_WARN_BAD_MINOR_VERSION&#39;, 1.2) called at /Library/Perl/ <br/>&gt;&gt; 5.8.6/YAML/Loader.pm line 95<br/>&gt;&gt; YAML::Loader::_parse(&#39;YAML::Loader=HASH(0x4f939e0)&#39;) <br/>&gt;&gt; called at /Library/Perl/5.8.6/YAML/Loader.pm line 22<br/>&gt;&gt;<br/>&gt;&gt; And it spews a few dozen more lines that I truncated.<br/>&gt;&gt; I&#39;m not sure what I need to do at this point. There isn&#39;t <br/>&gt;&gt; anything here that says the problem is the postgresql libraries or <br/>&gt;&gt; anything like that. Rather a YAML issue.<br/>&gt;&gt;<br/>&gt;&gt; The funny thing is the claim that the Parser is a 1.0 parser when <br/>&gt;&gt; *I* think it&#39;s the most up to date available (which is version <br/>&gt;&gt; 0.67) so I&#39;m not in the right point of reference on the version.<br/>&gt;&gt;<br/>&gt;&gt; I&#39;m really hoping I can get this working soon.<br/>&gt;&gt; It&#39;s kind of killing my progress and whole point of getting a <br/>&gt;&gt; MacBook.<br/>&gt;&gt;<br/>&gt;&gt; Help?<br/><br/> http://www.nntp.perl.org/group/perl.macperl/2007/05/msg3081.html Tue, 01 May 2007 01:59:07 +0000 Re: Trying to install DBD::Pg by Chris Sarnowski <br/>Tom,<br/>This is probably not the best forum for this question. The intended <br/>audience are users of MacPerl on OS 9 (&quot;Classic&quot;), and the list is <br/>pretty moribund.<br/><br/>Try dbi-users@perl.org ( I know it&#39;s active) or dbdpg- <br/>general@gborg.postgresql.org (from the DBD-Pg 1.49 README).<br/><br/>I&#39;ve got DBD::Pg running on my G5, but I also did a full install of <br/>postgres, and I don&#39;t have a detailed record of what I did. I have a <br/>new Intel MacBook Pro, on which I am planning to install DBI and <br/>DBD::Pg, but I haven&#39;t done it yet and I don&#39;t have time tonight. <br/>I&#39;ll let you know how that goes, but I probably won&#39;t get to it until <br/>this weekend.<br/><br/>I&#39;m confident it&#39;s doable. Sorry I can&#39;t be of more specific help <br/>right now.<br/><br/>good luck,<br/>Chris<br/><br/>Tom Allison wrote:<br/><br/>&lt;snip&gt;<br/>&gt;<br/>&gt; I have installed the following today:<br/>&gt; Xcode (gcc &amp; make)<br/>&gt; DBI<br/>&gt; Bundle::CPAN<br/>&gt;<br/>&gt; from CPAN. This also included YAML.<br/>&gt;<br/>&gt; and Fink &amp; MacPorts -- but nothing else from these.<br/>&gt;<br/>&gt; I also have found that pgsql is already on the notebook and works <br/>&gt; correctly.<br/>&gt; I also found the pg_config file in:<br/>&gt; /System/Library/CoreServices/RemoteManagement/rmdb.bundle/bin/ <br/>&gt; pg_config<br/>&gt; But when I put this in for my path to pg_config I get the following <br/>&gt; (YAML?) related error immediately afterwards.:<br/>&gt;<br/>&gt; Checking if your kit is complete...<br/>&gt; Looks good<br/>&gt; Note (probably harmless): No library found for -lpq<br/>&gt; Using DBI 1.54 (for perl 5.008006 on darwin-thread-multi-2level) <br/>&gt; installed in /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI/<br/>&gt; Writing Makefile for DBD::Pg<br/>&gt; YAML Warning: Parsing a 1.2 document with a 1.0 parser<br/>&gt; Code: YAML_PARSE_WARN_BAD_MINOR_VERSION<br/>&gt; Line: 2<br/>&gt; Document: 1<br/>&gt; at /Library/Perl/5.8.6/YAML/Base.pm line 88<br/>&gt; YAML::Base::warn(&#39;YAML::Loader=HASH(0x4f939e0)&#39;, <br/>&gt; &#39;YAML_PARSE_WARN_BAD_MINOR_VERSION&#39;, 1.2) called at /Library/Perl/ <br/>&gt; 5.8.6/YAML/Loader.pm line 95<br/>&gt; YAML::Loader::_parse(&#39;YAML::Loader=HASH(0x4f939e0)&#39;) called <br/>&gt; at /Library/Perl/5.8.6/YAML/Loader.pm line 22<br/>&gt;<br/>&gt; And it spews a few dozen more lines that I truncated.<br/>&gt; I&#39;m not sure what I need to do at this point. There isn&#39;t anything <br/>&gt; here that says the problem is the postgresql libraries or anything <br/>&gt; like that. Rather a YAML issue.<br/>&gt;<br/>&gt; The funny thing is the claim that the Parser is a 1.0 parser when <br/>&gt; *I* think it&#39;s the most up to date available (which is version <br/>&gt; 0.67) so I&#39;m not in the right point of reference on the version.<br/>&gt;<br/>&gt; I&#39;m really hoping I can get this working soon.<br/>&gt; It&#39;s kind of killing my progress and whole point of getting a MacBook.<br/>&gt;<br/>&gt; Help?<br/> http://www.nntp.perl.org/group/perl.macperl/2007/05/msg3080.html Tue, 01 May 2007 00:34:46 +0000 Re: [MacPerl] Trying to install DBD::Pg by Chris Nandor Hi Tom,<br/><br/>The macperl@perl.org list is for MacPerl, an implementation of MacPerl for<br/>Mac OS 7-9. You want macosx@perl.org, a list for perl on Mac OS X.<br/><br/>Cheers,<br/><br/>-- <br/>Chris Nandor pudge@pobox.com http://pudge.net/<br/>Open Source Technology Group pudge@ostg.com http://ostg.com/<br/> http://www.nntp.perl.org/group/perl.macperl/2007/04/msg3079.html Mon, 30 Apr 2007 14:13:32 +0000 Trying to install DBD::Pg by Tom Allison I got a MacBook two days ago.<br/>My wife has had one for a year and it looked like a good thing.<br/><br/>I&#39;ve been doing all this perl stuff on Debian &amp; Solaris for almost a <br/>decade.<br/>But I&#39;m not familiar with how it&#39;s supposed to be done under Mac, so <br/>I&#39;m rather stuck.<br/><br/>Objective: install postgresql client software and drivers necessary <br/>to access remote postgresql databases. A local database is not <br/>required since sqllite3 is present and should suffice for development <br/>work. My expectation is that I can log in to a remote database using <br/>psql and perls DBI or DBD::Pg modules.<br/><br/>I have installed the following today:<br/>Xcode (gcc &amp; make)<br/>DBI<br/>Bundle::CPAN<br/><br/>from CPAN. This also included YAML.<br/><br/>and Fink &amp; MacPorts -- but nothing else from these.<br/><br/>I also have found that pgsql is already on the notebook and works <br/>correctly.<br/>I also found the pg_config file in:<br/>/System/Library/CoreServices/RemoteManagement/rmdb.bundle/bin/pg_config<br/>But when I put this in for my path to pg_config I get the following <br/>(YAML?) related error immediately afterwards.:<br/><br/>Checking if your kit is complete...<br/>Looks good<br/>Note (probably harmless): No library found for -lpq<br/>Using DBI 1.54 (for perl 5.008006 on darwin-thread-multi-2level) <br/>installed in /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI/<br/>Writing Makefile for DBD::Pg<br/>YAML Warning: Parsing a 1.2 document with a 1.0 parser<br/> Code: YAML_PARSE_WARN_BAD_MINOR_VERSION<br/> Line: 2<br/> Document: 1<br/>at /Library/Perl/5.8.6/YAML/Base.pm line 88<br/> YAML::Base::warn(&#39;YAML::Loader=HASH(0x4f939e0)&#39;, <br/>&#39;YAML_PARSE_WARN_BAD_MINOR_VERSION&#39;, 1.2) called at /Library/Perl/ <br/>5.8.6/YAML/Loader.pm line 95<br/> YAML::Loader::_parse(&#39;YAML::Loader=HASH(0x4f939e0)&#39;) called <br/>at /Library/Perl/5.8.6/YAML/Loader.pm line 22<br/><br/>And it spews a few dozen more lines that I truncated.<br/>I&#39;m not sure what I need to do at this point. There isn&#39;t anything <br/>here that says the problem is the postgresql libraries or anything <br/>like that. Rather a YAML issue.<br/><br/>The funny thing is the claim that the Parser is a 1.0 parser when *I* <br/>think it&#39;s the most up to date available (which is version 0.67) so <br/>I&#39;m not in the right point of reference on the version.<br/><br/>I&#39;m really hoping I can get this working soon.<br/>It&#39;s kind of killing my progress and whole point of getting a MacBook.<br/><br/>Help?<br/> http://www.nntp.perl.org/group/perl.macperl/2007/04/msg3078.html Mon, 30 Apr 2007 14:04:23 +0000 Re: [MacPerl] GnuPG::Interface module on OS X by Chris Nandor This list is for MacPerl, which is a program that runs under Mac OS 7-9,<br/>and the &quot;Classic&quot; environment in Mac OS X. You want the macosx@perl.org<br/>mailing list.<br/><br/>-- <br/>Chris Nandor pudge@pobox.com http://pudge.net/<br/>Open Source Technology Group pudge@ostg.com http://ostg.com/<br/> http://www.nntp.perl.org/group/perl.macperl/2006/09/msg3077.html Tue, 19 Sep 2006 11:33:28 +0000 Re: [MacPerl] GnuPG::Interface module on OS X by Dennis Putnam Sorry and thanks.<br/><br/>On Sep 19, 2006, at 1:33 PM, Chris Nandor wrote:<br/><br/>&gt; This list is for MacPerl, which is a program that runs under Mac OS <br/>&gt; 7-9,<br/>&gt; and the &quot;Classic&quot; environment in Mac OS X. You want the <br/>&gt; macosx@perl.org<br/>&gt; mailing list.<br/>&gt;<br/>&gt; -- <br/>&gt; Chris Nandor pudge@pobox.com http://pudge.net/<br/>&gt; Open Source Technology Group pudge@ostg.com http://ostg.com/<br/>&gt;<br/><br/><br/><br/>Dennis Putnam<br/>Sr. IT Systems Administrator<br/>AIM Systems, Inc.<br/>11675 Rainwater Dr., Suite 200<br/>Alpharetta, GA 30004<br/>Phone: 678-240-4112<br/>Main Phone: 678-297-0700<br/>FAX: 678-297-2666 or 770-576-1000<br/>The information contained in this e-mail and any attachments is <br/>strictly confidential. If you are not the intended recipient, any <br/>use, dissemination, distribution, or duplication of any part of this <br/>e-mail or any attachment is prohibited. If you are not the intended <br/>recipient, please notify the sender by return e-mail and delete all <br/>copies, including the attachments.<br/><br/> http://www.nntp.perl.org/group/perl.macperl/2006/09/msg3076.html Tue, 19 Sep 2006 10:39:29 +0000 GnuPG::Interface module on OS X by Dennis Putnam Although I don&#39;t think this is an OS X specific issue I can&#39;t find <br/>any place to seek help. If someone knows of a better resource please <br/>let me know.<br/><br/> I have installed GnuPG on a Tiger (10.4.7) server and it seems to <br/>be working fine. I then installed GnuPG::Interface in perl and wrote <br/>a script that tries to decrypt a file. Everything seems to be working <br/>fine and my file gets decrypted. My problem occurs when I try to run <br/>the script in background (cron or nohup). I get an error pointing to <br/>the line that calls the &#39;decrypt&#39; method. It says &quot;fh is not <br/>defined.&quot; I don&#39;t have a variable by that name so I don&#39;t have a clue <br/>what it is referring to. I tried setting $gunpg-&gt;options-&gt;batch(1); <br/>but that did not help. Can someone help me figure out what is wrong? <br/>Thanks.<br/><br/>Dennis Putnam<br/>Sr. IT Systems Administrator<br/>AIM Systems, Inc.<br/>11675 Rainwater Dr., Suite 200<br/>Alpharetta, GA 30004<br/>Phone: 678-240-4112<br/>Main Phone: 678-297-0700<br/>FAX: 678-297-2666 or 770-576-1000<br/>The information contained in this e-mail and any attachments is <br/>strictly confidential. If you are not the intended recipient, any <br/>use, dissemination, distribution, or duplication of any part of this <br/>e-mail or any attachment is prohibited. If you are not the intended <br/>recipient, please notify the sender by return e-mail and delete all <br/>copies, including the attachments.<br/><br/> http://www.nntp.perl.org/group/perl.macperl/2006/09/msg3075.html Tue, 19 Sep 2006 09:22:19 +0000