[12183] in Perl-Users-Digest
Perl-Users Digest, Issue: 5783 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 26 02:07:20 1999
Date: Tue, 25 May 99 23:00:20 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 25 May 1999 Volume: 8 Number: 5783
Today's topics:
Re: "cat"-ing three files into three files. (David Efflandt)
[perlfunc][perldata] access to data structures teqqus@asdf.engr.sgi.com
Re: DBM File will not open after Redhat 6.0 upgrade (I R A Aggie)
Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Pe (J. Moreno)
Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Pe (Chris Nandor)
Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Pe <uri@sysarch.com>
Re: forks & locking DBMs <rick.delaney@home.com>
Re: help please (Larry Rosler)
Re: how to know which child died? <rick.delaney@home.com>
Re: In favor of extending "my" to apply to subroutines <elliotsl@mindspring.com>
Re: Need more optimization help <rick.delaney@home.com>
Re: Need more optimization help tbsmith@deltacom.net
newbie question: multidimentional arrays <jonathan@godcan.net>
Re: newbie question: multidimentional arrays <uri@sysarch.com>
Password Abuse Detection script wanted (ace)
Re: Password Abuse Detection script wanted (Sam Holden)
Re: perl5.005_03/sunos4.1.4 *dbm.t tests fail idubraws@deja.com
Re: PERLFUNC: wantarray - get list vs array context of (Larry Rosler)
Re: Return of array <kar@webline.dk>
tool to trace #include statements in C/C++ raypereda@my-dejanews.com
Re: Using Perl over server, Help <JFedor@datacom-css.com>
Want to create a auto login script <dipak@corning.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 26 May 1999 05:09:50 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: "cat"-ing three files into three files.
Message-Id: <slrn7kn0dc.12i.efflandt@efflandt.xnet.com>
On 18 May 1999 10:47:49 -0500, Dale Henderson <dhenders@cpsgroup.com> wrote:
>
>
>I'm trying to concatenate three files into three identical output
>files.
>
>This is what I have so far:
>
> foreach $fname (@INFILES){
> open (INFILE,"+<$fname") || die "Can't open $fname: $!";
> flock(INFILE,$LOCK_EX ) || die "Can't lock $fname: $!";
> $file.=<INFILE>;
> truncate(INFILE,0);
> close (INFILE);
> }
> # A crash here will cause data loss :(
>
> foreach $fname (@OUTFILES){
> open (OUTFILE,">$fname") || die "Can't open $fname: $!";
> flock(OUTFILE,$LOCK_EX ) || die "Can't lock $fname: $!";
> print OUTFILE $file;
> close (OUTFILE);
> }
>
>
>The code above has several inperfections. For one it is prone to data
>loss. For another if the data are large, it will take up a large
>amount of memory.
>
>Any ideas on how I should improve this code?
Not sure if a 4th temporary file would save any memory or just use cache
instead:
open (TMP,">/tmp/temp.$$") || die "Can't open temp.$$: $!";
flock(TMP,$LOCK_EX ) || die "Can't lock temp.$$: $!";
foreach $fname (@INFILES){
open (INFILE,"<$fname") || die "Can't open $fname: $!";
flock(INFILE,$LOCK_EX ) || die "Can't lock $fname: $!";
print TMP <INFILE>; # copy INFILE to TMP
close INFILE;
}
close TMP;
# No data loss if you crash :)
open (TMP,"</tmp/temp.$$") || die "Can't open temp.$$: $!";
flock(TMP,$LOCK_EX ) || die "Can't lock temp.$$: $!";
foreach $fname (@OUTFILES){
open (OUTFILE,">$fname") || die "Can't open $fname: $!";
flock(OUTFILE,$LOCK_EX ) || die "Can't lock $fname: $!";
print OUTFILE <TMP>;
close OUTFILE;
seek TMP,0,0; # return file pointer to beginning.
}
close TMP;
unlink '/tmp/temp.$$'; # delete tmp file
--
David Efflandt efflandt@xnet.com
http://www.xnet.com/~efflandt/
------------------------------
Date: Tue, 25 May 1999 22:48:20 PDT
From: teqqus@asdf.engr.sgi.com
Subject: [perlfunc][perldata] access to data structures
Message-Id: <7ig1v4$fm12m@fido.engr.sgi.com>
so i'm trying to figure out how to nicely pick at an array contents:
so i have something like
$a = "a b c d e f";
and i want to access the start and end elements
so i want to be able to do something like the following:
$start,$end = (split(/ /,$a))[0][$#];
or
$start,$end = (split(/ /,$a))[0,$#];
or even if necessary
$start,$end = (split(/ /,$a))[0,5];
but i coudn't figure out a nice way to do this.
any suggestions?
thanks,
Teqqu
------------------------------
Date: 26 May 1999 04:27:12 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: DBM File will not open after Redhat 6.0 upgrade
Message-Id: <slrn7kmu6m.fjb.fl_aggie@thepentagon.com>
On Tue, 25 May 1999 18:48:44 -0700, Bruce Atherton <bruce@flair.law.ubc.ca>, in
<374B52FC.6FCC44B0@flair.law.ubc.ca> wrote:
+ If I copy the old "database.db" over to "database", the dbmopen() call
+ fails.
With what error? Perusing 'perldoc -f dbmopen', we see:
You can control which DBM library you use by loading that library
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
before you call dbmopen():
use DB_File;
dbmopen(%NS_Hist, "$ENV{HOME}/.netscape/history.db")
or die "Can't open netscape history file: $!";
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
James
------------------------------
Date: Tue, 25 May 1999 22:01:56 -0400
From: planb@newsreaders.com (J. Moreno)
Subject: Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Perl Y2K compliant?
Message-Id: <1dsdr7m.9o0mev13lyob4N@roxboro0-0060.dyn.interpath.net>
Tom Christiansen <tchrist@mox.perl.com> wrote:
> [courtesy cc of this posting mailed to cited author]
Please, no Cc's, that's what the Mail-Copies-To: nobody means.
> In comp.lang.perl.misc, planb@newsreaders.com (J. Moreno) writes:
>
> Interesting domain, that.
It's not mine but I've helped out a bit (check out the site) and the
owner let's me use it.
> :Fortunately this particular thread should die out in a little over 6
> :months. Everybody will see what localtime returns, and a different
> :thread will start up "Will the way localtime returns the year change
> :soon?".
>
> I for one can hardly wait for that blessed day: 0/1/100. :-)
It's not going to die out that quickly, it'll be at least a couple of
years before that happens.
--
John Moreno
------------------------------
Date: Wed, 26 May 1999 03:09:51 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Perl Y2K compliant?
Message-Id: <pudge-2505992309540001@192.168.0.77>
In article <7i80g6$kao$1@nnrp1.deja.com>, finsol@ts.co.nz wrote:
# I don't know why deja news decided to post twice but I must have you
# riled - you come across like a techno-crazed twit! Are you so besotted
# with Perl that you will clutch at any straw to defend it - even by
# attempting to descredit me by attacking my choice in newsgroup
# technology? Come on, Perl is just another programming language - time
# you got in touch with the real world.
The bottom line is you are ignorantly attacking the language for working
properly. Perhaps /you/ should get in touch with this "real world" you
speak of. Like that silly bit about taking "years since the year 1900" to
mean "last two digits of the year." There is no way the first can mean
the second. Not in English, anyway.
It is telling that you say "I was informed that Perl wasn't used for
anything critical anyway." I do not mean offense here, but you are
obviously unqualified to be writing articles about this issue if you don't
know what Perl is used for, and your editor/publisher should be taken to
task for letting you write for that publication.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: 25 May 1999 23:29:01 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Perl Y2K compliant?
Message-Id: <x7btf8fr0i.fsf@home.sysarch.com>
>>>>> "IZ" == Ilya Zakharevich <ilya@math.ohio-state.edu> writes:
IZ> <uri@sysarch.com>],
IZ> who wrote in article <x77lq074hi.fsf@home.sysarch.com>:
IZ> Why? I do not think I used (localtime)[5] once in my life. I'm
IZ> discussing the *language*. It has some mis-designed sides indeed.
it wasn't a misdesign, but a pass through of an existing and stable design.
IZ> We use Perl, which lifts the treashold a lot. We are not satisfied by
IZ> a Turing-completeness, thank you.
so consider localtime to be a library call (like many of the libc
derived calls) and not part of the language. as you have stated many
time there is no proper definition of Perl so localtime is not specified
but it is dependent on the underlying libc struct tm.
>> hope this clears up the api confusion for you.
IZ> Thank you, *I* have no confusion. *You* had confusions that Perl's
IZ> APIs have non faults, and I hope I cleared this for you.
i never said it had no faults. i said it was well defined in the case of
localtime and it has always been that way. so a stable api is well
defined and that is better than a dynamically moving one that keeps
fixing older and poorer api designs. i will take stable over constant
change any time.
>> api's EXIST as they are. you can always write one above it it you
>> don't like it. you just don't change the lower one from its
>> specification. that is the rule.
IZ> If the API is designed well, you do not *need* to change it or work
IZ> around it. In fact you not even *wish* to change it. ;-)
face reality, ilya. perl's api IS. it exists. it is not pining for the
fjords! it has not met its maker! (larry, perl. perl, larry. now they
have met :-)
you don't go around fixing things which work and many programs depend
upon. fixing localtime will break too many programs and fix only those
which were written by idiots who didn't rtfm.
so either write a wrapper and make it into a module that will save all
our souls or leave it alone. perl itself is y2k compliant as much as
anything it relies upon is compliant. the rest of the time the
programmer is not y2k compliant and they will crash on 1/1/100.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Wed, 26 May 1999 03:34:32 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: forks & locking DBMs
Message-Id: <374B6B76.14DD4AA8@home.com>
[posted & mailed]
Otis Gospodnetic wrote:
>
> my $rdb = tie %runData, "DB_File", $runFile, O_RDWR|O_CREAT, 0640,
> $DB_HASH || die "Cannot open file $runFile: $!\n";
>
> # ERROR comes from the line below
> # Can't call method "fd" on an undefined value at MyScript line 271.
>
> my $fr = $rdb->fd;
I'd say you're trying to call method "fd" on an undefined value, $rdb.
But, you ask, why didn't MyScript die with the message, "Cannot open
file $runFile: $!\n" then?
Precedence. Replace || with or. Or put some parentheses around the
arguments to tie.
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Tue, 25 May 1999 22:44:00 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: help please
Message-Id: <MPG.11b529e4883e7a45989afa@nntp.hpl.hp.com>
In article <qcoei7.q1l.ln@magna.metronet.com> on Tue, 25 May 1999
13:58:50 -0400, Tad McClellan <tadmc@metronet.com> says...
> bababozorg@aol.com wrote:
> : anyway i have a string, i would like to cut or remove the "s" or "es"
> : at the end of this string.
>
> $string =~ s/s$//; # so long 's'
>
> $string =~ s/es$//; # so long 'es'
Er, um, those two statements in that sequence won't do what is expected.
For example, 'foxes' will end up as 'foxe'. One could do them in the
opposite order, or as one (as Bob Trieger posted):
$string =~ s/e?s$//; # so long 's' or 'es'
> $string = 'access'; # this data might cause a "problem"...
So might 'ladies' or tons of other plurals.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 26 May 1999 03:43:56 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: how to know which child died?
Message-Id: <374B6DAA.5313A979@home.com>
[posted & mailed]
GEMINI wrote:
>
> I use fork to spawn some children processes.
> When a child died, I need to do different actions
> according to which child died. By catching the
> signal, I can be notified when any child died,
> but cannot distinguish among them (e.g., knowing the PID).
> So is there any easy way to do that?
Yep. perldoc -f wait
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Tue, 25 May 1999 22:34:41 -0400
From: Steven Elliott <elliotsl@mindspring.com>
Subject: Re: In favor of extending "my" to apply to subroutines as well as variables
Message-Id: <374B5DC1.B89D017D@mindspring.com>
Tom Christiansen wrote:
> [courtesy cc of this posting mailed to cited author]
>
> In comp.lang.perl.misc, elliotsl@mindspring.com writes:
> :Currently in perl there is no way of directly marking a
> :subroutine/method as being private to a given file/module (assuming one
> :module per file).
>
> I have good news and bad news.
>
> The good news is that the next major release of Perl (5.006, expected
> later this summer) will implement "my sub".
> The bad news is that it this is irrelevant to method calls.
> A method call finds a subroutine by the name it holds in the
> symbol table of its referent. If it's my(), it's not in the
> symbol table. If it's not in the symbol table, it's not a method.
It does not bother me that a subroutine declared as private using "my sub"
(assuming it works roughly as I described in my previous post) would not be
a true method in the sense that it would not be possible to invoke it using
the referent. That:
package SomePackage;
require 5.006;
...
my sub private_sub {
...
$obj->private_sub();
is not possible. Even if it were possible it it does not buy you anything
since the package is known. The above, if it were possible, would be the
same as
private_sub($obj);
> Tel3l me, have you read what the perltoot manpage says about "Closures as
> Objects"?
Mostly I have read about them in your "Perl Cookbook" book, which I enjoyed
quite a bit.
> Also, I perceive that you are cursed by C++/Java-braindamage.
I'll have to admit that only a few years ago (as can be seen by searching
for elliotsl@ix.netcom.com in www.deja.com) I was smitten with one of Java's
implicit selling points: It's restrictive syntax and strong type checking
would magically make all possible bugs syntax errors.
Since then I've come to appreciate how easy it is to do things in a language
like perl. I've also come to accept that bugs seem to appear at an
apparently universal per line rate regardless of the syntax
used. A programmer's only hope of beating the odds is make the program as
small as possible. To use an efficient language like perl. Needless to say
I've recently become a perl convert.
I realize that perl is somewhat philosophically opposed to enforced
privacy. Perl has great regard for the programmer in that it allows the
programmer to structure things however the programmer sees fit. However, if
the programmer wishes to restrict himself, for whatever reason, and can't
then perl, paradoxically, becomes a restrictive language from the
perspective of that programmer. In the eyes of such a programmer perl has
violated it's "make easy things easy" prime directive.
I didn't mean to imply that creating privatish methods (or whatever term can
be used to describe all the techniques discussed for limiting. the scope of
a method) are necessarily good but rather that people do create them.
Acknowledging such people's needs will only hasten perl's acceptance.
> Have you read the new perltootc manpage? It's a new tutorial that
> shows how to cast off the chains of C++ so you can use simple, native
> Perl idioms to manage class and object attributes in your Perl object
> classes by revealing OO strategies and techniques a C++ programmer would
> never imagine.
I just read it. As you point out it illustrates a few things that most C++
programers have always have wanted to do, but couldn't.
> POD
> http://language.perl.com/misc/perltootc.pod
> HTML
> http://language.perl.com/misc/perltootc.html
> POSTSCRIPT
> http://language.perl.com/misc/perltootc.ps
> MANPAGE
> http://language.perl.com/misc/perltootc.man
> ASCII TEXT
> http://language.perl.com/misc/perltootc.text
>
> Until you stop asking "How can I do this C++/Java construct in Perl"
> and instead start asking "Here's this task I need to do; now, how do I
> do it in Perl", you'll be forever disappointed. And vice-versa.
>
> --tom
> --
> "Winter is worth its wait in cold." --Larry Wall
------------------------------
Date: Wed, 26 May 1999 04:02:47 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Need more optimization help
Message-Id: <374B720E.252AF2D9@home.com>
[posted & mailed]
tbsmith@deltacom.net wrote:
>
> @info has lots of different numbers.
> get_file just returns the file $f as a list.
By that I assume you mean you are slurping an entire file into memory.
While that will occasionally be faster, it is not really the Right Way
To Do It.
[snip]
> What would make it go faster?
Read your files one line at a time. And get rid of the overhead of the
call to &get_file.
I realize you only posted a snippet of a possibly much larger program
but you may be able to do something like this:
@ARGV = @files;
while (<>){
my @info = unpack $pack, $_;
# etc.
}
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Wed, 26 May 1999 05:08:08 GMT
From: tbsmith@deltacom.net
Subject: Re: Need more optimization help
Message-Id: <7ifvjo$3oc$1@nnrp1.deja.com>
In article <374B720E.252AF2D9@home.com>,
Rick Delaney <rick.delaney@home.com> wrote:
> [posted & mailed]
>
> tbsmith@deltacom.net wrote:
> >
> > @info has lots of different numbers.
> > get_file just returns the file $f as a list.
>
> By that I assume you mean you are slurping an entire file into memory.
> While that will occasionally be faster, it is not really the Right Way
> To Do It.
Well, elsewhere in the script I read header files and footer files and
things, and it was just easier and prettier to write a slurping sub than
3 or 4 sets of open()s and close()es.
>
> [snip]
>
> > What would make it go faster?
>
> Read your files one line at a time. And get rid of the overhead of
the
> call to &get_file.
>
> I realize you only posted a snippet of a possibly much larger program
> but you may be able to do something like this:
>
> @ARGV = @files;
> while (<>){
> my @info = unpack $pack, $_;
> # etc.
> }
The reading in of the files is pretty quick, it's the part inside the
loop that takes a while with each iteration.
>
> --
> Rick Delaney
> rick.delaney@home.com
>
--
----------------
Todd Smith -japh
ITC^DeltaCom
tbsmith@deltacom.net
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Wed, 26 May 1999 00:23:37 -0400
From: jonathan geeves <jonathan@godcan.net>
Subject: newbie question: multidimentional arrays
Message-Id: <374B7749.B4B8832F@godcan.net>
Ok, first take this post with a little salt and don't flame me too
hard... a RTFM is ok with a pointer at the right manual :)
I'm trying to sort a multidimentional array based on different columns
(I'm sort of treating this like a database). In other words I'd like to
do a "select distinct field from table;" and a "select * from table
where column_name like %pattern%" but instead do this in perl from a
multidimentional array I have constructed as follows:
push (@whole_record, [$count, $year, $numeric_month, $day, $host,
$object, $hour, $min]);
I can get the information back out thusly:
for $jump (0 .. $#whole_record2) {
$hit_no = $whole_record2[$jump][0];
$hit_month = $whole_record2[$jump][2];
$hit_day = $whole_record2[$jump][3];
$hit_year = $whole_record2[$jump][1];
$hit_object = $whole_record2[$jump][5];
$hit_host = $whole_record2[$jump][4];
print
("$hit_host\t$hit_month-$hit_day-$hit_year\t$hit_object\n");
}
So I can get the table back that way, but I have no idea how to sort
based on different columns
I've thought about doing this with an associative list or array, but
that (as I have understood) only allows for one key which is the only
thing that one can then sort by.
Anyway, flame and suggest away :)
-Jonathan
------------------------------
Date: 26 May 1999 00:03:10 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: newbie question: multidimentional arrays
Message-Id: <x7zp2seav5.fsf@home.sysarch.com>
>>>>> "jg" == jonathan geeves <jonathan@godcan.net> writes:
jg> Ok, first take this post with a little salt and don't flame me too
jg> hard... a RTFM is ok with a pointer at the right manual :)
jg> I'm trying to sort a multidimentional array based on different columns
jg> (I'm sort of treating this like a database). In other words I'd like to
jg> do a "select distinct field from table;" and a "select * from table
jg> where column_name like %pattern%" but instead do this in perl from a
jg> multidimentional array I have constructed as follows:
jg> push (@whole_record, [$count, $year, $numeric_month, $day, $host,
jg> $object, $hour, $min]);
jg> I can get the information back out thusly:
jg> for $jump (0 .. $#whole_record2) {
jg> $hit_no = $whole_record2[$jump][0];
jg> $hit_month = $whole_record2[$jump][2];
jg> $hit_day = $whole_record2[$jump][3];
jg> $hit_year = $whole_record2[$jump][1];
jg> $hit_object = $whole_record2[$jump][5];
jg> $hit_host = $whole_record2[$jump][4];
jg> print
jg> ("$hit_host\t$hit_month-$hit_day-$hit_year\t$hit_object\n");
jg> }
jg> So I can get the table back that way, but I have no idea how to sort
jg> based on different columns
jg> Anyway, flame and suggest away :)
no need for flames. you have a basic question but it is an faq. or at
least a variation of "How do I sort an array by (anything)?"
try this:
@sorted_by_year_records = sort { $a->[1] <=> $a->[1] } @whole_record ;
same for sorting by any other fields.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Wed, 26 May 1999 02:57:47 GMT
From: kawaii_1@hotmail.com (ace)
Subject: Password Abuse Detection script wanted
Message-Id: <374f62d8.28775340@news-server>
Does anyone have a script
that will monitor logins to a password protected
area and keep track of ip addresses so that you can tell
if passwords are being shared or posted to a free password site?
Thanks in advance.
------------------------------
Date: 26 May 1999 02:56:06 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Password Abuse Detection script wanted
Message-Id: <slrn7kmom6.n7g.sholden@pgrad.cs.usyd.edu.au>
On Wed, 26 May 1999 02:57:47 GMT, ace <kawaii_1@hotmail.com> wrote:
>Does anyone have a script
>that will monitor logins to a password protected
>area and keep track of ip addresses so that you can tell
>if passwords are being shared or posted to a free password site?
grep the server logs...
--
Sam
Basically, avoid comments. If your code needs a comment to be
understood, it would be better to rewrite it so it's easier to
understand. --Rob Pike
------------------------------
Date: Wed, 26 May 1999 02:01:51 GMT
From: idubraws@deja.com
To: idubraws@deja.com
Subject: Re: perl5.005_03/sunos4.1.4 *dbm.t tests fail
Message-Id: <7ifkmf$sb8$1@nnrp1.deja.com>
I was under the impression that perl 5.005_03 needed /at minimum/ gcc
2.7.2.3. Perhaps that's the source of your problem...upgrade to at least gcc
2.7.2.3 and try again.
Ido
In article <374b0623.0@news.ic.sunysb.edu>,
Anne Kilarjian <anne@sparky.ic.sunysb.edu> wrote:
> I have just compiled up perl5.005_03 under sunos 4.1.4 using gcc 2.6.3.
> Everything seemed OK except that the 4 lib/*dbm tests all failed as
> detailed below.
>
> lib/anydbm..........ld.so: call to undefined procedure _dbm_open from
> 0xf7762154
> lib/gdbm............ld.so: Undefined symbol: ___builtin_alloca
> lib/ndbm............ld.so: call to undefined procedure _dbm_open from
> 0xf7762154
> lib/odbm............ld.so: call to undefined procedure _creat from 0xf7766198
>
> The system has gdbm installed and the perl config seemed to find it and add
> the /usr/local path it needed. It also has the libdbm.a, dbm.h and ndbm.h
> which are part of the OS. Can anyone tell me why these tests failed and
> what I can do about it?
>
> Thanks in advance
> Anne Kilarjian
>
>
--
Ido Dubrawsky
System Administrator
Deja.com
Austin, TX
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Tue, 25 May 1999 22:51:28 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: PERLFUNC: wantarray - get list vs array context of current subroutine call
Message-Id: <MPG.11b52ba94047809b989afb@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <374b385d@cs.colorado.edu> on 25 May 1999 17:55:09 -0700, Tom
Christiansen <perlfaq-suggestions@perl.com> says...
> NAME
> wantarray - get list vs array context of current subroutine call
^^^^^
scalar or void
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 26 May 1999 07:57:16 +0200
From: Kaare Rasmussen <kar@webline.dk>
Subject: Re: Return of array
Message-Id: <374B8D3C.D2938520@webline.dk>
Thanks for all the answers.
> Please read perldoc perlref, perllol, and perldsc.
Did that but couldn't get it to work properly. Maybe I'm doing some other
thing wrong. Back to check it now I'm confident that this part of the
program works.
------------------------------
Date: Wed, 26 May 1999 02:35:53 GMT
From: raypereda@my-dejanews.com
Subject: tool to trace #include statements in C/C++
Message-Id: <7ifmm9$tk5$1@nnrp1.deja.com>
I once used a perl script that would print the include tree
for a file that had nested includes. These are files that
have other includes. I lost my copy and was wondering if
anyone can send me a copy or suggest places to look.
thanks,
Ray Pereda
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Wed, 26 May 1999 00:40:37 -0400
From: "Jody Fedor" <JFedor@datacom-css.com>
Subject: Re: Using Perl over server, Help
Message-Id: <7ifsbq$plj$1@plonk.apk.net>
Jonathan Stowe wrote in message <374aa879@newsread3.dircon.co.uk>...
>WebWizard0 <webwizard0@aol.com> wrote:
>> Im trying to run my perl script from over a server. A very simple
program
>> like;
>>
>> #!!/user/local/bin/perl
>> $temp = 'test';
>> print "$temp";
Try using:
#!/usr/bin/perl -w
$temp = "test";
print "Content-type: text/html\n\n";
print $temp;
You need to let your browser know what type of data you are sending to it.
>>
>>
>> Fails when I try calling it from a browser by using the URL;
>> http://www.webpage.com/cgi-local/program.pl
>>
>> I get internal (500) errors.
>
>Its not entirely surprising that this does not work because it doesnt
>make any effort to co-operate with the CGI specification - it needs
>to return at least one header.
>
>Why dont you try:
>
>#!/usr/local/bin/perl -w
>
>print "Content-type: text/plain\n\n";
>print "Hello, World";
>
>Which should work.
>
>You should really address questions about the CGI to the newsgroup:
>
>comp.infosystems.www.authoring.cgi
>
>/J\
>--
>Jonathan Stowe <jns@gellyfish.com>
>
------------------------------
Date: Tue, 25 May 1999 22:07:14 -0400
From: Dipak Chowdhury <dipak@corning.com>
Subject: Want to create a auto login script
Message-Id: <374B5752.684DDB6@corning.com>
Hi:
I would like to run a program that lets me loginto a system and
automatically provide username and password. Can I automate that with
Perl in NT 4.0 environment? If so, any example will be appreciated.
Regards.
Dipak Chowdhury
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". 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". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 5783
**************************************