[6302] in Perl-Users-Digest
Perl-Users Digest, Issue: 924 Volume: 7
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Feb 10 21:18:12 1997
Date: Mon, 10 Feb 97 18:00:23 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 10 Feb 1997 Volume: 7 Number: 924
Today's topics:
Re: [Q] C++/perl interface <jasons@infinity.cs.unm.edu>
A window on Perl development (Nathan Torkington)
Re: apedding to a list... <dbenhur@emarket.com>
call/embed/guts with socket as stdout? (Michael Blakeley)
Re: Can I remove a require? <spicano@ptdcs2.intel.com>
Re: fcntl() in v4 (Charles DeRykus)
Re: File Tests for Directory not working under NT4.0 (Nathan V. Patwardhan)
Fixed digits of float random number? (Alex Kulbe)
Re: Get filename from variable-length path? (Nathan V. Patwardhan)
Help ! How to process @ character in a string ? <default.user@g306.fcit.monash.edu.au>
Re: HELP: variable interpretation?? (Chris E. Jones)
Re: how to change of a given string? (Jim Shapiro)
Re: how to change of a given string? <jander@jander.com>
Re: Looking for a Win32 pm module for paging (Christopher Russo)
Re: Loops in perl (Jason Brazile)
Re: multiple selects <donahue@acf2.NYU.EDU>
Re: multiple selects (Nathan V. Patwardhan)
on the fly graphs <sboswell@tamu.edu>
Re: on the fly graphs <mkruse@shamu.netexpress.net>
Re: Perl on SunOS 4.1.3 (Dee Jay Randall)
Re: piping input to a perl script <jander@jander.com>
problem sending mail from perl using cron (Benjamin J Trott)
Re: Subroutine Prototypes, Hard References and Maintain <jander@jander.com>
Sybperl & group by query <sivakumar.shanmugasundaram@eng.sun.com>
Re: Sybperl & group by query (Bret Halford)
{{volunteer perl help needed}} <fonda@u.washington.edu>
Digest Administrivia (Last modified: 8 Jan 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 10 Feb 1997 13:39:51 -0700
From: Jason Stewart <jasons@infinity.cs.unm.edu>
Subject: Re: [Q] C++/perl interface
Message-Id: <xjnpvy8gzu0.fsf@infinity.cs.unm.edu>
I have a very large C++ application, Pad++, and have written a number
of XSUBS to it. I have had to create all of these by hand, however. I
couldn't figure out how to get xsubpp to use the C++ compiler. So I
read perl{guts,call,xs,xstut} from the latest version of perl
(5.003_24) and practiced the examples in the xs tutorial until I felt
that I had enough grasp to manipulate the perl stack on my own.
When In doubt, I write a bare bones XSUB with function calls that look
like what I want and then let xsubpp generate a .c file, and convert
it by hand to C++.
I wish someone would clue me in how to get xsubpp to compile for the
C++ target instead of the C target. Everything I tried failed.
jas.
------------------------------
Date: 10 Feb 1997 15:31:12 -0700
From: gnat@frii.com (Nathan Torkington)
Subject: A window on Perl development
Message-Id: <5qsp34l2dr.fsf@elara.frii.com>
I know that a lot of people are curious as to what's being discussed
on the perl5-porters mailing list, where active development of the
Perl language, interpreter and core takes place. To that end, I've
created a very ugly page:
http://www.frii.com/~gnat/perl/porters/summary.html
I don't pretend to understand everything that's discussed, nor to be
archiving things for posterity, just that I'm trying to mention and
(in most cases) summarise every subject that comes through.
Note that no information in this message or on the web page says how
to join the perl5-porters list. If you really are smart enough to be
developing Perl, you can find out yourself. If you want another place
to ask your inane CGI questions, perl5-porters is *not* it.
Nat
(Perl bigot)
------------------------------
Date: Sat, 08 Feb 1997 17:04:29 -0800
From: Devin Ben-Hur <dbenhur@emarket.com>
To: Phil Williams <williams@irc.chmcc.org>
Subject: Re: apedding to a list...
Message-Id: <32FD229D.6031@emarket.com>
Phil Williams wrote:
> Phil Williams wrote:
> > I want to append to a list only if the thing being appended isn't
> > already an element in the list.
> Hate to answer my own question, but...
> I just figured out one way to do this:
>
> @junk = (@junk, $newjunk) if grep($newjunk, @junk) eq 0;
>
> Is there a better way?
Well, grep certainly works, but your statement should read:
push (@junk, $newjunk) unless grep($newjunk eq $_, @junk);
However, grep is going to do a linear search on the list for
each item you want to add. This is fine if you only have a few
items and a short list, but performance will suck for large lists.
A quicker method would be to use a hash to do a quick look up:
my @list = ();
my %inList = ();
foreach $newitem (@newitems) { # or however you get your newitems
if (not $inList{$newitem}) {
push(@list,$newitem);
$inList{$newitem} = 1;
}
}
HTH
--
Devin Ben-Hur <dbenhur@emarket.com>
eMarketing, Inc. http://www.emarket.com/
"Don't run away. We are your friends." O-
------------------------------
Date: Mon, 10 Feb 1997 15:41:36 -0800
From: mike@blakeley.com (Michael Blakeley)
Subject: call/embed/guts with socket as stdout?
Message-Id: <mike-1002971541370001@mblakele.vip.best.com>
Keywords: call embed guts stdout socket
I've been trying to write some code to execute Perl scripts from a C
program, with STDOUT for the Perl script set to be a socket rather than
the default stdout. I've read perlcall, perlembed, and perlguts, and found
out about setdefout() from munging through the Perl source, but I'm still
stumped. So, as a last resort, I'm throwing myself on the mercy of the
Perl gods :-)
Here's what I'm doing (roughly - don't shoot me if it doesn't compile):
#include <stdio.h>
#include <EXTERN.h>
#include <perl.h>
#include <embed.h> /* for setdefout() */
int
mysub (int csd, char *scriptpath)
{
char *argv[] = { "", scriptpath }; /* arg0 should really be perl */
char **env;
int argc = 2;
static PerlInterpreter *my_perl;
my_perl = perl_alloc();
perl_construct(my_perl);
perl_parse(my_perl, NULL, argc, argv, env);
/* here's where we try to set up STDOUT to be the socket descriptor csd */
setdefout(csd);
perl_run(my_perl);
perl_destruct(my_perl);
perl_free(my_perl);
} /* end mysub */
The script runs ok if I leave out the setdefout(), but outputs to STDOUT
of the calling program, not to csd. I know that setdefout wants a *GV,
which I assume is a glob reference. Can I turn a socket descriptor into a
*GV somehow? I've looked at perl.c, pp_sys.c, and io.c, to no avail...
Basically, my question is: How can I use setdefout with a socket descriptor?
thanks in advance for any help - if I receive e-mail answers, I'll
summarize and post.
--
Michael Blakeley
mike@blakeley.com
PGP & more: <http://www.blakeley.com/>
------------------------------
Date: Mon, 10 Feb 1997 13:14:42 -0800
From: Silvio Picano <spicano@ptdcs2.intel.com>
To: Mark Brodziak <mark.brodziak@wpcorp.com.au>
Subject: Re: Can I remove a require?
Message-Id: <32FF8FC2.167E@ptdcs2.intel.com>
Mark Brodziak wrote:
>
> Hi;
>
> I have a require statement in my code. I want to be able to require
> several different control files; each file has a similar structure, named
> ctl, within it. However, I strike a small problem as when I try to
> subsequently require the next control files, it ignores it as there is
> already a require with the same structure within it.
>
> Can I remove my first require before going on to the next control file?
>
> --
> Mark Brodziak
> Business Information Technology
> Western Power Corporation
> mark.brodziak@wpcorp.com.au
See the perlfunc man page:
require Demands some semantics specified by EXPR, or by $_
if EXPR is not supplied. If EXPR is numeric,
demands that the current version of Perl ($] or
$PERL_VERSION) be equal or greater than EXPR.
Otherwise, demands that a library file be included
if it hasn't already been included. The file is
included via the do-FILE mechanism, which is
essentially just a variety of eval(). Has semantics
similar to the following subroutine:
sub require {
local($filename) = @_;
return 1 if $INC{$filename};
local($realfilename,$result);
ITER: {
foreach $prefix (@INC) {
$realfilename = "$prefix/$filename";
if (-f $realfilename) {
$result = do $realfilename;
last ITER;
}
}
die "Can't find $filename in \@INC";
}
die $@ if $@;
die "$filename did not return true value" unless $result;
$INC{$filename} = $realfilename;
$result;
}
Note that the file will not be included twice under
the same specified name. The file must return TRUE
as the last statement to indicate successful
execution of any initialization code, so it's
customary to end such a file with "1;" unless you're
sure it'll return TRUE otherwise. But it's better
just to put the "1;", in case you add more
statements.
You need to "remove" the "$filename" on $INC{$filename}, then do another
require.
Silvio
------------------------------
Date: Tue, 11 Feb 1997 00:03:11 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: fcntl() in v4
Message-Id: <E5Ew5B.to@bcstec.ca.boeing.com>
In article <3ev7nqct.fsf@jander.com>, Jim Anderson <jander@jander.com> wrote:
>ced@bcstec.ca.boeing.com (Charles DeRykus) writes:
>
>
>> You'll need to pass a flock structure:
>>
>>
>> use Fcntl;
>>
>> $lock = pack("s s l l s",&F_WRLCK,0,0,0,0);
>> fcntl(OUTFILE, &F_SETLKW, $lock) || die "fcntl failed: $!";
>> ....
>
>Note that the struct required by flock varies from OS to OS, so the
>above pack statement may need to be modified for your environment.
>
True. The above solution may be misleading too because it'll
cause no errors on each of the OS's below in spite of the
differing structures:
sunos4.1.x
$lock = pack("s s l l s s",
F_WRLCK, 0, 0, 0, 0, 0);
solaris 2.5.1
$lock = pack("s s l l l l l l l l",
F_WRLCK, 0, 0, 0, 0, 0, 0, 0, 0, 0);
aix3.5.2
$lock = pack("s s l l L i i",
F_WRLCK, 0, 0, 0, 0, 0, 0);
--
Charles DeRykus
ced@carios2.ca.boeng.com
------------------------------
Date: 10 Feb 1997 21:57:48 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: File Tests for Directory not working under NT4.0
Message-Id: <5do5ks$khg@fridge-nf0.shore.net>
Kevin Smith (kevin.smith@citicorp.com) wrote:
I noticed that you're using PL110, but you should probably upgrade to
5003_07 from www.activeware.com which has fixed a number of bugs from
the 5.001m hip release. I've heard people complain about stat/filetypes
from the 110 release (in the past).
I can think of a couple of things, but here's my revision.
$sharename = "C:\\";
opendir(DIR, "$sharename") || die("Can't: $!\n");
@entries = sort(readdir(DIR));
closedir(DIR)
foreach $entry (@entries) {
### sorry for the sprintf abuse, but ...
$full_entry = sprintf("%s%s", $sharename, $entry);
if(-d "$full_entry") {
print("DIR: $full_entry\n");
} else {
print("FILE: $entry\n");
}
}
--
Nathan V. Patwardhan
nvp@shore.net
"[news:alt.fan.jwz]"
------------------------------
Date: 10 Feb 1997 22:18:04 GMT
From: s_akulbe@rzw4.rz.uni-ulm.de (Alex Kulbe)
Subject: Fixed digits of float random number?
Message-Id: <5do6qs$i0q$1@news.belwue.de>
Hello,
I'am looking for a random number generator that produces a fixed
length of digits after the decimalpoint of a float number.
Some people gave me a tip to use it like that way
$random_number = sprintf("%3f", rands(2) -1) or
$random_number = sprintf("%1.3f", rands(2) -1)
but this produces not always fixed length digits.
My suspicion is that the rounding produces this problem.
Any ideas?
-alex (s_akulbe@student.uni-ulm.de)
------------------------------
Date: 10 Feb 1997 21:59:50 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Get filename from variable-length path?
Message-Id: <5do5om$khg@fridge-nf0.shore.net>
Carl Payne (cpayne@xmission.xmission.com) wrote:
: I have a situation where I'm given up to several hundred MB
: of directory listings and I need to parse the filenames
: (and ONLY the filenames) from those lists for a seperate routine.
Instead of snipping paths, you could read through the directories and
perform your file functions from there.
--
Nathan V. Patwardhan
nvp@shore.net
"[news:alt.fan.jwz]"
------------------------------
Date: Fri, 07 Feb 1997 16:46:39 -0800
From: default user <default.user@g306.fcit.monash.edu.au>
Subject: Help ! How to process @ character in a string ?
Message-Id: <32FBCCEF.3D25@student.monash.edu.au>
Hi everyone ,
I had this problem , I need to process this script but I encounter
server error at the @abc , how do I go about stripping the @ character.
here is the listing :
-------------------------------
#! /usr/local/bin/perl
$x = "/";
$y = "~";
$z = "+";
$a = "=";
$b = "//";
$c = "\@";
$d = "@";
# $txt = $ENV{QUERY_STRING};
$txt
="http://user:password@abc.ct.monash.edu.au/~cvc/sdc.html?hidval=test";
$txt =~ s/$d/$c/g;
print $txt;
print "\n";
@str1 = split(/$b/,$txt);
print "\n";
$txt1 = $str1[1];
@str2 = split(/:/,$txt1);
print "user name :";print $str2[0];
$txt2 = $str2[1];
@str3 = split(/$c/,$txt2);
print "\npassword :";print $str3[0];
print "\nfrom server :";print $str3[1];
print "\nfrom user :";print $str3[2];
print "\ndata:"; print $str~3[3];
----------------------------------------
sorry for being so brief - school lab is closing
Edmund
klcho5@student.monash.edu.au
------------------------------
Date: Mon, 10 Feb 1997 17:17:45 -0600
From: cejones@huckel.cm.utexas.edu (Chris E. Jones)
Subject: Re: HELP: variable interpretation??
Message-Id: <cejones-1002971717450001@newshost.cc.utexas.edu>
In article <cejones-1002971123190001@newshost.cc.utexas.edu>,
cejones@huckel.cm.utexas.edu (Chris E. Jones) wrote:
> First, I have defined $water as a normal variable.
>
> I have a second variable, $unknown that is set to the text name water
>
>
> I want to use $unknown to get the value in the $water variable.
>
> Obviously print "$$unknown"; will not work since $$ is the special
> variable for giving the process number of the Perl running my script.
>
> Can anyone point me in the right direction? I've searched my O'Reilly
> books, but haven't ferreted out the answer...
>
>
Well, I solved the problem. You for those who are interested,
you can do the obvious thing.
print $$unknown
it does indeed print the contents of the defined $water variable.
It seems that wasn't the problem I was having with my program.
Thanks for all those who replied.
Chris
------------------------------
Date: 10 Feb 1997 22:38:07 GMT
From: jnshapi@argo.ecte.uswc.uswest.com (Jim Shapiro)
Subject: Re: how to change of a given string?
Message-Id: <5do80f$64i@aeon.ecte.uswc.uswest.com>
luis@ged.com wrote:
: Hi:
: I need to change the Case of a string that a client inputs for
: instance ibm would be IBM, apple would be Apple. The string is obtained
: from the login that permits the user to enter the page. (Its a cgi perl
: page)
: Thanks
: Its on an Netscape Srever. SGI Running Irix 5.3
$upper = uc $lower;
: -------------------==== Posted via Deja News ====-----------------------
: http://www.dejanews.com/ Search, Read, Post to Usenet
--
Give every man thy ear, but few thy voice,
Take each man's censure, but reserve thy judgment. (W. Shakespeare)
Jim Shapiro
------------------------------
Date: 10 Feb 1997 18:47:14 -0500
From: Jim Anderson <jander@jander.com>
Subject: Re: how to change of a given string?
Message-Id: <n2tcmdfh.fsf@jander.com>
luis@ged.com writes:
>
> Hi:
> I need to change the Case of a string that a client inputs for
> instance ibm would be IBM, apple would be Apple. The string is obtained
> from the login that permits the user to enter the page. (Its a cgi perl
> page)
See function uc, ucfirst, lc, lcfirst in the Blue Camel. Also checkout
\U, \u, \L, \l in the section on regexp's.
--
Jim Anderson jander@jander.com
PGP Public Key Fingerprint: 0A 1C BB 0A 65 E4 0F CD
4C 40 B1 0A 9A 32 68 44
------------------------------
Date: 10 Feb 1997 16:08:07 GMT
From: crusso@mit.edu (Christopher Russo)
Subject: Re: Looking for a Win32 pm module for paging
Message-Id: <5dnh57$1n5@senator-bedfellow.MIT.EDU>
In article <32FA1DF4.70DF@pls.com>, brobbins@pls.com says...
>> Nick Bonfiglio (nbonfigl@3do.com) wrote:
>> : I'm looking for a perl5 Win32 pm module that will send alpha pages.
>I have a SkyTel pager with the e-mail option. I have a PIN # that
>I can use in the address of a normal e-mail message and I will
>receive the first 240 characters of the message. Pages can also
>be sent if I connect to a special number at SkyTel, via modem,
>and issue the page that way.
While we're on the subject, I'm trying to write a short Perl script to post
data to a a pager through Mobilemedia's web site, but I can't seem to get it to
work correctly. It's written using the Win32::Internet module. I know the
syntax is correct, since it works with other CGIs on the net, but not with this
program. Has anyone played around with this at all?
use Win32::Internet;
$NET = new Win32::Internet();
$NET->HTTP($HTTP, "www.mobilemedia.com", "anonymous", "nobody\@mit.edu");
$HTTP->OpenRequest($REQ,"/cgi-bin/wwwpage.exe","POST","HTTP/1.0");
$REQ->AddHeader('Content-type: application/x-www-urlencoded');
$REQ->SendRequest("PIN=?????&MSSG=message"); # where ????? = some pager ID
$returnpage = $REQ->ReadEntireFile();
print $returnpage."\n";
Chris Russo
crusso@mit.edu
------------------------------
Date: 10 Feb 1997 21:27:30 GMT
From: jason@ampersand.com (Jason Brazile)
Subject: Re: Loops in perl
Message-Id: <5do3s2$nfq$1@ftp.ampersand.com>
Brian Wheeler <bdwheele@indiana.edu> wrote:
>
> Oh, for the love of God, are you a scheme programmer? :)
>
> seems alot easier to do:
>
> #!/usr/bin/perl
> for($i=1;$i<6;$i++) {
> print "hello, world\n";
> }
Sorry, I didn't realize easiness was what you were after. This one is much
better:
#!/usr/bin/perl
map(&$_, (sub{print "hello, world\n"}) x 5);
---
Jason Brazile
Ampersand, Inc
Billerica, MA
------------------------------
Date: Mon, 10 Feb 1997 14:17:01 -0500
From: "Adam M. Donahue" <donahue@acf2.NYU.EDU>
To: palincsars.isc@gao.gov
Subject: Re: multiple selects
Message-Id: <Pine.ULT.3.95.970210140857.20047A-100000@acf2.NYU.EDU>
> 1) This is not a perl question, it's an HTML question. Expect to get
> scolded for posting to a totally inappropriate group.
No, it's clearly a Perl question. I know perfectly well how to specify
"multiple" in HTML; if you'd have read the subject line of my message,
you would have seen that I put the proper HTML there. Should I scold you
for not reading closely, hmm?
> 2) <select name="Something" size=20 MULTIPLE>
> By including the MULTIPLE in the <select> tag you will get multiple
> values. Omit it and you won't.
Thanks for the lesson. That's not the question.
However, I have found a solution, and as a courtesy to the group,
I'll post it below.
First, my original question was how to get Perl to handle the "multiple"
selections from an HTML <SELECT MULTIPLE> tag. Using the common
"UnWebify" perl code, adding this will handle it fine:
if ($FORM{$name}) {
$FORM{$name} .= " " . $value;
}
else {
$FORM{$name} = $value
}
Adam
Adam Donahue 400 Broome Street
Distributed Computing & Suite 410-B
Information Services New York, NY 10013
New York University Cyber-Guru Consulting
mailto:adam.donahue@nyu.edu mailto:headguru@cyber-guru.com
------------------------------
Date: 10 Feb 1997 22:03:31 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: multiple selects
Message-Id: <5do5vj$khg@fridge-nf0.shore.net>
Adam M. Donahue (donahue@acf2.NYU.EDU) wrote:
: No, it's clearly a Perl question. I know perfectly well how to specify
: "multiple" in HTML; if you'd have read the subject line of my message,
: you would have seen that I put the proper HTML there. Should I scold you
: for not reading closely, hmm?
Less filling, tastes great. Less filling, tastes great. HTML/CGI have
little/no place in this newsgroup - I could understand posting here if
there were no CGI newsgroup, but there is, so please don't - unless you
have a *specific* question that is *directly* related to Perl.
--
Nathan V. Patwardhan
nvp@shore.net
"[news:alt.fan.jwz]"
------------------------------
Date: 11 Feb 1997 00:52:23 GMT
From: "Richard S. Boswell" <sboswell@tamu.edu>
Subject: on the fly graphs
Message-Id: <01bc17b5$d862bc00$73725ba5@afpc-115>
I'm trying to write a program that will generate gifs of graphs on the fly
for web publishing. I need to generate simple graphs (line,bar,pie) for a
simulation model. There is the possibility of thousands of graphs, so to
conserve disk space, we only want to generate graphs that are needed by a
certain user.
I figured that I could strip data from text files with perl rather easily.
My question is how to get graphs from that data. Is there an easy way to
do this without spending a fortune on some COTS product? It will probably
be running on an NT box (the simulation model runs on DOS/Windoze/NT), but
if last comes to last I could run it on a UNIX box (but first I'd have to
get the data from NT to the other machine...).
thanks,
sid.
------------------------------
Date: 11 Feb 1997 01:44:02 GMT
From: Matt Kruse <mkruse@shamu.netexpress.net>
Subject: Re: on the fly graphs
Message-Id: <5doit2$cef@news1-alterdial.uu.net>
Richard S. Boswell <sboswell@tamu.edu> wrote:
: I figured that I could strip data from text files with perl rather easily.
: My question is how to get graphs from that data. Is there an easy way to
: do this without spending a fortune on some COTS product? It will probably
: be running on an NT box (the simulation model runs on DOS/Windoze/NT), but
: if last comes to last I could run it on a UNIX box (but first I'd have to
: get the data from NT to the other machine...).
In the beginning, there was Tom Boutell.
Tom begat the GD gif library in C, and it was good.
Seeing that it was good, Lincoln Stein begat GD.pm, a perl module to
interface with GD, and it was good.
Seeing that it was good, Dave Roth begat win32GD, a port of GD.pm to perl
for Win32, and it was good.
Seeing that these guys were so good, I was ashamed. I had used their
work so much, and they had done so much for humanity, and I needed to
make a sacrifice.
Thus, I begat Graph.pm. And I saw that it was kinda okay. But I am
preparing to offer it to the Perl Gods anyway, as soon as it is in a form
that is suitable.
Did you catch that? Sorry... I just felt inspired there for a minute :)
Compile and install the GD libraries. (www.boutell.com)
Compile and install GD.pm, if you're on unix
(http://www.genome.wi.mit.edu/ftp/pub/software/WWW/GD.html)
Download and install Win32GD if you're on NT
(ftp://ftp.roth.net/pub/NTPerl/Win32_gd_v961030.zip)
These tools will allow you to generate gif images from within perl.
In a few days, I should be ready to release Graph.pm, a module to make
chart-generation *really really* simple. It'll only do bar charts in the
beginning, but it'll grow. Watch here and c.l.p.modules if you're
interested, or write your own - it's not too tough with the excellent
work done by the guys above.
Hope that helps!
--
Matt Kruse
mkruse@netexpress.net
http://www.netexpress.net/~mkruse/ http://www.mkstats.com/
---------------------------------------------------------------------------
Unsolicited advertising of any type to this addresss will not be tolerated.
------------------------------
Date: 10 Feb 97 21:56:52 GMT
From: randal@hercules.cs.uregina.ca (Dee Jay Randall)
Subject: Re: Perl on SunOS 4.1.3
Message-Id: <randal.855611812@hercules>
The error is that ld is trying to satisfy the -ldl library option
given to gcc. The library it will try to load is libdl.so and then
libdl.a which are the dynamic linking libraries.
For some reason, it can't find them and so cannot continue. Either
they are not in a common place, in which case add their path to your
LD_LIBRARY_PATH environment variable or they do not exist. (I believe
ld will try to use libdl.so first and then libdl.a as a last resort.
The .so is a shared object, while the .a is a static library.) It is
weird that something like the dynamic linking library is not to be found,
so you may want to talk to your sysadmin.
You could probably also fix it by using static linking, in which case
you will only want to turn on the extensions that perl talks about
dynamically linking in if you really need them, because with static
linking, they will always be loaded.
Hope that helps,
Dee Jay Randall _-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_
randal@cs.uregina.ca | |
{ } Sleep? I'll catch up on sleep after I'm dead. { }
_-__-_ ouch, { } -me { }
> < that hurt | |
__) chomp (___________ ~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~
Dean Pentcheff <dean@tbone.biol.sc.edu> writes:
>Jason Warner <jwarner@mitre.org> writes:
>>I am trying to compile perl5.002 on a SunOS 4.1.3 machine and it keeps
>>giving me this error:
>>
>>gcc -L/usr/local/lib -o miniperl miniperlmain.o libperl.a -lnsl -lgdbm
>>-ldbm -ldl -lm -lc -lposix
>>/usr/local/gnu/ld: No such file or directory for libdl.a
>>collect2: ld returned 1 exit status
>>make: *** [miniperl] Error 1
>>
>>everytime I try to make it. I have no idea what is going on. I also
>>tried to take out the references to libdl.a etc and that didn't make a
>>difference.
>>Thank you in advance, Jason Warner
>
>I think (but this is not firm knowledge) that you may be missing a
>library for dynamic linking. You might try redoing the Perl configure
>and specifying static linking for whichever modules you'd like to
>include.
>-Dean
--
Dee Jay Randall _-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_
randal@cs.uregina.ca | |
{ } Sleep? I'll catch up on sleep after I'm dead. { }
_-__-_ ouch, { } -me { }
> < that hurt | |
__) chomp (___________ ~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~
------------------------------
Date: 10 Feb 1997 19:00:16 -0500
From: Jim Anderson <jander@jander.com>
Subject: Re: piping input to a perl script
Message-Id: <hgjkmctr.fsf@jander.com>
hharp@arches.uga.edu (Holly Harper) writes:
>
> Hey, I am curious as if to whether (and how) it is possible
> to send a stream of data through a pipe and have it be used on
> the other end by a perl script.
>
> For instance, I want to be able to do something like
>
> cat filename | perlscript.pl
>
> Any particular way i should approach this? Send responses
> to splat@felix.cc.gatech.edu. Thanks.
The perl script reads the data from STDIN.
--
Jim Anderson jander@jander.com
PGP Public Key Fingerprint: 0A 1C BB 0A 65 E4 0F CD
4C 40 B1 0A 9A 32 68 44
------------------------------
Date: Mon, 10 Feb 1997 16:27:31 -0800
From: btrott@scuacc.scu.edu (Benjamin J Trott)
Subject: problem sending mail from perl using cron
Message-Id: <btrott-ya023380001002971627310001@news.cds.sloc.net>
Hello...
As the subject states, I'm having trouble using a perl script to send mail.
The script is run as a cron job, and what it does is this: it looks in a
directory of outgoing mail messages (which other scripts create), and if
there are any message files there, it opens them up and sends them using
sendmail, then deletes those files it sent.
The reason I'm doing this is that it seems to take an inordinate amount of
time to send mail messages via a cgi script (at least on this server), and
so this approach seems to be faster. When I run the script from a command
line, it works quite well, and I receive the mail... however, when I run it
from cron, it doesn't work; the messages are deleted, but I don't receive
any mail! I don't get any error in the mail from STDOUT.
The relevant portion of the script is below... thanks!
bye,
Benjamin Trott
btrott@scuacc.scu.edu
------------ script --------------
opendir(MAIL, $maildir);
@files = readdir(MAIL);
closedir(MAIL);
foreach $f (@files) {
next if ($f =~ /^\./);
open(F, $f);
@lines = <F>;
close(F);
foreach (@lines) { chop if (/\n$/); }
open(MAIL, "|/usr/lib/sendmail -t") || print "CAN'T OPEN MAIL: $!\n";
$to = shift(@lines);
$from = shift(@lines);
$reply = shift(@lines);
$subject = shift(@lines);
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Reply-to: $reply\n";
print MAIL "Subject: $subject\n\n";
foreach (@lines) { print MAIL "$_\n"; }
close(MAIL);
unlink("$maildir$f");
}
------------------------------
Date: 10 Feb 1997 18:58:34 -0500
From: Jim Anderson <jander@jander.com>
Subject: Re: Subroutine Prototypes, Hard References and Maintainable Code
Message-Id: <iv40mcwl.fsf@jander.com>
Frank Opila <franko@sequent.com> writes:
There are too many coding errors to take the prototype question seriously.
[...]
--
Jim Anderson jander@jander.com
PGP Public Key Fingerprint: 0A 1C BB 0A 65 E4 0F CD
4C 40 B1 0A 9A 32 68 44
------------------------------
Date: Mon, 10 Feb 1997 14:08:57 -0800
From: Sivakumar <sivakumar.shanmugasundaram@eng.sun.com>
Subject: Sybperl & group by query
Message-Id: <32FF9C79.6532@eng.sun.com>
Hi,
I have a query which has formatted headings and group by, computed by
clauses. I dont want to do any processing in perl. just want to dump
the output in the same format as returned by the query (thru isql).
i tried using 'sql()' fn. the heading is gone and the formatting is
lost. only option is to run the whole query thru isql. is there any
other way using Sybperl (perl5/sybperl 2.06). thanks
siva
------------------------------
Date: 11 Feb 1997 00:54:43 GMT
From: bret@sybase.com (Bret Halford)
Subject: Re: Sybperl & group by query
Message-Id: <5dog0j$6c4@fyi.sybase.com>
In article <32FF9C79.6532@eng.sun.com>, Sivakumar <sivakumar.shanmugasundaram@eng.sun.com> writes:
|> Hi,
|>
|> I have a query which has formatted headings and group by, computed by
|> clauses. I dont want to do any processing in perl. just want to dump
|> the output in the same format as returned by the query (thru isql).
|> i tried using 'sql()' fn. the heading is gone and the formatting is
|> lost. only option is to run the whole query thru isql. is there any
|> other way using Sybperl (perl5/sybperl 2.06). thanks
|>
isql does a certain amount of the formatting
(ie, sql server is sending raw data and isql is
determining how to format compute rows, etc.
So if you are not running the query through isql,
you will not get the benefits of that formatting.
You will either have to run the query through isql,
or do the formatting yourself in perl.
--
---------------------------------------------------------------------
| Bret Halford Imagine my disappointment __|
| Sybase Technical Support in learning the true nature __|
| 6400 S. Fiddlers Green Circle of rec.humor.oracle... __|
| Englewood, CO 80111-4954 USA |
============================================================
------------------------------
Date: Mon, 10 Feb 1997 17:07:43 -0800
From: "F. Kuerbitz" <fonda@u.washington.edu>
Subject: {{volunteer perl help needed}}
Message-Id: <Pine.A41.3.95b.970210170648.51732C-100000@dante04.u.washington.edu>
Hi,
I recently began construction of a new website that requires many CGI
scripts. They are all *almost* done and my original volunteer scriptor has
left me due to her workload. All I need is a subscription form added to
my subscribe cgi, some other minor changes.
If you enjoy writing CGI or feel like helping someone who is clueless
please reply to this post.
***************************************************************************
~~ Coming Soon!!~~
Grapevine Internet News Network
The Grapevine Tribune
Jennifer Mahoney-Site Administrator
<ginn@drizzle.com>
***************************************************************************
------------------------------
Date: 8 Jan 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Jan 97)
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". 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.
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 V7 Issue 924
*************************************