[13302] in Perl-Users-Digest
Perl-Users Digest, Issue: 712 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 3 16:07:48 1999
Date: Fri, 3 Sep 1999 13:05:13 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 3 Sep 1999 Volume: 9 Number: 712
Today's topics:
Adding command line switches (Brian Clark)
Re: Adding command line switches <crdevilb@mtu.edu>
Array of Arrays <vinh.bui@medstat.com>
Re: Array of Arrays (Marcel Grunauer)
Re: Array of Arrays <crdevilb@mtu.edu>
Re: Array of Arrays <bshow@my-deja.com>
Re: darndest regex thing <ltl@rgsun5.viasystems.com>
Re: darndest regex thing <ltl@rgsun5.viasystems.com>
Re: Does Perl have regexpr macros? (Paul Guyot)
Re: File handles, forks, objects and scope <tchrist@mox.perl.com>
Re: How do I open a HANDLE to two destination <nguyend7@msu.edu>
Re: How do I open a HANDLE to two destination <tchrist@mox.perl.com>
Re: Image Size in Bytes <jimmy@blackhole-designs.com>
Re: Image Size in Bytes <flavell@mail.cern.ch>
Installing/using modules (Peter Wilford)
localizing on single source for asian langs <dshaffer@cobra.diac.com>
mod_perl installation Q <clavikal@voicenet.com>
Net::Telnet or .....?? Newbie grovels for help. <davidmck@earthlink.net>
Re: Newbie Q: Page redirection based on URL <nguyend7@msu.edu>
Re: null character kills CGI script on NT <edogawa_konan@yahoo.com>
Re: null character kills CGI script on NT (Larry Rosler)
Perl and Threads <steve@nextopia.com>
perl or python w/MTS? nielsenjf@my-deja.com
Re: perl/irix: make test fails ipc_sysv <scotth@sgi.com>
Re: perl/irix: make test fails ipc_sysv <rra@stanford.edu>
Perl/Web Developer tracymastromatteo@my-deja.com
Save form info to file & call up again? <josie@thej-files.com>
Re: Save form info to file & call up again? (Bill Moseley)
Re: SEARCH and REPLACE <aqumsieh@matrox.com>
Re: Simulating Carriage Returns (Larry Rosler)
Re: Where a subroutine gets called from? <aqumsieh@matrox.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 03 Sep 1999 17:01:10 GMT
From: perl@bjclark.com (Brian Clark)
Subject: Adding command line switches
Message-Id: <37cffd57.68148984@news.greenwood.net>
Hey guys:
Can anyone point me to a
reference/module/buried-page-in-the-camel-book for adding command line
options/switches to a perl program?
I'm using a Linux RH6.0 system, a Unix BSDI, and a Debian GNU/Linux
system, running different perl programs for personal use. Some of the
programs can do different things depending on STDIN from the command
line. I would rather, if it's even possible, run a program with
switches depending on what I want to do, rather than being prompted
for STDIN.
For example, lets say, the program now does this:
bash# ./program.pl
Run cleanup? [Y/N]:
And, then I'd enter y or n to run cleanup.
I'd rather be able to do:
bash# ./program.pl -c
With no questions asked. :-)
I'd also be great to be able to do ./program.pl --help and provide a
list of available commands for the program.
Any idea how I could accomplish this? Is there some module that would
allow me to add this type of feature?
It's one of those things that are often quoted, "Don't program for 5
hours to save 5 minutes." But, this would really save me a lot of
typing.
Brian
------------------------------
Date: 3 Sep 1999 17:49:14 GMT
From: Colin R. DeVilbiss <crdevilb@mtu.edu>
Subject: Re: Adding command line switches
Message-Id: <7qp1mq$ggv$1@campus1.mtu.edu>
Brian Clark <perl@bjclark.com> wrote:
> Can anyone point me to a
> reference/module/buried-page-in-the-camel-book for adding command line
> options/switches to a perl program?
perldoc Getopt::Std
Colin DeVilbiss
------------------------------
Date: Fri, 03 Sep 1999 17:43:57 GMT
From: Vinh T. Bui <vinh.bui@medstat.com>
Subject: Array of Arrays
Message-Id: <7qp1cq$oal$1@nnrp1.deja.com>
I have a data file with the following:
0|0|0|A
0|0|1|B
0|1|0|C
0|1|1|D
1|0|0|E
1|0|1|F
1|1|0|G
1|1|1|H
I will be reading each line:
open (X, $file);
@lines = <X>;
foreach (@lines) {
@item = split(/\|/, $_);
How do I set up a multi-dimentional array to this data?
In other words, $array[1][1][1] would equal H, $array[0][1][1] would
equal D, etc.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 03 Sep 1999 18:05:59 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: Array of Arrays
Message-Id: <37d01bf5.28039528@news>
On Fri, 03 Sep 1999 17:43:57 GMT, Vinh T. Bui <vinh.bui@medstat.com>
wrote:
> I have a data file with the following:
[snip data reproduced below]
> How do I set up a multi-dimentional array to this data?
> In other words, $array[1][1][1] would equal H, $array[0][1][1] would
> equal D, etc.
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
my %h;
while (<DATA>) {
my ($x,$y,$z,$val) = split /\|/;
$h{$x}{$y}{$z} = $val;
}
print Dumper(\%h);
__DATA__
0|0|0|A
0|0|1|B
0|1|0|C
0|1|1|D
1|0|0|E
1|0|1|F
1|1|0|G
1|1|1|H
Marcel
Perl Padawan
--
sub AUTOLOAD{($_=$AUTOLOAD)=~s,^.*::,,;y,_, ,;print} Just_Another_Perl_Hacker();
------------------------------
Date: 3 Sep 1999 18:01:30 GMT
From: Colin R. DeVilbiss <crdevilb@mtu.edu>
Subject: Re: Array of Arrays
Message-Id: <7qp2dq$hk7$1@campus1.mtu.edu>
Vinh T. Bui <vinh.bui@medstat.com> wrote:
> 0|0|0|A
> 0|0|1|B
> 0|1|0|C
> 0|1|1|D
> 1|0|0|E
> 1|0|1|F
> 1|1|0|G
> 1|1|1|H
> How do I set up a multi-dimentional array to this data?
> In other words, $array[1][1][1] would equal H, $array[0][1][1] would
> equal D, etc.
> open (X, $file);
> @lines = <X>;
> foreach (@lines) {
> @item = split(/\|/, $_);
$array[$item[0]][$item[1]][$item[2]] = $item[3];
}
perldoc perlreftut
perldoc perldsc
perldoc perllol
perldoc perlref
Colin DeVilbiss
------------------------------
Date: Fri, 03 Sep 1999 19:35:39 GMT
From: Bob Showalter <bshow@my-deja.com>
Subject: Re: Array of Arrays
Message-Id: <7qp7ua$tgk$1@nnrp1.deja.com>
In article <7qp1cq$oal$1@nnrp1.deja.com>,
Vinh T. Bui <vinh.bui@medstat.com> wrote:
> I have a data file with the following:
> 0|0|0|A
> 0|0|1|B
> 0|1|0|C
...
> How do I set up a multi-dimentional array to this data?
> In other words, $array[1][1][1] would equal H, $array[0][1][1] would
> equal D, etc.
How about something like:
foreach (@lines)
{
chomp;
my ($x, $y, $z, $value) = split(/\|/);
$data[$x][$y][$z] = $value;
}
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 3 Sep 1999 18:58:07 GMT
From: lt lindley <ltl@rgsun5.viasystems.com>
Subject: Re: darndest regex thing
Message-Id: <7qp5nv$5nf$1@rguxd.viasystems.com>
elephant <elephant@squirrelgroup.com> wrote:
:>lt lindley writes ..
:>>This regexp does much of what you want, but neither your solution
:>>nor mine are really very good.
:>>
:>> @a=m/((?<=").+?(?=")|[^" ]+)/g;
:>especially not really good for
:> $_ = q(first second "the third token" fourth fifth "sixth token");
:>try it .. blergh
Ouch. I left the quotes around for the next (and previous) matches
since they were zero width assertions.
This seems to dump them. Not that I'm claiming it as the right way
to go about solving the problem. Just regexp fun.
@a=m/((?<=")\b.+?\b(?=")|\b[^" ]+?\b)/g;
--
// Lee.Lindley /// Programmer shortage? What programmer shortage?
// @bigfoot.com /// Only *cheap* programmers are in short supply.
//////////////////// 50 cent beers are in short supply too.
------------------------------
Date: 3 Sep 1999 19:13:40 GMT
From: lt lindley <ltl@rgsun5.viasystems.com>
Subject: Re: darndest regex thing
Message-Id: <7qp6l4$6a0$1@rguxd.viasystems.com>
elephant <elephant@squirrelgroup.com> wrote:
:>Jonathan Mayer writes ..
:>>I'm trying to make a smart parser that tokenizes a string, but treats
:>>anything between two quotes as a single token. You would think this
:>>would do the trick:
:>>
:>>$_ = qq!first second "the third token" fourth!;
:>>@a = m/(?:\"(.+?)\")|(\S+)/g;
:>each time this matches it fills up TWO backreferences .. ie. the first
:>time it sees \"(.+?)\" OR (\S+) it fills up $1 and $2 .. the second time
:>it fills up $3 and $4 .. the third $5 and $6 and the fourth $7 and $8
Can you demonstrate that? In a loop it would be only $1 and $2 (one
of which is undef) each time through the loop. In this list context I
can't see $1 or $2 being set at all, much less $5 or $6.
--
// Lee.Lindley /// Programmer shortage? What programmer shortage?
// @bigfoot.com /// Only *cheap* programmers are in short supply.
//////////////////// 50 cent beers are in short supply too.
------------------------------
Date: Fri, 03 Sep 1999 14:41:45 GMT
From: pguyot@pnm-consulting.com (Paul Guyot)
Subject: Re: Does Perl have regexpr macros?
Message-Id: <1dxke8c.libvxe17riohsN@[212.27.46.228]>
David Pautler <letsgo_7@lava.net> wrote:
> I have searched the FAQ at www.perl.com and the index of the Camel book.
>
> Does Perl have regexpr macros like those of Lex? For example, I would
> like to define this,
>
> word_style ( </?B> | </?I> )
>
> and use it like this:
>
> m| {word_style} (.*?) {word_style} |six
This:
$wordStyle = '(?:</?B>|</?I>)';
$sample = "<B>Hello</I> world";
if ($sample =~ m{$wordStyle(.*?)$wordStyle}six)
{
print "$1\n";
} else {
print "Blah\n";
}
Prints this:
Hello
So I guess the answer is YES.
Regards,
Paul
--
P&M Consulting Newton Program
http://www.pnm-consulting.com/newton/
------------------------------
Date: 3 Sep 1999 10:06:11 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: File handles, forks, objects and scope
Message-Id: <37cff1f3@cs.colorado.edu>
In comp.lang.perl.misc, sjones@icubed.com writes:
:Should I be able to use file handle GLOBs across object
:namespaces?
You can.
: # in the parent, just prior to forking
: $child->{wh} = \*WRITE;
: pipe($rh, WRITE) or croak "Can't create pipes: $!";
: my $wh = $this->{wh};
: open(STDOUT, ">&=$wh) or croak "Can't dupe write handle";
What do you expect open() to do with arguments of
open(STDOUT,">&=GLOB(0x80d41e4)")
The dup syntax of open() permits a file descriptor number or a file
handle name, but you provided it with neither.
People make this mistake a great deal. I don't know why.
--tom
--
"All my possessions for a moment of time."
- Elizabeth I, last words
------------------------------
Date: 3 Sep 1999 17:16:21 GMT
From: Dan Nguyen <nguyend7@msu.edu>
Subject: Re: How do I open a HANDLE to two destination
Message-Id: <7qovp5$dma$1@msunews.cl.msu.edu>
akluyskens@my-deja.com wrote:
: Does someone know how to open a filehandle to two different destination
: (<STDOUT> and a file). I need the same behavior as the "tee" command.
Would the time you spent posting this message been more easily spent
by just copying the print statement and doing
print STDOUT "Foo Bar Baz";
print HANDLE "Foo Bar Baz";
or if your lazy.
sub tee {
print STDOUT @_;
print HANDLE @_;
}
--
Dan Nguyen | It is with true love as it is with ghosts;
nguyend7@msu.edu | everyone talks of it, but few have seen it.
dnn@debian.org | -Maxime De La Rochefoucauld
25 2F 99 19 6C C9 19 D6 1B 9F F1 E0 E9 10 4C 16
------------------------------
Date: 3 Sep 1999 11:43:33 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How do I open a HANDLE to two destination
Message-Id: <37d008c5@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
akluyskens@my-deja.com writes:
:Does someone know how to open a filehandle to two different destination
:(<STDOUT> and a file). I need the same behavior as the "tee" command.
Then use the "tee" command, sheesh!
Aren't you the one I just sent eight answers to? Please read them.
--tom
--
I don't want the world, I just want your half.
------------------------------
Date: Fri, 03 Sep 1999 16:08:33 GMT
From: Jimmy Humphrey <jimmy@blackhole-designs.com>
Subject: Re: Image Size in Bytes
Message-Id: <37CFF336.F4186982@blackhole-designs.com>
Actually, I never really got any "real" answers. Also, I was hoping by
posting again people that did not see it might see it.
Jimmy
------------------------------
Date: Fri, 3 Sep 1999 18:57:16 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Image Size in Bytes
Message-Id: <Pine.HPP.3.95a.990903185204.23956D-100000@hpplus03.cern.ch>
On Fri, 3 Sep 1999, Jimmy Humphrey wrote:
> Actually, I never really got any "real" answers.
You've received a number of useful answers in recent days, of which you
rudely rejected some, and whined bitterly about the way in which you had
been invited to apply usenet's customary style instead of trying to
impose youar own.
It would not be surprising if most of those who are capable of helping
you had already added you to their killfiles.
HAND.
------------------------------
Date: Thu, 02 Sep 1999 18:41:06 GMT
From: psw@net1plus.com (Peter Wilford)
Subject: Installing/using modules
Message-Id: <37cec357.25564447@news.net1plus.com>
I am an admitted 'newbie' at Perl, so I thought I would seek the
expertise of this group. I have examined the FAQ's to see if
my methodology was wrong (obviously it is) but I can't identify the
cause. I then used PPM to install 'libwin32', 'Win32-NetResource' and
'libnet', all installed perfedtly, but problem still exists when
using the modules... I am running on Win'98 (not by choice), and use
the following 'snippet' in my Perl script:
#=====================
use Win32;
use Win32::NetResource;
Win32::NetResource::NetShareGetInfo( "share_a", \%SHARE, "Test" );
#=====================
When executed this way, the following error comes up in my debug
window:
Can't load 'C:/Perl/site/lib/auto/Win32/NetResource/NetResource.dll'
for module Win32::NetResource: load_file:A device attached to the
system is not functioning at C:/Perl/lib/DynaLoader.pm at line 169.
If I 'pound out' the "use Win32::NetResource;" line, and debug the
script, it states that I have an 'Undefined Subroutine'...
Can anyone give me some direction as to where to look for this
problem?... Am I coding it correctly? Is it because I am on Win'98
(Not a true Win32 platform), that I am having this problem... Please
help...
Thank you,
Peter Wilford
------------------------------
Date: 3 Sep 1999 12:04:13 -0700
From: Diane Shaffer <dshaffer@cobra.diac.com>
Subject: localizing on single source for asian langs
Message-Id: <37d00d9d.0@news.bewellnet.com>
Keywords: localization l10n asian
Does anyone know whether or not you can localize on an single
source code for asian languages?
After reading some document off Perl.com I got the impression that
you could only localize for single byte chars.
Thank you very much,
Diane
dxshaffer@yahoo.com
ps: Anyone have any words of wisdom regarding localizing Perl
for single code base?
------------------------------
Date: Fri, 3 Sep 1999 14:08:06 -0400
From: "clavikal" <clavikal@voicenet.com>
Subject: mod_perl installation Q
Message-Id: <m2Uz3.515$uq.12634@news2.voicenet.com>
should the apache daemon be running when installing mod_perl?
thanks!
------------------------------
Date: Fri, 3 Sep 1999 09:50:48 -0500
From: "David McKay" <davidmck@earthlink.net>
Subject: Net::Telnet or .....?? Newbie grovels for help.
Message-Id: <7qou78$3hb$1@ash.prod.itd.earthlink.net>
Apologies for being illiterate here.
Challenge: To enable users ability to remote start HSPICE simulation jobs,
monitor/kill them, and view results without the HSPICE binary uploading to
the client.
Clues:
1.) 100% NT4
2.) LAN via hub
3.) HSPICE server (NT Server OS)
I have gone through a ton of documentation, and still can't seem to 'get
it'. I don't have a handle on what is the best way to implement this; use
Net::Telnet? Win32::Admin(stuff and things)? Have some experience with
UNIX, but this Windows stuff.... what a major headache!!
Help anyone?
David
------------------------------
Date: 3 Sep 1999 17:20:01 GMT
From: Dan Nguyen <nguyend7@msu.edu>
Subject: Re: Newbie Q: Page redirection based on URL
Message-Id: <7qp001$dma$2@msunews.cl.msu.edu>
Dobelle/Avery Laboratories <dobelle@ix.netcom.com> wrote:
: First off, let me say right off the bat that I know >>nothing<< about perl.
: From postings to other newsgroups, perl appears to be the way to accomplish
: what I need to, so here I am groveling for some direction.
Well this question has nothing to do with perl.
: I have one domain, www.abc.com , hosted by an outside company.
: I have a second domain name, www.xyz.com, pointed to the same IP address as
: the first domain.
Just wondering. Have you read any of the Apache docs?
: What I need to do is write the index.html file so that it routes the viewer
: to a particular page. IE,
No you don't. Also remember you right index.html pages cuz the web
server is configured that way. Not cuz that's is the all powerful "standard."
: The server is running Apache (don't know what version) and supports
: SSI.
Anyways. Read the apache docs on "virtual hosting"
--
Dan Nguyen | It is with true love as it is with ghosts;
nguyend7@msu.edu | everyone talks of it, but few have seen it.
dnn@debian.org | -Maxime De La Rochefoucauld
25 2F 99 19 6C C9 19 D6 1B 9F F1 E0 E9 10 4C 16
------------------------------
Date: Fri, 03 Sep 1999 10:14:47 -0600
From: Corey Edwards <edogawa_konan@yahoo.com>
Subject: Re: null character kills CGI script on NT
Message-Id: <37CFF3F7.3237FCE0@yahoo.com>
Larry Rosler wrote:
> > On Thu, 02 Sep 1999, Corey Edwards paranoid_of_spam wrote:
> > >I have written a CGI script which opens a file, often times an image,
> > >and prints that data out to the browser.
> ...
> > This could be more simply written
> >
> > open (FILE, "sample.gif");
> > binmode FILE; # needed for DOS/Win binary, ignored if not needed
> > print <FILE>;
>
> That would better be written as
>
> print while <FILE>;
>
> to avoid having the file all in memory at once for no reason. However,
> it makes little sense to read a binary fle by 'lines', when there aren't
> any.
>
> print while read FILE, $_, 8192; # or whatever size suits you
>
I've tried numerous ways to open and read from the file, including all of
the above and sysread(), but that's not the problem. The file opens, I print
out the headers and the browser sure thinks it's getting an image, but not
so. Then I printed out the Content-type as text/plain and printed the data
to the screen. Should get a page full of unintelligible characters, but it
dies after a few characters. I opened the GIF in a hex editor and saw that
it died right after the null character. So I tried this:
while (read FILE, $_, 1) {
push @data;
}
print @data[0..6,8,10,14-150,154..1000]; #skip over nulls
The missing numbers in the array are the positions of the nulls I got from
the hex editor. Doing that, I can print all the data onto the screen, minus
the nulls of course. That and the fact that a print statement after the loop
won't be performed when printing the nulls leads me to believe that the
script dies if it tries to print a null. Confused yet? Me too. It seems like
printing null to STDOUT from NT must mean "kill my script" or "I'm all done"
or something.
Corey Edwards
edogawa_konan@yahoo.com
------------------------------
Date: Fri, 3 Sep 1999 10:15:06 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: null character kills CGI script on NT
Message-Id: <MPG.1239a1f546822bed989f16@nntp.hpl.hp.com>
In article <37CFF3F7.3237FCE0@yahoo.com> on Fri, 03 Sep 1999 10:14:47 -
0600, Corey Edwards <edogawa_konan@yahoo.com> says...
...
> The missing numbers in the array are the positions of the nulls I got from
> the hex editor. Doing that, I can print all the data onto the screen, minus
> the nulls of course. That and the fact that a print statement after the loop
> won't be performed when printing the nulls leads me to believe that the
> script dies if it tries to print a null. Confused yet? Me too. It seems like
> printing null to STDOUT from NT must mean "kill my script" or "I'm all done"
> or something.
Or nothing. I print binary files (images) from NT to a server to a
browser all the time. They are full of null bytes, like any others.
Did you remember to binmode STDOUT also, before writing anything
(including the content headers)?
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 03 Sep 1999 15:59:53 -0400
From: Steven Cruz <steve@nextopia.com>
Subject: Perl and Threads
Message-Id: <37D028B9.81AC5599@nextopia.com>
This is a multi-part message in MIME format.
--------------7B55864FC459D78C38083F12
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello;
I am have a problem when I use the threads with perl. I will get a
zombie thread once every 500 times or so. :( I was wonder what I should
be doing to fix this problem. Any suggests?
Thank you
Steven Cruz
8-)
--------------7B55864FC459D78C38083F12
Content-Type: text/x-vcard; charset=us-ascii;
name="steve.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Steven Cruz
Content-Disposition: attachment;
filename="steve.vcf"
begin:vcard
n:cruz';'steven
tel;home:416-516-4652 (work 2)
tel;work:416-364-9557-107
x-mozilla-html:TRUE
org:Nextopia Software
version:2.1
email;internet:steve@nextopia.com
title:Depends on what day
note:8-)
adr;quoted-printable:;;Current=0D=0Anextopia software corporation=0D=0A142 adelaide street east, 3rd floor=0D=0Atoronto, ontario=0D=0Am5c 1k9=0D=0A=0D=0ALong Term-=0D=0A116 lansdowne Ave Unit 3=0D=0AToronto ONT=0D=0AM6K 2C9=0D=0A;Toronto;Ontario;M6K 2C9;Canada
x-mozilla-cpt:;96
fn:'steven cruz'
end:vcard
--------------7B55864FC459D78C38083F12--
------------------------------
Date: Fri, 03 Sep 1999 16:08:41 GMT
From: nielsenjf@my-deja.com
Subject: perl or python w/MTS?
Message-Id: <7qorpv$jpq$1@nnrp1.deja.com>
In cases where I don't want to write C++ and would rather not use VB to
createa component that lives in MTS, perl or python would be a great
alternative if they work out well.
It looks like each can create COM components, but I don't see a lot of
stuff regarding their use with MTS.
How well do each function with it? For example, what type of apartments
can they live in? It is all only IDispatch based?
Any good examples of typical components written in perl or python for
MTS?
Thanks for any input,
john
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 03 Sep 1999 09:34:00 -0700
From: Scott Henry <scotth@sgi.com>
Subject: Re: perl/irix: make test fails ipc_sysv
Message-Id: <yd8lnaouf7r.fsf@hoshi.engr.sgi.com>
>>>>> "M" == Michiel Kreutzer <mkreutzer@my-deja.com> writes:
M> I have tried to compile perl 5.00503 on a Indigo2 running Irix 6.5.4m. I
M> use the gcc 2.95 compiler. I ran 'sh Configure -Dcc=gcc', left the
M> default at most of the questions, but enabled threading. than I did a
M> 'gmake', which compiled with the following warnings:
...
M> On dejanews, I find quite some references to this problem (ipc_sysv
M> under irix), but no fix. I know I can get a precompiled version from
M> reality.sgi.com, but compiling my own (gcc, not MIPSPro cc) is better if
M> I want to compile modules later on, I understand.
M> Will I get into severe problems installing now, ipc_sysv being broken?
M> (Actually, I don't really know if pipes etc. will work. IPC/SYSV is just
M> _one_ way for interprocess communication, isn't it?) If I say away from
M> open2() and open3(), will it be OK?
I haven't checked in detail, but I'm pretty sure that the sysv-ipc
stuff is not used anywhere within perl. It doesn't affect
open2/open3, etc. You should be able to install it OK
--
Scott Henry <scotth@sgi.com> / Help! My disclaimer is missing!
IRIX MTS, / GIGO *really* means: Garbage in, Gospel Out
Silicon Graphics, Inc / http://reality.sgi.com/scotth/
------------------------------
Date: 03 Sep 1999 09:53:31 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: perl/irix: make test fails ipc_sysv
Message-Id: <ylso4wueb8.fsf@windlord.stanford.edu>
In comp.lang.perl.misc, Michiel Kreutzer <mkreutzer@my-deja.com> writes:
> I have tried to compile perl 5.00503 on a Indigo2 running Irix 6.5.4m. I
> use the gcc 2.95 compiler. I ran 'sh Configure -Dcc=gcc', left the
> default at most of the questions, but enabled threading. than I did a
> 'gmake', which compiled with the following warnings:
Be careful of using gcc on IRIX; there's a bug in gcc that causes it to
compile functions passing small structs on the stack differently than the
IRIX native compiler, causing problems when calling such functions
(including inet_ntoa()) in libc.
I recommend using the native compiler on IRIX.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Fri, 03 Sep 1999 18:00:46 GMT
From: tracymastromatteo@my-deja.com
Subject: Perl/Web Developer
Message-Id: <7qp2c5$ovh$1@nnrp1.deja.com>
Looking for a perl/web developer with atleast 3
years experience for our client within the
Greater Boston area.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 03 Sep 1999 17:09:54 GMT
From: Luna <josie@thej-files.com>
Subject: Save form info to file & call up again?
Message-Id: <7qovcn$mlc$1@nnrp1.deja.com>
I'm trying to figure out how to do this and it's driving me nuts (I'm
not the world's most experienced scripter here) ...
What I want to do is take a normal cgi/perl form mailer script (input
boxes for sender's e-mail, recipient's e-mail, subject, and body) and
save the contents of the body box to a file. Once it's saved, I want
it to automatically populate the body box with that saved info the next
time someone goes to use the form.
Is this possible? Please help. :)
>^Luna^<
http://www.thej-files.com
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 3 Sep 1999 10:57:08 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Save form info to file & call up again?
Message-Id: <MPG.1239abd0cad90369989700@nntp1.ba.best.com>
Luna (josie@thej-files.com) seems to say...
> What I want to do is take a normal cgi/perl form mailer script (input
> boxes for sender's e-mail, recipient's e-mail, subject, and body) and
> save the contents of the body box to a file. Once it's saved, I want
> it to automatically populate the body box with that saved info the next
> time someone goes to use the form.
CGI.pm will do this for you.
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: Fri, 3 Sep 1999 13:40:09 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: SEARCH and REPLACE
Message-Id: <x3ybtbjx5ae.fsf@tigre.matrox.com>
Michael de Beer <madebeer@igc.apc.org> writes:
> strip out the quotes /"'//g;
This doesn't strip anything, and actually will not even compile.
Perhaps you meant:
s/"'//g;
But this will strip the *combination* of a double quote followed by a
single quote. If that is what you meant, then fine. But if you want to
strip all quotes irrespective of their location, you could use:
tr/"'//d;
--Ala
PS. It is useful to quote the relevant sections of the post you are
replying to. I have no way (except by tedious search through Deja or
some such) of knowing the context of your answer.
------------------------------
Date: Fri, 3 Sep 1999 09:27:10 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Simulating Carriage Returns
Message-Id: <MPG.123996bef7a1c480989f15@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <7qn7ag$kmm$1@charm.magnus.acs.ohio-state.edu> on 3 Sep 1999
01:12:48 GMT, Ilya Zakharevich <ilya@math.ohio-state.edu> says...
> [A complimentary Cc of this posting was sent to Alan Curry
> <pacman@defiant.cqc.com>],
> who wrote in article <ahCz3.559$MP6.29772@typ11.nn.bcandid.com>:
>
> > >OSes and have 32-bit time_t. It is unsigned, but 32-bit. Of course,
> > >being based on gcc, EMX *could* make it long long.... Go figure...
> >
> > Not if they cared about C89 conformance.
>
> Well, if C89 mandates 32-bitness of time_t, thus y2038 bug (such
> stupidity I would not expect even from a standard committee), IMO: the
> hell with C89.
I assume C89 means the ANSI/ISO C Standard.
About time_t, the Standard says simply that it must be an arithmetic
type 'capable of representing times'.
The accompanying Rationale states 'arithmetic because values of these
types must, in accordance with existing practice, on occasion be
compared with -1 (a "don't know" indication) suitably cast. No
arithmetic properties of these types are defined by the Standard,
however, in order to allow implementations the maximum flexibility in
choosing ranges, precisions, and representations most appropriate to
their intended application. The representation need not be a count of
some basic unit; an implementation might conceivably represent different
components of a temporal value as subfields of an integral type.'
So I think all this FUD about 32-bit time_t is totally wrong-headed and
should be stopped. Sometimes, in some areas, somehow, people other than
Perl people do the Right Thing.
Your statement that 'such stupidity I would not expect even from a
standard committee' is grossly insulting, and totally inappropriate
unless you have personal experience serving on such a committee, which
didn't rise to your technical expectations. Which committee might that
be, and how did you deal with the problem?
PS: In case my personal hurt isn't obvious, let me spell it out: I was
the first Technical Editor and Chairman of the Language Subcommittee of
the ANSI X3J11 (C Standards) Committee. Never in my professional career
have I had the opportunity of working with a smarter, more level-headed,
and more well-intentioned group of experts, who were trying to cope with
pressures of existing implementations and competing economic
motivations. No one who has not participated should dare to sling mud
the way you have.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 3 Sep 1999 12:11:33 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Where a subroutine gets called from?
Message-Id: <x3yd7w0vuto.fsf@tigre.matrox.com>
moseley@best.com (Bill Moseley) writes:
> Ala Qumsieh (aqumsieh@matrox.com) seems to say...
> >
> > moseley@best.com (Bill Moseley) writes:
> >
> > > Denis Kotseba (kdl@softhome.net) seems to say...
> > > > How can I find out which subrotine (a or b) called c without passing an
> > > > extra parameter?
> > >
> > > try perldoc -f caller and see if that returns what you want.
> >
> > No. That will not work.
>
> Oh, really? I thought they were talking about this:
Yeah. It's my mistake. As I told LarrryR in private email, I have used
caller() before, but never with an argument. So I got a bit mixed
up. Apologies.
--Ala
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. Due to their sizes, neither the Meta-FAQ nor
the FAQ are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq" from
almanac@ruby.oce.orst.edu.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 712
*************************************