[11846] in Perl-Users-Digest
Perl-Users Digest, Issue: 5446 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 21 22:07:30 1999
Date: Wed, 21 Apr 99 19: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 Wed, 21 Apr 1999 Volume: 8 Number: 5446
Today's topics:
ANNOUNCE: PFR Reopened :-) <dgris@moiraine.dimensional.com>
anon subs compiled only once, was Re: How to make an ar (Andrew Allen)
Re: anon subs compiled only once, was Re: How to make a <tchrist@mox.perl.com>
Re: attach a subroutine to a filehandle (Corey Saltiel)
Re: Close pipe to sendmail? <peter@berghold.net>
Database Converter <webdude@mcminn.net>
Re: FAQ 4.11: How do I find the current century or mill (Andrew Allen)
Re: FAQ 4.11: How do I find the current century or mill <tchrist@mox.perl.com>
Re: FAQ 4.5: Why doesn't & work the way I want it to? <rick.delaney@home.com>
Re: FAQ 4.9: Why aren't my random numbers random? (Andrew Allen)
Re: for (my $i;;) doesn't work like I think it should (M.J.T. Guy)
Generating a unique string for order number <gregm@well.com>
Re: Getting file creation date using perl <caw@belloc.med.monash.edu.au>
help! file upload from web <cweiss@netex.com>
How can I do wildcard file test? <mark.silverblatt@boeing.com>
Re: How to get rid of the tailing spaces? (Abigail)
Re: How to make an array name to be a variable? <cassell@mail.cor.epa.gov>
Re: last item in associative array. (Abigail)
loading a html file in perl <klumsy@xtra.co.nz>
Re: need help with Net::SSLeay 1.03 installation under <witless@my-dejanews.com>
Need to parse exported table from access <pamelag@interlog.com>
Re: scriptlet to add line breaks at even multiples? <clarked@hunterdon.csnet.net>
Silicon Valley Perl Mongers Group fxia@yahoo.com
Re: The question about debug and design <grelbr@his.log>
Re: The question about debug and design <grelbr@his.log>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 20 Apr 1999 14:10:51 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: ANNOUNCE: PFR Reopened :-)
Message-Id: <m3hfqbf3xw.fsf@moiraine.dimensional.com>
I've managed to recover somewhat from last month's disk
failure, and the Perl Function Repository is once again
up and running at
<URL:http://moiraine.dimensional.com/~dI'll be pulling more off of DejaNews tonight.
If you have code that should be added to the repository,
please post it to comp.lang.perl.misc or mail it directly
to me at dgris@moiraine.dimensional.com.
Have the appropriate amount of fun. :-)
dgris
--
Daniel Grisinger dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: 22 Apr 1999 00:40:12 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: anon subs compiled only once, was Re: How to make an array name to be a variable?
Message-Id: <7flr5c$gmt$1@fcnews.fc.hp.com>
Tom Christiansen (tchrist@mox.perl.com) wrote:
: @colors = qw(red blue green yellow orange purple violet);
: for my $name (@colors) {
: no strict 'refs'; # renege for the block
: *$name = sub { "<FONT COLOR='$name'>@_</FONT>" };
: }
: All those functions (red(), blue(), green(), etc.) appear to be separate,
: but the real code in the closure actually was compiled only once.
Does "compiled only once" also imply there is only one "copy" of the
anonymous sub? If so, this makes closures all the more cool-- makes me
feel much better about all those "subs in loops" used frequently in Tk
(if you've ever binded a large number of tags in a Text widget, you
know the uncomfortable feeling...). I always thought I was getting a
shiny-new sub and chewing up memory, and frequently opted to pass a
reference to a named sub.
Do I dare ask what sort of behind-the-scenes action enables this? Is
there a hidden pointer to the "lexical stack" attached to anonymous
subs?
Andrew
------------------------------
Date: 21 Apr 1999 19:27:50 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: anon subs compiled only once, was Re: How to make an array name to be a variable?
Message-Id: <371e7b16@cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
ada@fc.hp.com (Andrew Allen) writes:
:Does "compiled only once" also imply there is only one "copy" of the
:anonymous sub?
Yes, that's right. A closure comprises the code itself, compiled at
compile-time (of course) and once only -- plus a shiny new copy of its
lexical bindings. They aren't cheap, but it's better than nothing.
:Do I dare ask what sort of behind-the-scenes action enables this? Is
:there a hidden pointer to the "lexical stack" attached to anonymous
:subs?
Oh, something like that, but it's a bit fancier. APP has a bit about
this, and you can always yourself paw through the pad code (not vice
versa :-) for real illumination. :-)
--tom
--
": fighting for peace is like fucking for virginity (ado@bigcomm.gun.de)
Yes, but I did manage to increase the amount of virginity in the world
by that method." --Larry Wall
------------------------------
Date: Thu, 22 Apr 1999 01:03:10 GMT
From: corey@americanrecruitment.com (Corey Saltiel)
Subject: Re: attach a subroutine to a filehandle
Message-Id: <slrn7hst32.bf.corey@valis.americanrecruitment.com>
On Mon, 19 Apr 1999 17:01:41 -0700, Andrew Perrin wrote:
>I'm afraid I don't really get what you're trying to do, but here are some
>thoughts:
>
>1.) How about having your sub read the information into an array instead of
>the sort of virtual filehandle you're trying to produce, then do your
>operations on the array? It's quite simple to pass the array back and forth.
>
<snip>
OK - hope I'm not being a royal dunce here ...
Here is a fundamental, simplified & related example of what I'm
attempting to ultimately accomplish:
I'm sure if I can figure out the below, I'll have my origional
question solved. ( which is pasted at the end of this for
reference sake )
I guess to clarify:
How do I store/manipulate data from a subroutine which simply prints
to STDOUT ( or prints due to a side affect - like when printing to a
pipe that returns data ).
Or:
Is it possible to 'return' STDOUT into an array ( or something ) so
I can step through it line-by-line, like what one would do with a
filehandle?
#!/usr/bin/perl
@output = ( print "a few\nlines worth\nof\nstuff\n" );
foreach $value (@output) {
print("line is \"$value\"\n");
}
What I'd *like* to see returned here is:
line is "a few"
line is "lines worth"
line is "of stuff"
But what I get instead is:
a few
lines worth
of
stuff
line is "1"
Seems that the assignment causes the code to run, then stores '1'
( success ) to @output ( $output[0] )...
Not at all what I want.
What do I got to do here? -- please refer me to any documentation,
I'm sure I've managed to miss this particular ( simple ) feat in
the docs somewhere.
Many thanks for bearing with me on this!
Beers,
Corey
>Corey Saltiel wrote:
>
<snip>
>>
>> All I want is to create a pipe which I print a command to, then
>> be able to read the resulting output of that pipe, line-by-line.
>>
>> Here's code:
>>
>> #!/usr/local/bin/perl
>>
>> package EventEmails;
>>
>> $| = 1;
>>
>> sub TIEHANDLE { my $i; bless \$i, shift }
>>
>> sub READLINE {
>>
>> print SQLPLUS <<"EOF";
>>
>> select stuff from table;
>>
>> EOF
>>
>> #exit; <<--- !
>>
>> };
>>
>> tie(*QUERY,'EventEmails');
>>
>> open(SQLPLUS, '|sqlplus') or
>> die "Could not open pipe to sql*plus: $!\n";
>>
>> while (<QUERY>) {
>>
>> print "\$_ is $_"; <<--- ?!
>>
>> }
>>
>> All I want ( as can hopefully be seen ) is to simply
>> grab the output of the sql query and parse it. (!!)
>>
<snip>
>> This *couldn't* be too difficult a task, what am I not
>> understanding here?
>>
------------------------------
Date: Thu, 22 Apr 1999 01:50:13 GMT
From: "Peter L. Berghold" <peter@berghold.net>
Subject: Re: Close pipe to sendmail?
Message-Id: <371E8052.AE039BAE@berghold.net>
Rick Freeman wrote:
> What are the advantages and disadvantages of closing or not closing a
> pipe/filehandle to sendmail in a loop that sends a few hundred email
> messages?
>
Can't say that I'd prefer one method over the other given the choices
above. I usually use Net:::SMTP to do my mailing from Perl.
--
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold Peter@Berghold.Net
"Linux renders ships http://www.berghold.net
NT renders ships useless...." ICQ# 11455958
------------------------------
Date: Thu, 22 Apr 1999 01:01:27 GMT
From: "JJ" <webdude@mcminn.net>
Subject: Database Converter
Message-Id: <HxuT2.2394$94.998891@news1.usit.net>
I am trying to convert letters in a database into words for output to a
webpage..ie First field of database might be ^DJI to Dow Jone Industry..Next
line of database ^IXIC to NASDAQ.. (its a flat database)
Is this possible?
------------------------------
Date: 22 Apr 1999 00:53:08 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: Re: FAQ 4.11: How do I find the current century or millennium?
Message-Id: <7flrtk$gmt$2@fcnews.fc.hp.com>
Tom Christiansen (perlfaq-suggestions@perl.com) wrote:
: sub get_century {
: return int((((localtime(shift || time))[5] + 1999))/100);
: }
: sub get_millennium {
: return 1+int((((localtime(shift || time))[5] + 1899))/1000);
: }
my simple brain finds the following easier to understand (removed a
redundant paren pair too):
return int(((localtime(shift || time))[5] + 1900 + 99)/100);
and
return int(((localtime(shift || time))[5] + 1900 + 999)/1000);
Andrew
------------------------------
Date: 21 Apr 1999 19:29:22 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: FAQ 4.11: How do I find the current century or millennium?
Message-Id: <371e7b72@cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
ada@fc.hp.com (Andrew Allen) writes:
:: return int((((localtime(shift || time))[5] + 1999))/100);
:: return 1+int((((localtime(shift || time))[5] + 1899))/1000);
:
:my simple brain finds the following easier to understand (removed a
:redundant paren pair too):
:
: return int(((localtime(shift || time))[5] + 1900 + 99)/100);
: return int(((localtime(shift || time))[5] + 1900 + 999)/1000);
But that code is different. You just put us in the third
millennium already. :-)
--tom
--
X-Windows: The defacto substandard.
--Jamie Zawinski
------------------------------
Date: Thu, 22 Apr 1999 01:39:10 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: FAQ 4.5: Why doesn't & work the way I want it to?
Message-Id: <371E7D52.3E22365A@home.com>
[posted & mailed]
Tom Christiansen wrote:
>
> So, saying `11 & 3' performs the "and" operation on numbers
> (yielding `1').
11 & 3 yields 3.
> Saying `"11" & "3"' performs the "and" operation on strings
> (yielding `"1"').
Drat, there goes the symmetry. Perhaps 13 and 3 would be better.
So, saying `13 & 3' performs the "and" operation on numbers
(yielding `1'). Saying `"13" & "3"' performs the "and" operation on
strings (yielding `"1"').
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: 22 Apr 1999 00:58:47 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: Re: FAQ 4.9: Why aren't my random numbers random?
Message-Id: <7fls87$gmt$3@fcnews.fc.hp.com>
Just a nit:
David Cassell (cassell@mail.cor.epa.gov) wrote:
<snip>
: print "Uh oh! Looks like your computer uses the ANSI example.\n"
need a semi-colon at the end there. ^
Andrew
------------------------------
Date: 22 Apr 1999 00:02:30 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: for (my $i;;) doesn't work like I think it should
Message-Id: <7floum$30v$1@pegasus.csx.cam.ac.uk>
In article <7fl5ml$i4k$1@nnrp1.dejanews.com>, <raylutz@adaptra.com> wrote:
> mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote:
>> >The only difference between pass one and two is the 'my' in the for().
>> >According to the perl docs I've read, these SHOULD do the same thing.
>>
>> Only in versions 5.004 and later of Perl.
>>
>> And I also note you aren't using -w - that code gives a warning
>> (which in the example is harmless).
>
>I always use -w, and my interpreter doesn't produce any warnings...
>Otherwise, I wouldn't have spent so much time finding this silly bug.
Hah! Yet another thing wrong with versions of Perl < 5.004. Doesn't
produce warnings when it ought.
Upgrade! Upgrade! Upgrade!
Mike Guy
------------------------------
Date: Wed, 21 Apr 1999 18:48:43 -0700
From: Greg McCann <gregm@well.com>
Subject: Generating a unique string for order number
Message-Id: <371E7FFB.55FB2A33@well.com>
I'm working on an e-commerce application where I would like to generate a
unique, mostly numeric string for a new order number.
Here are some of the possibilities I have considered. I don't think that any of
these alone are sufficient but combining two of them may give me something close
to what I want. I would appreciate any suggestions or insights into this
problem.
time - I think this is a good start, but not to be used alone since two
customers may submit an order at the same time (within the same second).
rand - May be good concatenated with time. I'm a little afraid of creating a
duplicate order number one in a gazillion times though.
ip address - Bad. Users behind a firewall may all have the same apparent ip
address.
$$ (process id) - May be good concatenated with time. It's especially nice on a
*nix system, since it returns numbers that don't repeat for a long time. On my
NT system though, it is a pattern that repeats within 10-20 numbers.
Thanks,
Greg
--
======================
Gregory McCann
http://www.calypteanna.com
"Be kind, for everyone you meet is fighting a great battle." Saint Philo of
Alexandria
------------------------------
Date: Thu, 22 Apr 1999 10:22:05 +1000
From: "Chris Wright" <caw@belloc.med.monash.edu.au>
Subject: Re: Getting file creation date using perl
Message-Id: <7flqam$5u6$1@towncrier.cc.monash.edu.au>
[courtesy cc of this posting sent to cited author by email]
Tom Christiansen <tchrist@mox.perl.com> wrote in message
news:371cac6d@cs.colorado.edu....
>
> ("a html"? -- you mean "an html".)
and also wrote...
> Now, which of those fields from eihter list hold the creation date?
^^^^^^
As a total perl newbie, I am very grateful for all the effort you have put
in. Bought the books, read the pod. Used many of the generic ideas in my
Python stuff.
I can only imagine the frustration experts must feel in dealing with people
who will NOT look at the manual, will not post to the correct group, who
have not read the _same day's_ postings and who expect it all for nought.
Even more can I understand the frustration of those who have produced
comprehensive, clear, humourous and helpful documentation (both free and
commercial) and who provide outstanding, instructive code. But
sheeeesh......
------------------------------
Date: Wed, 21 Apr 1999 18:31:58 +0100
From: "Chris Weiss" <cweiss@netex.com>
Subject: help! file upload from web
Message-Id: <7fln3f$inr$1@ux2.accesscom.net>
hi all, i've been going at this all day and need help (code to follow). i'm
sending a file up to the web, and the following is displayed (# denotes
comments added here):
28 #bytes read
28 #length of buffer
q q q q q q q q q q #buffer before file write (spaces are a new line feed)
q q q q q q q q q q #buffer after file write
closed posted #file closed
File Name: C:\WINNT\Profiles\chris\t.txt uploaded successfully!
t.txt
C:\temp\CGItemp4180001 #temp file (which is correct, just before deletion)
what is happening is that when i write to the file which i am creating, i'm
getting character added (\t, i suspect) that is fouling the file. the above
example consists of a file with 9 lines, a single character on each (28
bytes). when i save to my file, it becomes 37 bytes, with a blank line
between each line. the temp file created by CGI does not have the extra
values added, what i want. my two questions are these:
1. where in
$CGI::revision = '$Id: CGI.pm,v 1.5 1998/12/06 10:19:48 lstein Exp $';
$CGI::VERSION='2.46';
should i look to find the post file storage routine? (line number?) and how
can i redirect the storage to a permanent place (not to a temp file)? it
seems wasteful to write the buffer twice.
2. what am i doing wrong to cause the extra characters?
it is driving me mad! :(
here's my code:
#!/usr/local/bin/perl
use CGI qw/:standard/;
$CGI::POST_MAX=1024 * 10000; # max 10000K posts
$root = 'C:/temp/';
$username = param('username');
$posted_file_name = param('file_name');
$_ = $posted_file_name;
@file = split /\\/;
$file_name = @file[@file-1];
&Print_Error if($posted_file_name eq "");
&Print_Results;
sub Print_Results{
mkdir($root . $username , 777);
$time = time();
mkdir($root . $username . "/" . $time, 777);
$full_dat_path = $root . $username . "/" . $time . "/" . $file_name;
print header();
print start_html('File Upload Test');
if ( open (UPLOAD, ">>" . $full_dat_path) ) {
while($bytes = read($posted_file_name, $data, 1024)) {
print $bytes . "<BR>\n";
print length($data) . "<BR>\n";
print $data . "<BR>\n";
print UPLOAD $data;
print $data . "<BR>\n";
}
#The data file has all of the fields of the form added to it.
#if (length($data) == 1024) {
# print UPLOAD substr($data,0,-2);
#}
#else {
# print UPLOAD substr($data,0,length($data)-1);
#}
#}
close $posted_file_name;
print "closed posted";
#$temp = tmpFileName();
#rename (&temp, $full_dat_path);
}
print "<PRE><B>File Name:</B> $posted_file_name uploaded sucessfully!\n";
print "<A HREF=\"/myfiles/" . $username . "/" . $time . "/" . $file_name .
"\">" . $file_name . "</A>";
print "</PRE>";
print end_html;
} # End of subroutine.
sub Print_Error {
print "Content-type: text/html\n\n";
print "<p>Field 'File Name' must be filled in for
this script to work properly.</p>\n" ;
exit 0;
}
thank you for any help,
--chris
------------------------------
Date: Wed, 21 Apr 1999 23:46:31 GMT
From: Mark Silverblatt <mark.silverblatt@boeing.com>
Subject: How can I do wildcard file test?
Message-Id: <371E6357.52BF@boeing.com>
Relative Perl newbie will be very grateful for
any advice. Direct EMail reply w/b most appreciated.
Have a Perl5 script doing testing for existence of
specific files, i.e.---
if (-e ($fileBase.".jpg")) { do this ) ;
if (-e ($fileBase.".gif")) { do that ) ;
and where $fileBase is a path, like-
'/usr/web/htdocs/[category]/[subject]
Works fine, but this stuff is inside nested loops looking for
many allowable file name extensions within large numbers of
[subjects] within many [categories].
Wanna speed it up by first testing for...
if (-e ( $fileBase. 'ANYTHING' )) { do something ) ;
...i.e., for ANY extension, OR for a file named $fileBase
with NO extension (to include a directory named $fileBase)
Simple * wildcard doesn't work. Globbing syntax gleaned
from the O'Reilly books doesn't seem to work with the -e
"file exist?" operator. My extreme ignorance serves to
exacerbate the problem. Help!
Many TIA for any advice you can share.
--
mark.silverblatt@boeing.com
aka webadm@flythru.boeing.com
------------------------------
Date: 22 Apr 1999 01:52:33 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: How to get rid of the tailing spaces?
Message-Id: <7flvd1$6mq$2@client2.news.psi.net>
du_bing@my-dejanews.com (du_bing@my-dejanews.com) wrote on MMLIX
September MCMXCIII in <URL:news:7fl6ao$io1$1@nnrp1.dejanews.com>:
`` Hello there,
``
`` $test="hello ";
``
`` What's the best way to get rid of those extra spaces in the string $test to
`` make it like "hello".
I'd suggest:
$test = "jello"; # Now it looks like hello.
Abigail.
--
perl -wle\$_=\<\<EOT\;y/\\n/\ /\;print\; -eJust -eanother -ePerl -eHacker -eEOT
------------------------------
Date: Wed, 21 Apr 1999 17:18:09 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: How to make an array name to be a variable?
Message-Id: <371E6AC1.DCBE8724@mail.cor.epa.gov>
Tom Christiansen wrote:
> [snip here]
>
> I don't know why people are always thinking about this problem in a
> broken way. I really don't. This question is asked every day around
> here. And no, I am not exaggerating.
I only wish you were exaggerating. But I have an idea. This is
how people write code in some other languages. They don't know
better. And they don't really know about hashes, because they haven't
learned enough about them yet.
> If you know why people want to do the wrong thing, tell me. Meanwhile,
> read the long answer from the FAQ.
>
> [BIG snip here]
On the other hand, it might be that Bill Gates is sick and tired of
you blasting his products, and is paying people all over the globe to
ask this question again and again until you have a nervous breakdown
and begin shouting random perlvars at people passing on the street.
You know, like being in New York City every day. :-)
David
--
David Cassell, OAO
cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541)
754-4468
mathematical statistician fax: (541)
754-4716
------------------------------
Date: 22 Apr 1999 01:46:21 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: last item in associative array.
Message-Id: <7flv1d$6mq$1@client2.news.psi.net>
Multimax (multimax@mulmax.com) wrote on MMLIX September MCMXCIII in
<URL:news:multimax-2104991608420001@read-rfc1918-for-details.iana.net>:
%% How can I find the last item in an associative array?
"last" implies an ordering. There is no implicite ordering in a hash.
Abigail
--
perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'
------------------------------
Date: Wed, 21 Apr 1999 05:25:34 -0700
From: karl prosser <klumsy@xtra.co.nz>
Subject: loading a html file in perl
Message-Id: <371DC3BD.276B32D0@xtra.co.nz>
a quick question:
I want my perl program to load (or redirect) to another HTML file after
some cacluatiing
(i don't want to display any HTML)
currently i can produce and return HTML, process my CGI vars, but i just
want it not to display anything but load another html file. help (i am
new to Perl)
if worst comes to worst i'll have my perl program create a html file
with javascript inside to automatically redirect to where i want to go..
but I think there must be a better way than that
could you please answer directly to me.
Karl Prosser
klumsy@xtra.co.nz
btw, have a good day. you deserve one.
------------------------------
Date: Thu, 22 Apr 1999 01:33:17 GMT
From: Witless <witless@my-dejanews.com>
Subject: Re: need help with Net::SSLeay 1.03 installation under Win32
Message-Id: <7flu8u$932$1@nnrp1.dejanews.com>
Got this from Krass in another posting.
On the Winows platform (using ActiveState Perl for example, installed as is),
you need only the following to get a page from HTTPS server, meanwhile
authenticating with basic authentication:
******
use Win32::Internet;
$URL = "https://username:password\@www.secureserver.com";
$I = new Win32::Internet();
$I->OpenURL($U, $URL);
$file = $U->ReadEntireFile();
$U->Close();
$I->Close();
print $file;
In article <7eue9u$7oo@gutter.its.csiro.au>,
mbk@cbr.dit.csiro.au (Martin Kuchlmayr) wrote:
> AZ <abcz@my-dejanews.com> writes:
>
> >Please, help....
> >Need Makefile and instructions to install Net:SSLeay version 1.03 under
> >Win95/NT with VC++.
> >Thanks.
>
> The *.tar.gz (see Note 1) file should include a Readme file which
> tells you how to install the package. The section labled
> "Prerequisites" tells you that you need to first install OpenSSL or
> SSLeay.
>
> The section labled "Installing" tells you that you need to run
> "./Makefile.PL -t".
> This will generate a makefile for you (and run it as far as I can
> tell). However you may need to run this command as:
> "Perl ./Makefile.PL -t"
> if the "#!" path is not correct in Makefile.PL (ask a unix-head to
> explain "#!"'s to you if it is not clear - or just run this second
> form of the command wiithout worrying about what "#!"'s are.)
>
> Installing OpenSSL or SSLeay has its own problems - ones that I never
> resolved. Someone posted a solution though. Search for SSL on this
> newsgroup or on Dejanews. The reply was fairly recent (March-April
> 99).
>
> NOTE 1: Most places you download perl packages will have them as
> *.tar.gz files. Get it from one of these places (eg the Australian
> mirror "ftp://mirror.aarnet.edu.au/pub/perl/CPAN/modules/by-module/")
> and it will have the Readme files and the Makefile.PL file.
>
> Hope this helps, Martin.
>
>
--
If nothing goes wrong on the first run, you must be using some sample
code...
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 21 Apr 1999 20:49:58 -0400
From: "Pamela Goldfarb" <pamelag@interlog.com>
Subject: Need to parse exported table from access
Message-Id: <7flrng$7m5$1@news.interlog.com>
I am storing an exported access table on my web server. It is an ascii file
with comma delimited fields and with strings enclosed with "".
The strings can contain commas, quotation marks, and new-lines. There can
also be blank fields.
Example (each data record, has three fields: a numeric, followed by a
string, followed by a numeric)
123, "abc", 456,
124, "first word then
newline", 888,
125, "first word ""quoted"" end
,,,", 999
I want to create a perl script that can parse this data into an array of
fields that can then be searched, processed, etc. and the outputted to a
html file.
I am having trouble constucting the appropriate parsing code. In particular
the fact that there may be multiple lines in the datafile that make a whole
data line.
Since this is MS Access outputted data, I would think that perl code to do
what I want already exists, can someone
point me to where I can find such code?
Thanks!
------------------------------
Date: Tue, 20 Apr 1999 22:55:01 -0400
From: "David Clarke" <clarked@hunterdon.csnet.net>
Subject: Re: scriptlet to add line breaks at even multiples?
Message-Id: <924745733.813.48@news.remarQ.com>
Counsel.Net wrote in message <371C263B.A747D8FA@counsel.net>...
>Hi all,
>
>Is there a simple solution for adding linebreaks on long fields? I have
>a field fed by a web form which I want to wrap at about 80 characters.
You might also try write, and formatted output. I know that it is not a
regexp, but it does split output at word boundaries.
You will have to deal with a filehandle though, not a variable.
------------------------------
Date: Thu, 22 Apr 1999 00:55:58 GMT
From: fxia@yahoo.com
Subject: Silicon Valley Perl Mongers Group
Message-Id: <7fls2t$7b6$1@nnrp1.dejanews.com>
Silicon Valley Perl Mongers Group
At last! A Perl Mongers group in the heart of Silicon Valley!
ANY IDEAS AND SUGGESTIONS ARE VERY WELCOME!
Web: http://www.rf.net/~sv-pm-org
Charter: Meet monthly to lecture/discuss/heckle Perl issues, like
mod_perl, CGI, DBI, LDAP, I18N, security, etc.
Organizers: James and Fred
Location: Netscape Bldg 22, Sputnik Room (Cafeteria Bldg), 468 Ellis
St. near East Middlefield, Mountain View, CA
Next Meeting:TBA
Sponsors: Thanks to Netscape for the meeting room and RF.net for web
hosting
Upcoming Local Open Source Events:
San Francisco Perl Mongers Group, May
Silicon Valley Linux Users' Group, May
Upcoming Local Commercial Events:
O'Reilly Perl Tutorials, May 4-5, Santa Clara
O'Reilly Perl Conference, August 21-24, Monterey
Official Directions to Netscape:
FROM 280: Take Hwy. 85 North toward Mountain View. Take the 237/101 South
exit. Take the Middlefield/Maude exit. At the end of the off ramp, turn
left at the light onto Middlefield. Go through the light at Ferguson.
Turn right at the next light onto Ellis. Turn left at the tan stone wall
with the big Netscape logo for entrance to that portion of the Netscape
campus. The meeting will be in the Sputnik conference room in Bldg. 22.
Go into the side entrance which faces Bldg. 21. The actual street address
of Bldg. 22 is 468 Ellis, but you cannot easily see the building from
Ellis.
FROM 101 Northbound (coming from the south): Take the Ellis Street exit.
At the end of the off ramp, turn left onto Ellis. Turn right at the tan
stone wall with the big Netscape logo for entrance to that portion of the
Netscape campus. The meeting will be in the Sputnik conference room in
Bldg. 22. Go into the side entrance which faces Bldg. 21. The actual
street address of Bldg. 22 is 468 Ellis, but you cannot easily see the
building from Ellis.
FROM 101 Southbound (coming from the north): Take the Ellis Street exit.
At the end of the off ramp, turn right onto Ellis. Turn right at the tan
stone wall with the big Netscape logo for entrance to that portion of the
Netscape campus. The meeting will be in the Sputnik conference room in
Bldg. 22. Go into the side entrance which faces Bldg. 21. The actual
street address of Bldg. 22 is 468 Ellis, but you cannot easily see the
building from Ellis.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 21 Apr 1999 20:28:35 -0400
From: Grelbr <grelbr@his.log>
Subject: Re: The question about debug and design
Message-Id: <371E6D33.DE7E2A5C@his.log>
Thomas Eichberger wrote:
>
> Design: read the books from Peter Coad:-)
Could you please remind me of the title of that book?
Thanks.
------------------------------
Date: Wed, 21 Apr 1999 20:35:00 -0400
From: Grelbr <grelbr@his.log>
Subject: Re: The question about debug and design
Message-Id: <371E6EB4.FC51EE55@his.log>
Carfield Yim wrote:
> How can I train my design and debug skill?
There are *many* books on this subject, and loads of them
are extremely good, and other loads are extremely bad.
You want to read the C++ FAQ Lite at this URL.
http://www.cerfnet.com/~mpcline/c++-faq-lite/index.html
Look especially at the books suggested. Also, get
yourself a copy of Code Complete.
In general, becoming a good designer and coder is a
question of attitude and work. You will *not* become
good in a few days, nor even a few months unless you
are very unusual. The idea is to keep learning, pick
up new ideas, and grow your skill over time.
Probably there is no single ideal way to do this. But
some important aspects are:
- Do projects, code stuff, make programs. Coders code.
- Read books on the topic. Books, not book.
- Find somebody who is good, and learn from them. This
can be a course at a school, work experience, or your
pal down the street who is a coder.
- Look at how others have coded and compare. See what is
easier to understand, what is easier to maintain, what
runs better, what has fewer errors, what was coded with
less effort and in less time, etc.
- Don't *ever* think you have learned it all. Don't ever
think it is time to stop learning.
------------------------------
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 5446
**************************************