i want to configure the option of hypermail but i'm not an experimented
in perl
in the hypermail.pl and in the line
usage unless getopts('pim:d:');
what i have to type ?
i'm on a mac and my mail is in bigBrother:Courrier:Inbox
the script
#!/usr/bin/perl
#
# This program is a work-alike of the 'h
i want to configure the option of hypermail but i'm not an experimented
in perl
in the hypermail.pl and in the line
usage unless getopts('pim:d:');
what i have to type ?
i'm on a mac and my mail is in bigBrother:Courrier:Inbox
the script
#!/usr/bin/perl
#
# This program is a work-alike of the 'h
the script run good
i add
$opt_m="big Brother:Dossier Système:Préférences:Netscape
Users:David:Courrier:Inbox";
$opt_d="big Brother:Archives:";
I have a problem with require in a cgi in perl
the message from the server is
[Fri May 18 17:55:15 2001] Indexer.pm: Indexer.pm did not return a true
value at admin.cgi line 20. BEGIN
failed--compilation aborted at admin.cgi line 22.
How did i do for that Indexer.pm return a true value ?
I tri t
Just follow the Indexer.pm that i want to require, but I have this
message
[Sun May 20 10:53:38 2001] Indexer.pm: Indexer.pm did not return a true
value at admin.cgi line 20. BEGIN
failed--compilation aborted at admin.cgi line 22.
package Circa::Indexer;
# module Circa::Indexer : provide functio
I ask still the same question
When i require a module the server say me it didn't return a true value
So i have added a 1; after the last sub as below
sub header {return "Content-Type: text/html\n\n";}
1;
But i have the same message of error
What did i do not correctly ?
I have a module that don't return a true value after a commande require,
however there's a 1; after the last sub
what can i do ?
m/macperl/ptf_book/
An HTML version http://ptf.com/macperl/ptf_book/r/MP/i2.html
of the book available online! This means that you can "try before you buy"... or...
not. Think of it as Shareware... for a book!
David
Bruce Van Allen wrote:
> Chris -- Some hosts, upon asking if anyone wants coffee, will take
> literally the answer "only if you're going to make it anyway"; others
> will interpret it as "please make some."
>
> I do still use a 68K Mac. Besides its function as a floppy disk drive
> for my newer P
gument to a log file.
Or you could define closures for $SIG{__WARN__} and/or $SIG{__DIE__} that
get called when warn() or die() are called, respectively, e.g.:
local $SIG{__WARN__} = sub { logmsg(shift) };
HTH,
David
> Keary Suska
> Esoteritech, Inc.
> "Leveraging Open Source for a better Internet"
The %SIG hash should avoid having to wrap your program in a huge eval. Is
using %SIG not an option?
- David
> From: Keary Suska <[EMAIL PROTECTED]>
> Date: Thu, 25 Oct 2001 00:09:25 -0600
> To: David Iberri <[EMAIL PROTECTED]>
> Cc: MacPerl List <[EMAIL PROTECTE
.
GD.pm has been ported to Mac OS. It was included as part of the standard
MacPerl distribution for 5.2.0r4, but not the 5.6.1 development versions,
IIRC. For information on the library itself, you might try
http://stein.cshl.org/WWW/software/GD/
Of course, check out CPAN too.
Regards,
David
>
1, 5, 3, 0, 5);
my $a = $year - 1600;
my($b, $c) = ($a % 12, int($a/100));
return((2+$b-$c+$day+int($a/12)+int($b/4)+int($c/4)-$ary[$month-1])%7);
}
dow() returns the index of the day of week, where 0 = Sunday, 6 = Saturday.
IIRC, this only works for dates after sometime in September, 1
27;);
@values now contains "all selected values from a multiple select field."
Regards,
David
>
> *
> * Ralph Freibeuter *
> * FON 0211 700 45 45*
> * Rechner: G3-300 Macintosh *
> * Linux: Suse6.4 PPC*
> * Status: blutiger Anfänger *
> * Suche Mac PPC Suse Leute! *
> *
>
> and how can i print for example line 5 to 15
open(FILE, 'file') or die $!;
print (()[4..14]); # inefficient, but
# easy to write
close(FILE);
Regards,
David
> thanks
>
>
ine after I rebuilt the desktop (restart holding
command-option-shift).
Hope that works :-)
Cheers,
David
>
> UNLESS
>
> I place a shortcut to them in the DragStrip (Aladdin's launcher type thing).
> When I drag a folder to process onto a droplet in the Dragstrip, it works
&
>> http://dev.macperl.org/docs/macperlreadme.html
>>
>> For more information on development, including bug reporting and source,
>> see the MacPerl Development Site.
>>
>> http://dev.macperl.org/
Cheers,
David
Said macnerd:
> I looked around on the internet and i
Bill Becker wrote:
> What would be the best way to determine this programmatically ???
The File::Spec module should lead you in the right direction.
$pathsep = File::Spec->catdir('');
yields ":" for $pathsep on my Mac (running OS 8.6), and "/" on my
At 4/18/2002 2:40 AM, Thomas Wegner wrote:
> At 11:49 Uhr -0700 17.04.2002, David Iberri wrote:
>> Bill Becker wrote:
>>
>>> What would be the best way to determine this programmatically ???
>>
>> The File::Spec module should lead you in the right direct
d his confounded
ball" revert to the normal arrow cursor and no glue file is generated.
Any ideas?
TIA,
-Dave
--
David H. Emme
"Sometimes what seems to be enough smoke to guarantee a robust
fire is actually just a cloud of dust from a passing bandwagon."
Daniel Dennett
/id/C/CN/CNANDOR/GD-1.19-bin-2-MacOS.tar.gz
, apparently doesn't exist.
What's a guy to do?
Thanks,
David
s of its utility.
As always, there are probably more ways of handling
exceptions than you can shake a stick at. Thankfully
with Perl 6 we'll be getting something a little more
standard (whatever that means).
Cheers,
David
--- "Nicholas G. Thornton"
<[EMAIL PROTECTED]> wrote:
> (th
_index (reverse 0..$line_length-1) {
# On each line, print the $digit_index'th digit
# of each element
foreach my $elem (@array) {
print $elem->[$digit_index];
}
print "\n";
}
Cheers,
David
At 4/3/2003 7:29 PM, [EMAIL PROTECTED] wrote:
> On Friday, April 4, 2003, at 12:48 PM, David Iberri wrote:
>> At 4/3/2003 6:05 PM, [EMAIL PROTECTED] wrote:
>>> ie I want to split up the array:
>>>
>>> array: 12345123451234512345
>>>
>>
nts = grep {
/^result\d{3}/
} readdir DIR;
# Close the directory handle
closedir DIR;
# Print directory contents
for my $file ( @contents ) {
print "$file\n";
}
Cheers,
David
At 7/12/2003 9:35 AM, Martin Buchmann wrote:
> Hi all,
>
> i think i just need an idea or a fun
use your repeat loop to produce a quoted
string using "quoted form of nam:
repeat with nam in names
set snames to snames & " " & quoted form of nam
end repeat
Alternatively, I'm pretty sure that MacPerl had a "DoAppleScript" function:
could you turn things around to start off in perl? So instead of AppleScript
calling your perl script, your perl script calls AppleScript and gets the
selection from the returned value.
David
e
MacPerl output window, running the AppleScript still works OK.
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?
David
/scripting_osx.html
David
From: Alan Fry
Date: 6 March 2011 15:38:02 GMT+01:00
To: macperl@perl.org
Subject: MacPerl::DoAppleScript and Perl v5.10.0
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
tability of Java to run on
multiple platforms will necessarily follow the MacHTTP standard, and
if it doesn't the MacPerl CGI glue will not work.
Just one possibility to pursue. Do keep us posted about what you find out.
-David-
David Steffen, Ph.D.
President, Biomedical Computing, Inc. <
s NOT use the MacHTTP standard and thus is NOT compatable
with the MacPerl CGI glue.
-David-
David Steffen, Ph.D.
President, Biomedical Computing, Inc. <http://www.biomedcomp.com/>
Phone: (713) 610-9770 FAX: (713) 610-9769 E-mail: [EMAIL PROTECTED]
, the current editor is just fine for how I use it.
-David-
---
* NO EDITOR WARS!! I admit it, your editor is better :-) I happen
to use BBEdit so that's what I talk about here.
---
David Steffen, Ph.D.
President, Biomedical Computing, Inc. <http://www.biomedcomp.com/>
Phone: (713) 610-9770 FAX: (713) 610-9769 E-mail: [EMAIL PROTECTED]
the error messages.
Perl seems to run ok otherwise. An FTP client also runs ok on the
system.
Is there anything special about OS9 that could be causing a problem?
David Groskind
[EMAIL PROTECTED]
I'm something of an old-timer, having learned (s)printf as a C coder
(pre-ANSI). The idiom that I internalized when I wanted to get leading zeros
instead of leading spaces was:
printf( "%2.2d", someInt );
And this still works, in perl the same as it does in C (except for having to
p
At 12:46 PM -0800 3/13/01, David J. Iberri wrote:
>What *exactly* does MacPerl do when it saves a script as a CGI script?
It makes a copy of a small application from the "MacPerl Extensions"
folder named "CGI Script", it sets the Mac filesystem properties on
that copy
;
>any suggestions?
Try increasing the memory for the CGI.
Note that the CGI is an independent application which, by default, is
given a rather small memory partition. Even if MacPerl and Webstar
have plenty of memory, the CGI can run out.
-David-
David Steffen, Ph.D.
President, Biomedical
e, without seeing the script.
My debugging sequence would be:
1) Increase the memory for the CGI.
2) Increase the memory for Webstar.
3) Increase the memory for MacPerl.
4) Post the script (if its not too large).
-David-
David Steffen, Ph.D.
President, Biomedical Computing, Inc. <http:
ng totally
sucks compared to BBEdit. BBEdit is far from perfect (regex support
is weak, integration with MacPerl has the odd rough edge, no color
coding for Python) but is much better than anything else I have tried.
-David Steffen-
David Steffen, Ph.D.
President, Biomedical Computing, Inc. <h
rns 'Los Alamitos', 'Los Angeles', but not 'Loshard' or
# 'Los Montanas Azules'
@los_places = grep {
my @words = split(/\s+/);
@words == 2 and $words[0] =~ /los/i;
} @locations;
HTH
Regards,
David
Hi all,
I frequently use 'my' with for loops in the following way:
for my $name( qw{ David Steven Eric } ) {
... # do something with $name
}
Was 'my' not meant to be used like this?
The reason I ask is that when used with MacPerl, everything behaves as
expected. Howeve
usually do something like this:
if(open FILE, "path:to:file") {
my $i = 0;
while() {
chomp;
print "$i $_\n";
last if ++$i == 10;
}
} else {
print "File couldn't be opened: $!\n";
}
Hope that helps.
Regards,
David
file.
> I will modify the prompt later, and any other tests later too (like
> case insensitivity, or testing for garbage input)
You'll probably first want to define 'n', 'q', and , so the user
knows what keys to hit at the prompt.
Hope that helps.
Regards,
David
Hi all,
Out of curiosity...
What *exactly* does MacPerl do when it saves a script as a CGI script?
Thanks,
David
atched pattern. Put some parens around your pattern
as in /(Adam)/ -- that should do the trick.
- David
successful
execution of any initialization code, so it's customary to end such a file
with "1;" unless you're sure it'll return TRUE otherwise. But it's better
just to put the "1;", in case you add more statements.
The above statement holds true for use() as well. So just add a "1;" to
Clock.pm, and the error will disappear.
[snip]
Regards,
David
d output first value: 33 sec value: 44
sub perlFunction() {
my($str, $hashref) = @_;
while(my($key, $val) = each %$hashref) {
$str =~ s/$key/$val/gi;
}
return $str;
}
I know there are some cleaner ways to do this, but they slip my mind for the
moment... :-)
HTH
Regards,
Da
45 matches
Mail list logo