[16209] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3621 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 11 14:05:48 2000

Date: Tue, 11 Jul 2000 11:05:22 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <963338721-v9-i3621@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 11 Jul 2000     Volume: 9 Number: 3621

Today's topics:
        "Text file busy" error message laurie@swanharbor.com
    Re: "Text file busy" error message <care227@attglobal.net>
    Re: -w and Use of uninitialized value at (M.J.T. Guy)
    Re: -w and Use of uninitialized value at (M.J.T. Guy)
    Re: -w and Use of uninitialized value at <mike.solomon@eps.ltd.uk>
    Re: -w and Use of uninitialized value at <mike.solomon@eps.ltd.uk>
    Re: -w and Use of uninitialized value at (Abigail)
        Anyone heard anything about "Aestiva HTML/OS" <nospam@nospam.com>
    Re: Beyond perl? Need advice... dejajason@my-deja.com
        BTW... laurieswaine@my-deja.com
    Re: BTW... <care227@attglobal.net>
    Re: BTW... nobull@mail.com
    Re: BTW... <care227@attglobal.net>
        Buffering read using open2 shieldwolf73@my-deja.com
    Re: Comparing fields of two files <nospam@nospam.com>
    Re: Comparing two strings (golf, anyone?) (Randal L. Schwartz)
    Re: Comparing two strings (golf, anyone?) (Randal L. Schwartz)
    Re: Comparing two strings (golf, anyone?) (Matthew Zimmerman)
    Re: Cookie & redirect <flavell@mail.cern.ch>
    Re: Error "Out of Memory!" has me stumped newsposter@cthulhu.demon.nl
        Error Compiling 5.6.0 on Solaris 2.6 & 7 <Jeffrey.L.Williams@wcom.com>
    Re: Faster way to do it... adrian2001@my-deja.com
        Guidance appreciated on building Perl 5.6.0 64 bit on I <tangb@pt.cyanamid.com>
        HELP: Bizarre BEGIN block problem <ed@nospam.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 11 Jul 2000 15:11:43 GMT
From: laurie@swanharbor.com
Subject: "Text file busy" error message
Message-Id: <8kfdet$md9$1@nnrp1.deja.com>

I'm configuring a guestbook CGI -- on running the script, I receive the
following error message: "Text file busy".  I get the same error when I
go in on Telnet and type the file name, however when I type perl before
the file name everything seems to be fine.  I understand from the error
screen I get when running the script from the browser that the problem
is likely in the #! line -- however, I've checked it, and it reads
exactly what was provided to me as the path to perl when I had this
site account set up.  Help!  Does anyone have an idea what the problem
may be?  I can't find a mention of this particular error message
anywhere I've looked, and  I'm a bit frustrated right now.  I'd
appreciate any help anyone can give me (and please use simple
explanations if possible -- I'm a newbie to all of this, but determined
to figure it out!!!) TIA

Laurie


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Tue, 11 Jul 2000 11:50:16 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: "Text file busy" error message
Message-Id: <396B4238.5153B90F@attglobal.net>

laurie@swanharbor.com wrote:
> 
> I'm configuring a guestbook CGI -- on running the script, I receive the
> following error message: "Text file busy". 

The error that you are seeing is (in my experinence) caused by 
bad inode information.  Delete the file and re-upload it.  
Problem should be resolved.


------------------------------

Date: 11 Jul 2000 15:23:17 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: -w and Use of uninitialized value at
Message-Id: <8kfe55$jqe$1@pegasus.csx.cam.ac.uk>

Stephen Kloder  <stephen.kloder@gtri.gatech.edu> wrote:
>
>Try:
>my $NAME = $ARGV[0]?$ARGV[0]:'';
>
>Or even (save a few keystrokes):
>my $NAME = @ARGV?$ARGV[0]:'';

That changes the semantics in an obscure way   -  what if $ARGV[0] eq '0' ?

But you can get the original semantics and save even more strokes

  my $NAME = $ARGV[0] || '';

or as I would prefer

  my $NAME = shift || '';


Mike Guy


------------------------------

Date: 11 Jul 2000 15:27:16 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: -w and Use of uninitialized value at
Message-Id: <8kfeck$k5o$1@pegasus.csx.cam.ac.uk>

Ulrich Ackermann  <uackermann@orga.com> wrote:
>> >
>> > my $NAME;
>> > $ARGV[0] ? $NAME = $ARGV[0] : $NAME = "";
>> >
>> > should work.
>> >
>I'm sorry. What definitly is working is:
>
>my $NAME;
>if (defined $ARGV[0]) {
>    $NAME = $ARGV[0];
>}
>else {
>    $NAME = "";
>}
>
>But please don't ask me why the ?: operator isn't doing what I thought
>he should do ... ;-)

Read up about operator precedence at the front of perlop.    You should
write that

    $ARGV[0] ? ($NAME = $ARGV[0]) : ($NAME = "");

or better as

    $NAME = $ARGV[0] ? $ARGV[0] : "";

And other improvements are elsewhere in this thread.


Mike Guy


------------------------------

Date: Tue, 11 Jul 2000 16:44:03 +0100
From: "mike solomon" <mike.solomon@eps.ltd.uk>
Subject: Re: -w and Use of uninitialized value at
Message-Id: <8kffdp$2ehro$1@ID-36965.news.cis.dfn.de>

thanks for this

I tried

my $NAME = $ARGV[0] || '';

and

my $NAME = shift || '';

but both unfortunately it still leaves me with the message if no argument is
supplied

the reason I use capitals is that I am not a programmer and learnt perl my
converting old awk scripts using a2p

I always used capitals as I found it more readable



Ala Qumsieh <aqumsieh@hyperchip.com> wrote in message
news:7awvisk9s9.fsf@merlin.hyperchip.com...
>
> "mike solomon" <mike.solomon@eps.ltd.uk> writes:
>
> > Since looking at this newsgroup I have decided to start experimenting
with
> > using the -w flag in my scripts
>
> Good. The next step for you would be to start using the strict
> pragma. Read more on it 'perldoc strict'.
>
> > the following script is called from the Unix command line and gives
> > information about a user or several users
> >
> > it can either be called as : name userid or just as name then it
requests a
> > user id
> >
> > if I run it without an argument I get :
> >
> > Use of uninitialized value at /usr/local/sscript/name line 10.
> >
> > the question i have is how can i stop this message
>
> let's see.
>
> > and is there any reason i shoulnt use unintialised values
>
> Not if you know exactly what you're doing.
>
> > i have looked at the faq and found no help there
> >
> > anyway the script is :
> >
> > #! /usr/local/bin/perl -w
> > #name
> > #Mon Jun 26 13:01:01 BST 2000 itdmjs
> > #show user name
> >
> > use strict;
> >
> > my $NAME =  $ARGV[0];
>
> If you supply no arguments in the command line, @ARGV will be empty. So
> $ARGV[0] will be undefined. Why not set $NAME to the empty string if
> @ARGV is empty?
>
> my $NAME = $ARGV[0] || '';
>
> or, equivalently,
>
> my $NAME = shift || '';
>
> > while ( ${NAME} eq "" ) {
> >
> >     print "\nENTER NAME TO FIND : \n";
> >
> >     $NAME = <STDIN>;
> >     chomp($NAME);
>
> You can do the above two steps in one:
>
> chomp($NAME = <>);
>
> > }
> >
> > #set name to lowercase
> > $NAME = lc($NAME);
> >
> > #open password file for reading
> > open(PASSWD,'/etc/passwd');
>
> check for your opens:
>
> open PASSWD, '/etc/passwd' or
> die "Can't open /etc/passwd: $!\n";
>
> > while(<PASSWD>) {
> >
> >     my ( $USERID, $UNAME  ) = (split(/:/))[0, 4];
> >
> >     $_ = lc($_);
> >
> >     if ( $_ =~ /$NAME/ ) {
> >         print "$USERID   $UNAME\n";
> >         }
> > }
> > __END__
>
> Why do you capitalize your variable names? By convention, all capital
> variables refer to constants.
>
> HTH,
> --Ala




------------------------------

Date: Tue, 11 Jul 2000 16:47:07 +0100
From: "mike solomon" <mike.solomon@eps.ltd.uk>
Subject: Re: -w and Use of uninitialized value at
Message-Id: <8kffjh$2e0pl$1@ID-36965.news.cis.dfn.de>

I agree it should work but it doesn't

Ulrich Ackermann <uackermann@orga.com> wrote in message
news:396B2BD1.8AFD7545@orga.com...
> mike solomon wrote:
> >
> > my $NAME =  $ARGV[0];
> >
>
> my $NAME;
> $ARGV[0] ? $NAME = $ARGV[0] : $NAME = "";
>
> should work.
>
> Ulrich
> --
> Ulrich Ackermann
> ORGA Kartensysteme GmbH (SY-PEAT-STA)
> Tel.:+49.5254.991-925
> mailto:uackermann@orga.com
>




------------------------------

Date: 11 Jul 2000 14:01:40 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: -w and Use of uninitialized value at
Message-Id: <slrn8mmp9i.am3.abigail@alexandra.delanet.com>

Stephen Kloder (stephen.kloder@gtri.gatech.edu) wrote on MMDVI September
MCMXCIII in <URL:news:396B31FA.5A519502@gtri.gatech.edu>:
-: 
-: Try:
-: my $NAME = $ARGV[0]?$ARGV[0]:'';

Absurd.

my $NAME = $ARGV[0]||"";

-: Or even (save a few keystrokes):
-: my $NAME = @ARGV?$ARGV[0]:'';

But that means something different. The difference is when $ARGV[0] == 0.


Abigail
-- 
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
             "\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
             "\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'


------------------------------

Date: 11 Jul 2000 16:08:52 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Anyone heard anything about "Aestiva HTML/OS"
Message-Id: <8kfgqk$tpv$0@216.155.32.201>

Apparently they are making claims like : 

> The product eliminates the need for systems
> integration tools like Perl, Cold Fusion and ASP.

which at face value I highly doubt. :-j

(I've been away for a few weeks so if this has already been discussed to 
death, let me know)

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


------------------------------

Date: Tue, 11 Jul 2000 17:23:23 GMT
From: dejajason@my-deja.com
Subject: Re: Beyond perl? Need advice...
Message-Id: <8kfl5l$skp$1@nnrp1.deja.com>

In article <8k9ct8$8di$1@barcode.tesco.net>,
  "B Kemp" <hyagillot@tesco.net> wrote:
> <SNIP>
> >"You've coded & tested in Perl?  Good, you have a working prototype.
> >Now write the real system."
> >There may be a need to speed up and scale up my code.
> <SNIP>
>
> There MAY BE a need?
> Do business managers work out how many months it might take to get a
few
> milliseconds off the time it takes to run?
>
> Fast development time is what you need when the business managers keep
on
> changing their minds.
>

Milliseconds?!  I just finished converting a program from perl to C and
it turned an 18 minutes run-time into 36 seconds.  I generally see perl
as a bad idea inside your main application loop.  It increases the cost
of your hardware, and often increases your licensing costs along with
it. (At least with Oracle).  When you start getting to large programs,
you also end up hitting problems due to the lack of code correctness
tools in the language. (like type checking).  It's real easy to make a
typo that causes no compile errors but adds hard to find bugs.

It does come in real handy for writing helper scripts for administrators
and developers.


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Tue, 11 Jul 2000 15:19:21 GMT
From: laurieswaine@my-deja.com
Subject: BTW...
Message-Id: <8kfdt3$mqc$1@nnrp1.deja.com>

I've read through some other messages here where the posters were told
this was the wrong forum and they should not be posting here.  If I'm
posting this question in the wrong forum, it's only because I haven't
learned enough about all of this yet to know -- if that turns out to be
the case, I'll apologize in advance and respectfully withdraw my
question. :)  However, I would appreciate it if you could point me to a
more appropriate forum.  Again, thanks!


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Tue, 11 Jul 2000 11:52:08 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: BTW...
Message-Id: <396B42A8.7A118DD2@attglobal.net>

laurieswaine@my-deja.com wrote:
> 
> I've read through some other messages here where the posters were told
> this was the wrong forum and they should not be posting here. 

This is a UNIX problem.  comp.unix.misc might be a good place for 
future problems of this type.


------------------------------

Date: 11 Jul 2000 18:12:23 +0100
From: nobull@mail.com
Subject: Re: BTW...
Message-Id: <u9vgyc616w.fsf@wcl-l.bham.ac.uk>

laurieswaine@my-deja.com writes:

> I've read through some other messages here where the posters were told
> this was the wrong forum and they should not be posting here.  If I'm
> posting this question in the wrong forum, it's only because I haven't
> learned enough about all of this yet to know -- if that turns out to be
> the case, I'll apologize in advance and respectfully withdraw my
> question. :)  However, I would appreciate it if you could point me to a
> more appropriate forum.  Again, thanks!

Working out what is on-topic is usually very easy.

To work out is something is in topic in this newsgroup ask youself the
following questions:

  Is Perl involved in my problem at all. (Y)

  Could Perl be replaced with something else without changing
  the likely answer to the question. (N)

  Is the answer in the obvious place in the manual. (N)

  Is the answer in the FAQ. (N)

  Can I find the answer with a deja search. (N).

  If someone at a later date with the same question did a deja search
  and saw my subject line would they be able to recognise that they
  had the same question. (Y)

If you get the right answers to all these questions then you should
post here.

Otherwise you probably shouldn't post here.

BTW: I can't see your post on my news server so I can't comment on if
it is on topic, and if it is not on-topic here, where it might be.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


------------------------------

Date: Tue, 11 Jul 2000 13:54:02 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: BTW...
Message-Id: <396B5F3A.3E923D97@attglobal.net>

nobull@mail.com wrote:
> 
> If you get the right answers to all these questions then you should
> post here.
> 

Actually, a Deja search on "text file busy" turned up quite a number 
of hits.


------------------------------

Date: Tue, 11 Jul 2000 17:07:37 GMT
From: shieldwolf73@my-deja.com
Subject: Buffering read using open2
Message-Id: <8kfk8p$87c$1@nnrp2.deja.com>

I have a program that is wrapping the unix "cu"
command for serial operations.  The problem I
have is that I want to flush out all the output
of "cu" up until I want to read (e.g. I don't
care what has been coming out for half an hour).
How can I flush out the buffer so that I can
start reading fresh? Note: READER->autoflush(1);
and Reader->flush(); both don't seem to do what I
want :(

Here is a sample of my code:

sub lookforresponse{
	READER->flush();
	my($result);
	eval {
	        local $SIG{ALRM} = sub {
die "alarm\n" }; # NB: \n required
	        alarm $timeout;
	        #$result ="";
        	for ($i=0;$i<90;$i++){
	        	sysread (READER, $buf,
1);
	        	$result .= $buf;


        	}
        	print $result . "\n";
	        alarm 0;
    	};
	if ($@) {
		print "TIMED OUT.\n" ;
		die unless $@ eq "alarm\n";   #
propagate unexpected errors

	}
	else {
        	# didn't
        	return $result;
	}


}


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: 11 Jul 2000 16:58:10 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: Comparing fields of two files
Message-Id: <8kfjn2$tpv$1@216.155.32.201>

In article <slrn8mfs49.t4j.abigail@alexandra.delanet.com>, 
abigail@delanet.com wrote:

 | Could you describe *how* exactly this is supposed to work? In your 
 | examples, fileA contains '703#612#KY#' and fileB contains '7036123456'.
 | The output file has '7036123456  MA'.
 | 
 | Where is the MA coming from, and what happened to KY?
 | 
 | Please, people, if you have a problem and want a solution, give a proper
 | specification of the problem and certainly do define a problem with
 | vague or unclear examples. Often, people try to describe problems with
 | examples that don't even match the problem.
 | 
 | 
 | Your problem might be a variant of what's answered in the FAQ. However,
 | the problem is poorly phrased so who can tell?

On the contrary, I thought it was quite simple to understand that File A 
was a list of *state (as in one of the 50 States) codes* and their 
associated area codes, and File B was a list of Telephone numbers, that 
the user wanted combined to show the telephone number AND its associated 
state code in File C. 

*shakes Abigail awake*

*hands Abigail a double-expresso, and sets up a caffeine IV drip*

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


------------------------------

Date: 11 Jul 2000 08:06:21 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Comparing two strings (golf, anyone?)
Message-Id: <m1lmz8wvte.fsf@halfdome.holdit.com>

>>>>> "Bart" == Bart Lateur <bart.lateur@skynet.be> writes:

Bart> Yours calculates the length of a common prefix; what he wants is the
Bart> count of equal characters at a position, no matter what precedes it.

Ahh... I didn't read his code, just his textual description where
that wasn't clear. :)

So much for working from a spec.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


------------------------------

Date: 11 Jul 2000 08:07:36 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Comparing two strings (golf, anyone?)
Message-Id: <m1em50wvrb.fsf@halfdome.holdit.com>

>>>>> "Damian" == Damian Conway <damian@cs.monash.edu.au> writes:

Damian> "Lauren Smith" <lauren_smith13@hotmail.com> writes:
>> But can it be done *in constant time*?  Ho ho.  :-)

Damian> Yep:

Damian> 	sub compare {
Damian> 		my $len = any(0..length $_[0]);
Damian> 		my $common = substr($_[0],0,$len) eq substr($_[1],0,$len);
Damian> 		return any(eigenstates length $common) >= all(eigenstates length $common);
Damian> 	}

Assuming that you don't actually *look* at the answer, *or* you have
parallel-enough universes. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


------------------------------

Date: 11 Jul 2000 16:11:31 GMT
From: mdz4c@node7.unix.Virginia.EDU (Matthew Zimmerman)
Subject: Re: Comparing two strings (golf, anyone?)
Message-Id: <8kfgvj$4hb$1@murdoch.acc.Virginia.EDU>

The results to date:

# OP
sub compare{@b=$_[1]=~/(.)/g;for($_[0]=~/(.)/g){$c++ if $_ eq $b[$i++]};$c}
# Bob 1   *
sub compare{@a=map{split//}@_;$a=grep{$a[$_]eq$a[$_+@a/2]}(0..$#a)}
# Bob 2   *  **
sub compare{@a=map{split//}@_;grep{$a[$_]eq$a[$_+@a/2]}(0..$#a)}
# Keith 1 *
sub compare{@a=map/./gs,@_;0+grep$a[$_]eq$a[$_+@a/2],0..$#a}
# Decklin 1  **
sub compare{grep/\0/,split//,$_[0]^$_[1]} 
# Decklin 2
sub compare{($a=$_[0]^$_[1])=~tr/\0//}
# Keith 2   
sub compare{($a=$_[0]^$_[1])=~y/\0//}
# Keith 3
sub compare{$_=$_[0]^$_[1];y/\0//}
# uri 1 
sub compare{$_=pop^pop;y/\0//}
# uri 2  +
sub compare{(pop^pop)=~y/\0//} 

 * assumes $_[0] amd $_[1] are of equal length
** assumes compare() is called in scalar context
 + 'can't modify bitwise xor' error

Very impressive!
Matt

-- 
-- 
|Matthew Zimmerman            http://www.people.virginia.edu/~mdz4c  |
|Interdisciplinary Biophysics Program |"I AM serious.                |
|University of Virginia               | And stop calling me Shirley."|


------------------------------

Date: Tue, 11 Jul 2000 17:07:34 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Cookie & redirect
Message-Id: <Pine.GHP.4.21.0007111623040.15622-100000@hpplus03.cern.ch>

On Tue, 11 Jul 2000, Drew Simonis wrote:

> Chello wrote:
> > 
> > $cookie=$q->cookie(-name=>'mysite.com',-value=>$cook_value,-expires=>'+1y');
> > print $q->redirect(-cookie=>$cookie,-URL=>$url);

> You can't set a cookie when using the redirect() way of printing a 
> header. 

Oh?

This really is off-topic for c.l.p.misc, you know.  I'm responding
where I found your posting, but if any discussion is needed, then I'd
say either c.i.w.authoring.cgi or c.l.p.modules (depending on the
nature of the discussion) would be appropriate.

> I don't see it cited in the online documentation,

Indeed - the online documentation states:

| All other parameters recognized by the header() method are also
  ^^^
|  valid in redirect

> but in the 
> text documentation (The Official Guide to Programming with CGI.pm)
> it clearly states that the cookie will be ignored

Does it really?  That would be most inconvenient for cookie use, if
it were so.

>  In my experience this has held true.

But this is, after all, a pretty standard way to set a cookie and
check that the setting has been successful, before proceeding with
some scenario that is dependent on cookies.

So I set up a simple test (using Apache, of course).  It worked - as
indeed the online documentation had led me to believe it would.  The
browser alerted me to the cookie, I accepted it, and the browser
proceeded to the URL that had been the target of the redirection.

And there's explicit code in CGI.pm to do this, and has been since at
least the oldest version that I'm keeping around, 2.53.

Quite when this was originally introduced, I'm not sure, but I see no 
specific comment about it in the version history.

It's quite common for programmers to fail to achieve their intentions
when setting a cookie at the same time as redirecting.  However, the
cause is usually some violation of cookie rules other than what we're
discussing here, and irrelevant to either Perl or CGI.pm.

I'd say the original poster has, for one thing, failed to heed the
warning in the CGI.pm documentation about IIS needing -nph=>1 .
But again, this is not a fit topic for c.l.p.misc.  Upgrade to Win32
Apache!

best regards.






------------------------------

Date: 11 Jul 2000 16:15:04 GMT
From: newsposter@cthulhu.demon.nl
Subject: Re: Error "Out of Memory!" has me stumped
Message-Id: <8kfh68$lmp$2@internal-news.uu.net>

Josiah Bryan <jdb@wcoil.com> wrote:

> My server (the system giving the memory error) is a Linux-based server
> running the Cobalt OS
> in a Cobalt RaQ2 server hosted by Interliant with 3Gig HD and memory listed
> above.

Possible cause of your problem that has nothing to do with Perl.
What does the 'limit' program say? Eg, I get:

    cputime         unlimited
    filesize        unlimited
    datasize        2097148 kbytes
    stacksize       8192 kbytes
    coredumpsize    unlimited
    vmemoryuse      unlimited
    descriptors     64 

  A newsgroups discussing your OS might provide other/better help.

Erik



------------------------------

Date: Tue, 11 Jul 2000 16:55:34 GMT
From: Jeff Williams <Jeffrey.L.Williams@wcom.com>
Subject: Error Compiling 5.6.0 on Solaris 2.6 & 7
Message-Id: <396B5188.C6D433A5@wcom.com>

All,

I have been trying to compile Perl 5.6.0 on both Solaris 2.6 and Solaris
7.  Both systems give the same error message which I have provided
below.  I am using the gcc "2.95.2 19991024" compiler.  I have tried
various things to resolve this problem but just can't seem to figure it
out.

I was able to successfully compile 5.6.0 on Solaris 2.5.1 using the same
compiler.

Any help or insights to a solution to this problem are greatly
appreciated.

Jeff W.

====================================

make: Warning: Both `makefile' and `Makefile' exist
`sh  cflags libperl.so miniperlmain.o` -fPIC miniperlmain.c
          CCCMD =  gcc -DPERL_CORE -c -fno-strict-aliasing
-I/usr/local/include -I/usr/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O   
`sh  cflags libperl.so perl.o` -fPIC perl.c
          CCCMD =  gcc -DPERL_CORE -c -fno-strict-aliasing
-I/usr/local/include -I/usr/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O   
`sh  cflags libperl.so malloc.o` -fPIC malloc.c
          CCCMD =  gcc -DPERL_CORE -c -fno-strict-aliasing
-I/usr/local/include -I/usr/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O   
`sh  cflags libperl.so gv.o` -fPIC gv.c
          CCCMD =  gcc -DPERL_CORE -c -fno-strict-aliasing
-I/usr/local/include -I/usr/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O   
`sh  cflags libperl.so toke.o` -fPIC toke.c
          CCCMD =  gcc -DPERL_CORE -c -fno-strict-aliasing
-I/usr/local/include -I/usr/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O   
`sh  cflags libperl.so perly.o` -fPIC perly.c
          CCCMD =  gcc -DPERL_CORE -c -fno-strict-aliasing
-I/usr/local/include -I/usr/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O   
`sh  cflags libperl.so op.o` -fPIC op.c
          CCCMD =  gcc -DPERL_CORE -c -fno-strict-aliasing
-I/usr/local/include -I/usr/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O   
op.c:3181: macro `va_start' used with too many (2) args
*** Error code 1
make: Fatal error: Command failed for target `op.o'


------------------------------

Date: Tue, 11 Jul 2000 17:08:56 GMT
From: adrian2001@my-deja.com
Subject: Re: Faster way to do it...
Message-Id: <8kfkan$s0t$1@nnrp1.deja.com>

If you want even more performance, you should use sysread.
See p.202 of the Camel Book --

In article <8kdr69$1l2$1@brokaw.wa.com>,
  "Lauren Smith" <lauren_smith13@hotmail.com> wrote:
>
> <sept00@my-deja.com> wrote in message
news:8kdp4a$hfn$1@nnrp1.deja.com...
(..snip..)
>
> read FH, $text_scalar, -s FH;
>
> Lauren
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: 11 Jul 2000 15:01:41 GMT
From: "ARC" <tangb@pt.cyanamid.com>
Subject: Guidance appreciated on building Perl 5.6.0 64 bit on Irix 6.5...
Message-Id: <01bfeb51$5b6cd280$3036ad8d@feralloj2.pt.cyanamid.com>

Dear Perl Support Group,

	After many unsuccessful attempts to build the latest production 64-bit
Perl, I wonder if you could
make some suggestions for me to build Perl the right way. I have read
through the Install, the 
README.hints, and irix_6.sh hint files the best that I can.

	The "Configure" script seems to have run okay.	However, no matter what
options
I tried, the "make" process invariably produces the following error message
upon which the compilation 
fails: 

____________________________________________________________________________
_______
`sh  cflags libperl.a perlapi.o`  perlapi.c
          CCCMD =  cc -64 -DPERL_CORE -c -D_BSD_TYPES -D_BSD_TIME -woff
1009,111
0,1174,1184,1552 -OPT:Olimit=0:space=ON -DLANGUAGE_C -O3   
        rm -f libperl.a
        /usr/bin/ar rcu libperl.a perl.o  gv.o toke.o perly.o op.o
regcomp.o dum
p.o util.o mg.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o
pp_sys.o doo
p.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o
perlio
 .o perlapi.o 
        rm -f opmini.c
        /sbin/ln -s op.c opmini.c
        `sh  cflags libperl.a opmini.o`  -DPERL_EXTERNAL_GLOB opmini.c
          CCCMD =  cc -64 -DPERL_CORE -c -D_BSD_TYPES -D_BSD_TIME -woff
1009,111
0,1174,1184,1552 -OPT:Olimit=0:space=ON -DLANGUAGE_C -O3   
        rm -f opmini.c
         cc -64  -v -o miniperl \
            miniperlmain.o opmini.o libperl.a 
/usr/lib32/cmplrs/ld64 -call_shared -no_unresolved -transitive_link -elf
-_SYSTY
PE_SVR4 -show -mips4 -64 -L/usr/lib64/mips4/r10000 -L/usr/lib64/mips4
-L/usr/lib
64 /usr/lib64/mips4/crt1.o -o miniperl miniperlmain.o opmini.o libperl.a
-dont_w
arn_unused -Bdynamic -lc /usr/lib64/mips4/crtn.o -warn_unused 
ld64: ERROR   33 : Unresolved text symbol "pow" -- 1st referenced by
libperl.a(p
p.o).
        Use linker option -v to see when and which objects, archives and
dsos ar
e loaded.  "
____________________________________________________________________________
____________
 
	I read the IRIX MIPSpro compiler manual and IRIX man pages and determined
that the
"pow" function is a math function in the libm.so library.  That library can
be found in 
the /usr/lib64 directory, which I believe I declared during the interactive
configuration.  The libm.so library
exists in that directory on the machine.  Adding the "-lm" option to the
linker does not help either.

	I set the environmental variable SGI_ABI to 64, defined the
/etc/compiler.defaults file to 
use abi=64, isa=mips4.  I tried setting the LD_LIBRARY_PATH to null.
Nothing helped.  Did anyone have 
to experiment with these settings to get a successful build?

	The following is the output of ./myconfig script, in which I added some
remarks regarding the other options that I have tried as well.
____________________________________________________________________________
____________
maggie:/raid2/ottk/perl-5.6.0 140 >./myconfig
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=irix64, osvers=6.5, archname=IP25-irix64                        
                (# I tried osname=irix.)
    uname='irix64 maggie 6.5 07151433 ip25 '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=define use64bitall=define uselongdouble=undef
usesocks=undef
  Compiler:
    cc='cc -64', optimize='-O3', gccversion=
    cppflags='-D_BSD_TYPES -D_BSD_TIME -OPT:Olimit=0:space=ON -DLANGUAGE_C'
    ccflags ='-D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1174,1184,1552
-OPT:Olimit=0
    :space=ON -DLANGUAGE_C'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=8, ptrsize=8, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc -64', ldflags ='-v'                                             
             (# I tried using ld as the loader.)
    libpth=/usr/local/lib /usr/lib64 /lib64
    libs= 
    libc=/usr/lib64/libc.so, so=so, useshrplib=false, libperl=libperl.a 
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' '                               (# I tried
using "-shared" as a special flag to pass to)
                                               	                   (# "cc
-64" to create a dynamically loaded library.)
____________________________________________________________________________
______

	Could someone offer some suggestions?

	Your assistance is appreciated in advance.

Sysadm/BASFS(Formerly American Cyanamid)

Bill Tang



------------------------------

Date: Tue, 11 Jul 2000 17:58:17 GMT
From: "Ed Foy" <ed@nospam.com>
Subject: HELP: Bizarre BEGIN block problem
Message-Id: <ZeJa5.55766$_b3.1632917@newsread1.prod.itd.earthlink.net>

Greetings,

I am having a problem with a BEGIN block.  There must be a simple answer
but I have been unable to find it after two weeks of debugging.

First, my environment is Perl 5.004 under UNIX. I cannot compile my
scripts locally, but my ISP provides a remotely accessible compiler and
Perl debugger. What I am trying to accomplish is to redirect STDERR to
STDOUT (this part works) so that I can see runtime errors via HTTP (this
works). The problem is that I am getting a compile error that I cannot
resolve. Since everything "appears" to work this "seems" to be a
spurious problem; but, because I cannot isolate the cause of the problem
I can't be certain that the debugger notification is really harmless.
I've reduced the code to the following (verbatim) to demonstrate the
problem:

#!/usr/local/bin/perl5

require 5.004;

BEGIN {
    print "Content-type: text/html\n\n";
    open (STDERR, ">&STDOUT") or die "Cannot Redirect STDERR: $!";
}

my $Dummy = "";
exit;

The above code results in the following error message on compilation:

TEST.PL contains syntax errors.
Content-type: text/html\n\n

For some reason the "Content-type: text/html\n\n" is a problem. If I
comment out the print statement or move the print statement outside the
BEGIN block then there is no error. If I assign the string to a variable
it still fails as in:

BEGIN {
    $foo = "Content-type: text/html\n\n";
    print $foo;
    open (STDERR, ">&STDOUT") or die "Cannot Redirect STDERR: $!";
}

The one response I received to a prior post about this problem indicated
that the above code compiles fine on Perl 5.002 running on OS/2 so long
as the require statement is removed. Not much help since I am running
under Perl 5.004 under UNIX, as stated earlier,  on DEC ALPHA servers. I
need a solution that applies to my specific target environment - Perl
5.004 under UNIX.

If anyone can point to a solution to this problem it would very much be
appreciated. I have been unable to find anything in the Camel book or
perldocs or searching the web to explain this error.

Ed






------------------------------

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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 3621
**************************************


home help back first fref pref prev next nref lref last post