[11237] in Perl-Users-Digest
Perl-Users Digest, Issue: 4837 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Feb 6 10:07:14 1999
Date: Sat, 6 Feb 99 07:00:25 -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 Sat, 6 Feb 1999 Volume: 8 Number: 4837
Today's topics:
@INC usage jimbob4334@my-dejanews.com
Re: @INC usage (Bill Moseley)
Re: @INC usage <jdf@pobox.com>
Re: C->Perl->C Problem <sugalskd@netserve.ous.edu>
Re: Determining time, date, and month with CGI (Newbie <stevenhenderson@prodigy.net>
Re: Determining time, date, and month with CGI (Newbie (G.IM)
Re: Determining time, date, and month with CGI (Newbie (I R A Aggie)
Re: Help with data structure <jdf@pobox.com>
Re: How do I get local IP Address ? (I R A Aggie)
Re: How do I get local IP Address ? (I R A Aggie)
Re: How do I get local IP Address ? (Larry Rosler)
is there a difference between extensions <elst.fels@nospam.ping.be>
Re: is there a difference between extensions (Bart Lateur)
Re: passing info from one script to another using POST <ozette@imaginative-creations.com>
Re: perl not always in /usr/bin/perl <gwilburn@home.com>
PERL web ring script <GLEdwards@christianfamilies.net>
Perl,Win32 and UserAdmin ? <michael@webstead.com>
Re: Program needs compactification <uri@home.sysarch.com>
Re: Program needs compactification (Peter J. Kernan)
Re: Program needs compactification <jdf@pobox.com>
Re: sending an attached file with Sendmail? <palincss@his.com>
strict <elst.fels@nospam.ping.be>
Re: strict (Bill Moseley)
Re: strict <jdf@pobox.com>
The order of form fields that recieve by cgi program fanxin@mailcity.com
Re: Unblessed reference error when using DBI::DBD (Brian Lavender)
Using C-library in Perl? <sbajaj@verisign.com>
Re: Using C-library in Perl? (Andrew M. Langmead)
Re: Using HTTPS (Mads Toftum)
Re: Using Perl to interrogate Hotmail (I R A Aggie)
Re: What's happening with this hash? (John Moreno)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 06 Feb 1999 06:28:50 GMT
From: jimbob4334@my-dejanews.com
Subject: @INC usage
Message-Id: <79gnes$af6$1@nnrp1.dejanews.com>
I was wondering how I go about setting up libraries in Unix.
I want to use Date::Calc but it is not part of our standard library. How
do I go about setting up my own library?
Jim
---------------------
CHECK IT OUT:
http://www.imaxx.net/~djferree
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sat, 6 Feb 1999 05:30:25 -0800
From: moseley@best.com (Bill Moseley)
Subject: Re: @INC usage
Message-Id: <MPG.1125e3d0882b2c429896a5@nntp1.ba.best.com>
In article <79gnes$af6$1@nnrp1.dejanews.com>, jimbob4334@my-dejanews.com
says...
> I want to use Date::Calc but it is not part of our standard library. How
> do I go about setting up my own library?
I'll bet that's a FAQ question. or
http://www.CPAN.org/modules/
--
Bill Moseley mailto:moseley@best.com
------------------------------
Date: 06 Feb 1999 14:40:34 +0100
From: Jonathan Feinberg <jdf@pobox.com>
To: jimbob4334@my-dejanews.com
Subject: Re: @INC usage
Message-Id: <m3vhhfejl9.fsf@joshua.panix.com>
jimbob4334@my-dejanews.com writes:
> I want to use Date::Calc but it is not part of our standard library.
> How do I go about setting up my own library?
This is a FAQ. perlfaq8, "How do I keep my own module/library
directory?"
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: 6 Feb 1999 04:52:43 GMT
From: Dan Sugalski <sugalskd@netserve.ous.edu>
Subject: Re: C->Perl->C Problem
Message-Id: <79ghqr$il$1@news.NERO.NET>
In comp.lang.perl.misc Robert J. Irwin <rjirwin@top.cis.syr.edu> wrote:
: The C->Perl set-up has worked for me previously, but that ended when
: I changed the Perl code to "use" the XS module I wrote -- i.e., when I
: tried a C->Perl->C route. Specifically, I get a msg to the effect
: that my perl wasn't built for dynamic loading, so my XS module can't
: be loaded.
Are you calling xs_init and passing the appropriate bits to perl_parse?
Check out the perlembed man page and see if maybe that clears some things
up for you.
Dan
------------------------------
Date: Fri, 5 Feb 1999 20:03:18 -0600
From: "Steven T. Henderson" <stevenhenderson@prodigy.net>
Subject: Re: Determining time, date, and month with CGI (Newbie Question)
Message-Id: <X9Pu2.50290$641.28977@news.san.rr.com>
function you want is called localtime.
it can be a pain to use. check out http://www.stevenhenderson.com for a
pointer to the dates.pl library i wrote to streamline common functions. its
free, enjoy!
G.IM wrote in message ...
>If possible, how would one go about determining time, date, and month with
CGI
>script? I am able to do it most efficiently with javascript, but that poses
to
>be a problem. I'd appreciate any help. Thanks!
------------------------------
Date: Sat, 06 Feb 1999 05:41:02 GMT
From: noone@home.com (G.IM)
Subject: Re: Determining time, date, and month with CGI (Newbie Question)
Message-Id: <OBQu2.1530$175.3457@news.rdc1.sdca.home.com>
In article <X9Pu2.50290$641.28977@news.san.rr.com>, "Steven T. Henderson" <stevenhenderson@prodigy.net> wrote:
>function you want is called localtime.
>
>it can be a pain to use. check out http://www.stevenhenderson.com for a
>pointer to the dates.pl library i wrote to streamline common functions. its
>free, enjoy!
Wow, that's quite a script you got there. thank you!
------------------------------
Date: 6 Feb 1999 05:30:02 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Determining time, date, and month with CGI (Newbie Question)
Message-Id: <slrn7bnkvk.pd6.fl_aggie@enso.coaps.fsu.edu>
On Fri, 5 Feb 1999 20:03:18 -0600, Steven T. Henderson
<stevenhenderson@prodigy.net> wrote:
+ function you want is called localtime.
Perhaps...he may want gmtime(), that part wasn't specified.
+ it can be a pain to use.
Really? I dunno...check this out:
$ perl
$now=localtime; # default timezone, in my case US Eastern
print "$now\n";
$ENV{'TZ'}='PST8PDT'; # lie to the environment and tell it we're in
# the US Pacific timezone
$now=localtime;
print "$now\n";
^D
Sat Feb 6 00:24:21 1999
Fri Feb 5 21:24:21 1999
Hummm...exactly what I was expecting...the documented behaviour of
using localtime() in a scalar context!
+ check out http://www.stevenhenderson.com for a
+ pointer to the dates.pl library i wrote to streamline common functions. its
+ free, enjoy!
You may want to consider submitting your code to CPAN.
James
------------------------------
Date: 06 Feb 1999 05:59:33 +0100
From: Jonathan Feinberg <jdf@pobox.com>
To: "Shawn A. Berg" <berg98@us.ibm.com>
Subject: Re: Help with data structure
Message-Id: <m34sp0f7pm.fsf@joshua.panix.com>
"Shawn A. Berg" <berg98@us.ibm.com> writes:
> I would like to create a hash of file handles. I cannot figure out
> how to set up and use this kind of structure.
This is a FAQ. perlfaq5, "How can I make a filehandle local to a
subroutine? How do I pass filehandles between subroutines? How do I
make an array of filehandles?"
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: 5 Feb 1999 23:33:38 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: How do I get local IP Address ?
Message-Id: <slrn7bn03a.nj4.fl_aggie@enso.coaps.fsu.edu>
On Fri, 5 Feb 1999 17:32:45 -0500, Ronald Lamb <rlamb@compuserve.com> wrote:
+ use Socket
+ use Sys::Hostname
+ $addr = gethostbyname(hostname());
Its fairly obvious you didn't test this...you're using gethostbyname()
incorrectly. It returns a list, not a scalar value.
So, making a few minor changes, we get:
use Socket;
use Sys::Hostname;
($name,$aliases,$addrtype,$length,@addrs)= gethostbyname(hostname());
foreach (@addrs) { print join('.',unpack('C4',$_)); }
print "\n";
Well, whatdoyouknow? I get a valid decimal.dot.notated IP address. So
it works for a static IP. I'll have to try it at home to see if it
works for a dynamically generated one. I think that it should work,
but I can't say so with certainty...
Its also dependent upon how well Sys::Hostname does its magic. From
the docs:
It tries syscall(SYS_gethostname), `hostname`, `uname -n`, and the
file /com/host. If all that fails it croaks.
Not exactly portable... :(
James
------------------------------
Date: 6 Feb 1999 05:20:40 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: How do I get local IP Address ?
Message-Id: <slrn7bnke1.pd6.fl_aggie@enso.coaps.fsu.edu>
On 5 Feb 1999 23:33:38 GMT, I R A Aggie <fl_aggie@thepentagon.com> wrote:
+ Well, whatdoyouknow? I get a valid decimal.dot.notated IP address. So
+ it works for a static IP. I'll have to try it at home to see if it
+ works for a dynamically generated one. I think that it should work,
+ but I can't say so with certainty...
Had I given it a bit more thought about what it is really doing, I
would have realized that it won't work. It returns the localhost
loopback interface. As it should.
James
------------------------------
Date: Sat, 6 Feb 1999 06:44:31 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How do I get local IP Address ?
Message-Id: <MPG.1125f52bb11c4b7a989a0e@nntp.hpl.hp.com>
In article <slrn7bn03a.nj4.fl_aggie@enso.coaps.fsu.edu> on 5 Feb 1999
23:33:38 GMT, I R A Aggie <fl_aggie@thepentagon.com> says...
> On Fri, 5 Feb 1999 17:32:45 -0500, Ronald Lamb <rlamb@compuserve.com> wrote:
>
> + use Socket
> + use Sys::Hostname
>
> + $addr = gethostbyname(hostname());
>
> Its fairly obvious you didn't test this...you're using gethostbyname()
> incorrectly. It returns a list, not a scalar value.
Um, no. It depends on the calling context. The following is quoted
from perlfunc:
"In scalar context, you get the name, unless the function was a lookup
by name, in which case you get the other thing, whatever it is."
Of course, the absence of semicolons on the first two statements rather
indicates that your presumption about testing is correct anyhow. :-)
#!/usr/local/bin/perl -w
use strict;
use Socket;
use Sys::Hostname;
my $addr = gethostbyname(hostname());
print join('.' => unpack 'C4' => $addr), "\n";
__END__
This worked for me on HP-UX (perl 5.002) with a static IP address, and
on Windows 95 (ActiveState perl 5.005_02) with a DHCP-assigned dynamic
IP address.
> Its also dependent upon how well Sys::Hostname does its magic. From
> the docs:
>
> It tries syscall(SYS_gethostname), `hostname`, `uname -n`, and the
> file /com/host. If all that fails it croaks.
>
> Not exactly portable... :(
Portable enough for my needs!
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Sat, 6 Feb 1999 08:35:31 +0100
From: "myname@mydomain.com" <elst.fels@nospam.ping.be>
Subject: is there a difference between extensions
Message-Id: <79gr98$bii$1@news3.Belgium.EU.net>
OK, this is probably a very simple question.
Often you see perl scripts with the extension .cgi in stead of .pl
Why do they do that has it got another purpose ?
THank you
Peter
------------------------------
Date: Sat, 06 Feb 1999 09:42:56 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: is there a difference between extensions
Message-Id: <36c00d6b.4444805@news.skynet.be>
Peter wrote:
>OK, this is probably a very simple question.
>Often you see perl scripts with the extension .cgi in stead of .pl
>Why do they do that has it got another purpose ?
Server configuration. The server may or may not be configured to allow a
script to run if the name has an extension ".pl", or ".cgi".
Perl itself couldn't care less. Note that many test scripts have the
extension ".t" (for "test"), and some authors use ".plx" for standalone
scripts as opposed to ".pl" for library files (for use with "require").
Bart.
------------------------------
Date: Sat, 06 Feb 1999 01:16:11 -0500
From: "Mr. Ozette Brown" <ozette@imaginative-creations.com>
Subject: Re: passing info from one script to another using POST
Message-Id: <36BBDE2B.58F5AA0A@imaginative-creations.com>
Alex,
The LWP module is your friend. Think of it like this, you have data in a
form that you wish to send. You need a script to receive this form data.
So, use 'use HTTP::Request::Common qw(POST);' to actually send the data
and CGI.pm to receive the form data.
That should get you started.
If you need any other help, let me know.
Thanks,
Ozette
Alex Guberman wrote:
> Hi,
>
> Would anyone know how to pass information from one Perl/CGI script to
> another using POST method. Another words, the first script would get
> the fields, read it, manipulate them and then pass it on to the second
> script to read it like it was passed from an HTML form in the first
> place.
>
> I know about the LWP module, but I can't figure out how to make it do
> this and if it can do it at all.
>
> Please help.
>
> regards,
> Alex Guberman
--
Mr. Ozette J. Brown <President>
Imaginative Creations <webmaster@imaginative-creations.com>
A Website Development and Consulting Company.
http://www.imaginative-creations.com
------------------------------
Date: Sat, 06 Feb 1999 04:27:10 GMT
From: Gene Wilburn <gwilburn@home.com>
Subject: Re: perl not always in /usr/bin/perl
Message-Id: <36BBC4A4.A8E99F7D@home.com>
One of my clients has /usr/local/bin/perl5 where I have /usr/bin/perl
To keep things simple, I created a sym link on my system of
/usr/local/bin/perl5 pointing to /usr/bin/perl
That way I could write it correctly for my client and test it locally
without having to remember to change it later.
Gene
Alan Diercks wrote:
>
> I have been been distributing a group of Perl scripts I have written to
> various
> Unix machines where the perl executable is not in /usr/bin/perl and
> I don't
> have permissionto make a soft link to its actual location.
>
> Is there a clever way to avoid having to edit all of my scripts to fix
> the
> #!/usr/bin/perl
> line at the top for each new installation?
>
> Thanks.
>
> -Alan
>
> diercks@nospam.astro.washington.edu
------------------------------
Date: Sat, 6 Feb 1999 00:44:41 -0600
From: "Glen Lee Edwards" <GLEdwards@christianfamilies.net>
Subject: PERL web ring script
Message-Id: <79go5l$bhc2@iac7.navix.net>
Anyone know where I can find a PERL web ring script to install on my Linux
server?
Thanks,
Glen
------------------------------
Date: Fri, 5 Feb 1999 21:21:55 -0700
From: "Michael Reinhart" <michael@webstead.com>
Subject: Perl,Win32 and UserAdmin ?
Message-Id: <79gfu4$u8f2@dagger.videotron.ab.ca>
Hi all... please don't flame me...I'm trying to learn.
I've downloaded and installed ActiveState Perl 5, and the UserAdmin scripts
from the O'Reilly book to my WinNT staging server (I've done the "hello
world") and am trying to progress to some of the UserAdmin tools. Judging
by the message I get when I try to run a script, Perl might not be finding
the UserAdmin Libraries.
The script contains this at line 5:
use Win32::UserAdmin;
and when I run it, I get this message:
Can't locate loadable object for module Win32::UserAdmin in @INC (@INC
contains: C:\Perl\lib C:\Perl\site\lib .) at C:\PERL\scripts\userperm.pl
line 5 BEGIN failed--compilation aborted at C:\PERL\scripts\userperm.pl
line5
Am I correct in assuming that the Win32 in this line refers to the Win32
directory beneath C:\perl\lib ? ... and that UserAdmin refers to the file
UserAdmin.pm in that directory? ... my search path includes C:\perl\lib, if
so, how come my script isn't finding this library?
Thanks.
michael reinhart
mreinhart@audg.gov.ab.ca
------------------------------
Date: 06 Feb 1999 01:09:21 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: Program needs compactification
Message-Id: <x7r9s4m5bi.fsf@home.sysarch.com>
>>>>> "PJK" == Peter J Kernan <pjk6@po.cwru.edu> writes:
PJK> This program prints the unique words in a file, one per-line.
PJK> The problem is, obviously, it is too verbose.
not really. the problem is that it is broken.
PJK> #!/usr/bin/perl -0anl012
the -0 sets $/ to the null byte so if your file had null bytes it would
print keys %{@F} once for each record. if you want to slurp the whole
file use -0777.
PJK> print for sort keys%{{@F}}
out of curiosity did you test this? do you realize that the array @F
will be used for both keys and values and your code therefore drops every
other word.
so here is a longer, working (and tested) version:
perl -la0777ne '@a{@F}=(); print for sort keys %a' file
it does a true file slurp, and gets all the values of @F as keys.
PJK> the readiness is all --Hamlet
so is correctness!
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: 6 Feb 1999 07:16:52 GMT
From: pjk6@po.cwru.edu (Peter J. Kernan)
Subject: Re: Program needs compactification
Message-Id: <79gq94$b60$1@pale-rider.INS.CWRU.Edu>
In article <79g8o0$lad$1@pale-rider.ins.cwru.edu>,
pjk6@po.cwru.edu (Peter J. Kernan) writes:
>
> This program prints the unique words in a file, one per-line.
> The problem is, obviously, it is too verbose.
>
[...snip...]
>
> #!/usr/bin/perl -0anl012
>
> print for sort keys%{{@F}}
I thank Uri Guttman, Perl Hacker, for Hire for pointing out a serious
flaw in my program. I recieved his email before my news server did
his post and am thus responding to myself here. The following version
preserves the original spirit and avoids the most serious problem.
#!/usr/bin/perl -0anl012
print for sort keys%{{@F,,@F}}
--
the readiness is all --Hamlet
------------------------------
Date: 06 Feb 1999 14:38:30 +0100
From: Jonathan Feinberg <jdf@pobox.com>
To: pete@theory2.phys.cwru.edu
Subject: Re: Program needs compactification
Message-Id: <m3yambejop.fsf@joshua.panix.com>
pjk6@po.cwru.edu (Peter J. Kernan) writes:
> The following version preserves the original spirit and avoids the
> most serious problem.
> #!/usr/bin/perl -0anl012
> print for sort keys%{{@F,,@F}}
Unless you consider the most serious problem to be that it simply
doesn't work for %50 of all possible inputs.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: Sat, 06 Feb 1999 09:17:39 -0500
From: Steve Palincsar <palincss@his.com>
Subject: Re: sending an attached file with Sendmail?
Message-Id: <36BC4F03.470A35DB@his.com>
Take a look at the perl Mime::Lite module. It works
well, is easy to use, and will teach you all you need
to know about mail attachments.
Artoo wrote:
>
> Hi All
>
> How can you send an attached file (text file) with sendmail and Perl?
>
> Thanks
> Artoo
------------------------------
Date: Sat, 6 Feb 1999 08:14:32 +0100
From: "myname@mydomain.com" <elst.fels@nospam.ping.be>
Subject: strict
Message-Id: <79gq1u$aih$1@news3.Belgium.EU.net>
Can anyone tell me what "strict" exactly does ?
Thanks,
Peter
------------------------------
Date: Sat, 6 Feb 1999 05:32:37 -0800
From: moseley@best.com (Bill Moseley)
Subject: Re: strict
Message-Id: <MPG.1125e44cc30c82689896a6@nntp1.ba.best.com>
In article <79gq1u$aih$1@news3.Belgium.EU.net>, elst.fels@nospam.ping.be
says...
> Can anyone tell me what "strict" exactly does ?
It's one of those thing you want especially if you don't now what it
does. I can't tell you exactly, but 'perldoc strict' can.
--
Bill Moseley mailto:moseley@best.com
------------------------------
Date: 06 Feb 1999 14:41:35 +0100
From: Jonathan Feinberg <jdf@pobox.com>
To: "myname@mydomain.com" <elst.fels@nospam.ping.be>
Subject: Re: strict
Message-Id: <m3socjejjk.fsf@joshua.panix.com>
"myname@mydomain.com" <elst.fels@nospam.ping.be> writes:
> Can anyone tell me what "strict" exactly does ?
perldoc strict
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: Sat, 06 Feb 1999 10:00:32 GMT
From: fanxin@mailcity.com
Subject: The order of form fields that recieve by cgi program
Message-Id: <79h3rt$jsl$1@nnrp1.dejanews.com>
Hi,there:
does here any experts know how to know the original order of html form
fields in the submitted html form after these data has been splitted to
an associated arrary in perl cgi program?
Thanks
fan
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sat, 06 Feb 1999 06:40:29 GMT
From: brian@brie.com (Brian Lavender)
Subject: Re: Unblessed reference error when using DBI::DBD
Message-Id: <36bbe37e.17479352@news.pacbell.net>
On Fri, 5 Feb 1999 20:36:41 GMT, Eric Bohlman <ebohlman@netcom.com>
wrote:
>Brian Lavender <blavender@spk.usace.army.mil> wrote:
>: Hello World!
>
>: Can't call method "prepare" on unblessed reference at test.pl line 11.
>
>
>: [wpc26: /spd/l2pmmbel]% cat test.pl
>: #!/usr/bin/perl
>
>: print "Hello World!\n\n";
>
>: use DBI 0.90;
>
>: my $dbh = DBI->connect('dbi:Oracle:l2cefmp1','l2pmmbel','xxxxx');
>: # Database Instance ^^^^^^ ^^^^^ password here
>
>You never bothered to check if you were able to make the connection. If
>you weren't, $dbh is certainly not going to be a blessed reference.
Would I check to see if I made the connection with the statement:
if (my $dbh = DBI->connect('dbi:Oracle:l2cefmp1','l2pmmbel','xxxxx'))
{
#code here
}
>: $dbh->{AutoCommit};
>
>This doesn't do anything.
>
>: my $query = "SELECT RR_NO FROM RECEIPT_VOUCHER";
>: my $sth = $dbh->prepare($query);
>: if ($sth -> execute) {
>: @row = $sth -> fetchrow_array;
>: print @row,"\n";
>: }
--------
Brian E. Lavender
http://www.brie.com/brian/
"For every complex problem, there is
a solution that is simple, neat, and
wrong." -- H. L. Mencken
------------------------------
Date: Wed, 03 Feb 1999 17:19:38 -0800
From: Siddharth Bajaj <sbajaj@verisign.com>
Subject: Using C-library in Perl?
Message-Id: <36B8F5AA.40781054@verisign.com>
Hi,
I was wondering if there is a way in which one can call C-library
routines in Perl or the other way embed Perl in C-programs.
If you could point me to a suitable reference/book, I'll aprreciate
that.
Regards,
Siddharth
------------------------------
Date: Sat, 6 Feb 1999 13:07:20 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Using C-library in Perl?
Message-Id: <F6qHs8.F7J@world.std.com>
Siddharth Bajaj <sbajaj@verisign.com> writes:
>I was wondering if there is a way in which one can call C-library
>routines in Perl or the other way embed Perl in C-programs.
>If you could point me to a suitable reference/book, I'll aprreciate
>that.
You can do either (or both)
Information on adding (usually C) compiled code to perl would be in
the perlxs and perlxstut man pages. This code can be dynamically
loaded if your OS allows it, statically linked otherwise.
Information on ebedding a C interpreter in a program is contained in
the perlembed man pages.
The perlguts man page and the book "Advanced Perl Programming" would
be of help to either situation.
--
Andrew Langmead
------------------------------
Date: Sat, 06 Feb 1999 09:35:46 GMT
From: mt@dev.null (Mads Toftum)
Subject: Re: Using HTTPS
Message-Id: <36be0cc3.36818906@news.inet.tele.dk>
Get Net::SSLeay from CPAN.
------------------------------
Date: 6 Feb 1999 05:37:04 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Using Perl to interrogate Hotmail
Message-Id: <slrn7bnlcp.pd6.fl_aggie@enso.coaps.fsu.edu>
On Fri, 05 Feb 1999 19:33:13 -0600, Scott Netterville
<knetter@nortelnetworks.com> wrote:
+ This is a multi-part message in MIME format.
AIIIIIIIIIEEEEEEEEEEEEEEEEEE!!!!!!!!!!!!!!! Please please please turn off
your vcard!
+ Abigail wrote:
+ > use LWP::UserAgent;
+ I've used Net::POP3 for a net@ddress account. It was fairly straightforward.
+ Search on libnet on CPAN.
Hotmail charges money to grant access to one's mailbox via POP3. Most
of us cheap bast...err...skin flint...err...savvy consumers will have
to use LWP to access hotmail.
James
------------------------------
Date: Sat, 6 Feb 1999 00:23:19 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: What's happening with this hash?
Message-Id: <1dms04y.141xgn36ox6scN@roxboro0-021.dyn.interpath.net>
Ronald J Kimball <rjk@linguist.dartmouth.edu> wrote:
> John Moreno <phenix@interpath.com> wrote:
-snip-
> > for (0..$i) {
> > $hash{$i}{'test'}++;
> ^^^^^^^^^
>
> This is a symbolic reference. As explained above, every value in %hash
> is 1. Thus, regardless of the value of $i, the above line is equivalent
> to:
>
> $1{'test'}++;
So, what I was trying to do should have been $$hash{$i}{'test'}++.
> > I know hashes aren't my strong suit, but I can't figure out what's going
> > on. Could someone please tell me what I'm doing wrong?
>
> This is more a problem with references than with hashes. :-)
I'd say that's not my strong suit either, but someone would be bound to
ask what it was, and it'd be embarrassing to admit that I don't have
one.
--
John Moreno
------------------------------
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 4837
**************************************