[8854] in Perl-Users-Digest
Perl-Users Digest, Issue: 2471 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 1 10:05:21 1998
Date: Fri, 1 May 98 07:00:54 -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 Fri, 1 May 1998 Volume: 8 Number: 2471
Today's topics:
"use strict" complains about GetOptions variables <jbosser@ibm.net>
Re: "use strict" complains about GetOptions variables <gbarr@ti.com>
Re: "use strict" complains about GetOptions variables <jdf@pobox.com>
Re: 1701 days hath September (was: Re: rename funciton) (John Porter)
Adding 600 users to a Linux password file <wiebe@worldcom.nl>
Re: Berkeley DB support <pmarquess@bfsec.bt.co.uk>
comp.lang.perl.misc (was Re: Credit Card Verification s (Bart Lateur)
Re: Credit Card Verification scripts? (John Porter)
Re: Credit Card Verification scripts? (John Porter)
Re: Easy Question?? (Hunter Johnson)
email attachments <rob@imedianet.com>
Re: Env package Q (Mark-Jason Dominus)
Evaluation of hex character representation in double q <gmorgan@photogrpahics.co.uk>
Excel via cgi <Pat_kane@compuserve.com>
Re: How do I print an array in the format I want it? <jdf@pobox.com>
Re: http Reg Exp (Andrew M. Langmead)
Re: HTTP Request Headers <dj@delorie.com>
Re: HTTP Request Headers (Spike Hernandez)
Re: Looking for an idiom (cf. Schwartzian Transform) (Tony Bass)
Re: Looking for an idiom (cf. Schwartzian Transform) <merlyn@stonehenge.com>
perl 5.004 extensions (Irene Barg)
Re: Perl/Wall lingo question (Bart Lateur)
Re: push @strArray, (24..31); <webmaster@fccjmail.fccj.org>
Re: push @strArray, (24..31); <webmaster@fccjmail.fccj.org>
Re: push @strArray, (24..31); (John Porter)
Re: Q: COM vs. Excel AddIns (Jan Dubois)
Safest way to read from a socket? <horowitz@ulb.ac.be>
Re: visual basic replacement (Jan Dubois)
Re: Win32 reading in passwords (Martien Verbruggen)
Re: Win32 reading in passwords (Michael Rubenstein)
Re: Win32 reading in passwords scott@softbase.com
Re: Win32::NetResource::AddConnection exhibiting undocu <david.richards@alderley.zeneca.com>
Re: Win32::NetResource::AddConnection exhibiting undocu (Jeffrey R. Drumm)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 01 May 1998 00:24:20 -0700
From: John Bossert <jbosser@ibm.net>
Subject: "use strict" complains about GetOptions variables
Message-Id: <354978A4.D9829380@ibm.net>
If I (per the Perl Bibles) specify "use strict;", perl complains about
the "$opt_foo" variables I'm
referencing within a GetOptions() call.
How should I declare these variables so as to get past the "strict"
enforcement? TIA.
--
====================================================================
John Bossert email: jbossert@dazel.com
Systems Engineer voice: 425.462.2060
Dazel Corporation fax: 425.462.2064
800 Bellevue Way NE, Suite 400 pager: 800.SKY.PAGE pin 1454252
Bellevue, WA 98004 URL: http://www.dazel.com
------------------------------
Date: Fri, 01 May 1998 08:07:15 -0500
From: Graham Barr <gbarr@ti.com>
Subject: Re: "use strict" complains about GetOptions variables
Message-Id: <3549C903.846EC192@ti.com>
John Bossert wrote:
>
> If I (per the Perl Bibles) specify "use strict;", perl complains about
> the "$opt_foo" variables I'm
> referencing within a GetOptions() call.
>
> How should I declare these variables so as to get past the "strict"
> enforcement? TIA.
at the top of your script type
use vars qw($opt_foo);
or read the manpage for GetOptions to see other ways to get
option values.
--
Graham Barr <gbarr@ti.com>
Life would be so much easier if we could just look at the source code.
------------------------------
Date: 01 May 1998 09:47:41 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: jbosser@ibm.net
Subject: Re: "use strict" complains about GetOptions variables
Message-Id: <1zuegi9e.fsf@mailhost.panix.com>
[posted and mailed]
John Bossert <jbosser@ibm.net> writes:
> If I (per the Perl Bibles) specify "use strict;", perl complains
> about the "$opt_foo" variables I'm referencing within a GetOptions()
> call.
This question was just asked and answered yesterday. I mention that
*not* to flame you, but to give you the idea that you can often get
instant gratification with a DejaNews search. Look into the vars
pragma...
$ perldoc vars
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
------------------------------
Date: Fri, 01 May 1998 12:46:34 GMT
From: jdporter@min.net (John Porter)
Subject: Re: 1701 days hath September (was: Re: rename funciton)
Message-Id: <MPG.fb38fbd4135e4698968c@news.min.net>
On Wed, 29 Apr 1998 23:19:50 -0400,
in article <3547EDD6.2BBE@juicepigs.com>,
sowmaster@juicepigs.com (Bob Trieger) wrote:
> Moderation = censorship in my eye
That's not a commonly help opinion. You may be on your on that one,
more or less. People have been living happily with moderation
for almost as long as usenet has been around.
> c.l.p.m is
> a community and we don't need some type of large government telling us
> what is ok to post and what is not. We can all do that ourselves.
Yep, that's what a moderated group is all about. No governments,
large or otherwise, get involved. The perl community will
moderate itself.
> For instance, where would this thread be on a moderated group?
Good point. That's why no one is suggesting the dissolution of clpm.
John Porter
------------------------------
Date: Fri, 01 May 1998 12:02:51 +0200
From: Wiebe de Wolf <wiebe@worldcom.nl>
Subject: Adding 600 users to a Linux password file
Message-Id: <35499DC9.750C2295@worldcom.nl>
Hi there,
I have to add 600 users (abo's) to a Linux password file. I have a list
with the users and the passwords I like to use as a parameter.
My idea was to use htpasswd in a perl script, but Perl is rather new to
me
exec "htpasswd /usr/local/conf/.valid_users NEW_USER";
So far.... no problem
But now I need to know the syntax to do something like
IF program askes me "New password:"
echo NEW_USER_PASSWORD
ENDIF
(and
IF program askes me "Re-type new password:"
echo NEW_USER_PASSWORD
ENDIF )
For you this must be a peace of cake, so please.....!
Thanks. Kind regards
Wiebe de Wolf
------------------------------
Date: Fri, 1 May 1998 12:36:57 +0100
From: "Paul Marquess" <pmarquess@bfsec.bt.co.uk>
Subject: Re: Berkeley DB support
Message-Id: <6icc4q$4kt$1@pheidippides.axion.bt.co.uk>
Jim Levie wrote in message <3541576e.464170@newstoo.hiwaay.net>...
>Where do I find support for Berkely DB 2.x.
>
>There isn't a module listed on CPAN for it, and the only references to
>it that I've located so far (www.sleepycat.com) claims that "DB_File
>and Berkeley_DB" are only distributed with the standard Perl source
>distribution.
>
>I've got perl 5.004_04 and I don't see Berkeley_DB in it anywhere, and
>as I would expect DB_File is less than thrilled with the header files
>from db-2.3.16.
Versions of DB_File > 1.50 can build with Berkeley DB 2.x or 1.x (but not
both at the same time). You don't get any of the new functionality available
in DB 2.x, but you can read & write DB 2.x database files.
The module which provides full support for DB 2.x is called BerkeleyDB, not
Berkeley_DB. It is currently alpha quality, and is available on CPAN if you
want to play with it.
Both DB_File & BerkeleyDB are in my directory on CPAN. Look in
$CPAN/authors/id/PMQS.
Paul
------------------------------
Date: Fri, 01 May 1998 13:35:57 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: comp.lang.perl.misc (was Re: Credit Card Verification scripts?)
Message-Id: <3550cf7f.11924656@news.tornado.be>
lvirden@cas.org wrote:
>Anyone have some useful suggestions on where folk can go to ask for
>help with programming problems when the language in question is Perl?
Good point. In fact, many other comp.lang.* groups aren't as picky to
exactly what may be posted. Posts like what you describe aren't
considered off-topic there.
For example, recently there was a thread on comp.lang.forth about
whether programming "emotions" into the AI of robots would be
benificial. This had absolutely nothing to do with the language, but
only with a (hypothetical) programming task. Yet, nobody considered it
off-topic.
I can't imagine something like this to happen on clpm.
On clpm, people are VERY picky about what is considered off-topic. The
net result is that most of the posts are just syntax questions, but most
of all: meta posts, and jests. (Even by me.)
It looks like nobody wants to do any work. All we seem to be doing, is
fool around.
I think that by being more flexible in what gets allowed here, yes, even
help-desk type posts, could, in the end, result in more interesting
posts. Things we don't even think about now.
Bart.
------------------------------
Date: Fri, 01 May 1998 12:24:22 GMT
From: jdporter@min.net (John Porter)
Subject: Re: Credit Card Verification scripts?
Message-Id: <MPG.fb38a881778ef26989689@news.min.net>
On 1 May 1998 00:16:09 GMT,
in article <6ib489$1i8$2@srv38s4u.cas.org>,
lvirden@cas.org (lvirden@cas.org) wrote:
>
> According to Tom Phoenix <rootbeer@teleport.com>:
> :On Mon, 27 Apr 1998, Zisa wrote:
> :> I'm 12 and have plenty of time to get it right but it wont do me any
> :> good if you don't answer my questions.
> :In any case, c.l.p.misc is not a help desk. If no one answers your
> :questions, that's more likely to be your fault than ours! :-)
>
> Hmm - how much do you suppose a 12 year old can afford to pay for help?
>
> Anyone have some useful suggestions on where folk can go to ask for
> help with programming problems when the language in question is Perl?
The misconception here is that if a person is using a particular
language, then all programming problems are necessarily language
problems. You say "hammered home", but that has obviously not
happened. Clpm is not the place to discuss the http protocol.
In this case, the algorithm for validating credit cards is not
language-specific. In the context of perl, the answer to Zisa's
question is Business::CreditCard, which someone already gave him.
That's as close as anyone in clpm should come to writing his code
for him.
> If all you have to contribute is more claims of never seeing anyone turned
> away from clpm, etc. don't bother - i've seen enough of those types of
> responses.
And as we all know, what really matters here is what lvirden has seen
enough of.
I think you know where to shove that, larry.
John Porter
------------------------------
Date: Fri, 01 May 1998 12:38:03 GMT
From: jdporter@min.net (John Porter)
Subject: Re: Credit Card Verification scripts?
Message-Id: <MPG.fb38dc5d694d98c98968b@news.min.net>
On Mon, 27 Apr 1998 20:01:21 -0600,
in article <3545386F.C9E77048@onramp.net>,
zisa@onramp.net (Zisa) wrote:
>
> I'm 12 and have plenty of time to get it right but it wont
> do me any good if you don't answer my questions.
??? The success of your career as a programmer depends on
whether we answer your questions? Even if you eventually
get it right?
John Porter
------------------------------
Date: 1 May 1998 12:40:52 GMT
From: jhunterj@lexis-nexis.com (Hunter Johnson)
Subject: Re: Easy Question??
Message-Id: <6icfsk$nac@mailgate.lexis-nexis.com>
In article <3548ADEC.2020B0C6@mail.cyber-west.com>,
Madness <nic@mail.cyber-west.com> wrote:
> line that reads in the data looks like this:
> ($clsid, $class, $name, $number, $ww1, $ww2, .....$ww16) = split
> (/,/,$_,20);
> The variable I read in from the form for race is ww1 - ww16. Is there a
> way I can use this to print the
> appropriate variable from my database using the contents of the race
> variable?
> ex:
> race = ww2;
Assuming that should be
$race = 'ww2';
read the data with $race{'ww1'} instead of $ww1 (and so on). Then
access it with $race{$race};
HTH,
Hunter
--
J. Hunter Johnson | "A little consistent wholesome modeling and
jhunterj@lexis-nexis.com | costly servanthood are worth millions of
(937) 865-6800 x5385 | true words harshly spoken."
Lexis-Nexis, Dayton, OH | -- Ron Sider
------------------------------
Date: Fri, 01 May 1998 12:59:43 GMT
From: Rob Lowe <rob@imedianet.com>
Subject: email attachments
Message-Id: <35491FB1.DCAB663@imedianet.com>
how do I include an attachment to an email using the standard
open(MAIL, "| /usr/sbin/sendmail -t");
print MAIL ".."; etc.,
format
------------------------------
Date: 1 May 1998 09:53:52 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Env package Q
Message-Id: <6ick5g$kj9$1@monet.op.net>
Keywords: eyeglass flammable sleek wakeful
In article <6iajp5$g014@holly.ColoState.EDU>,
<johnnie@NOPERSONALMAIL.edu> wrote:
> sub TIESCALAR {
> bless \($_[1]);
> }
> But that's an array of references and not a reference itself, and
>bless needs a reference as it's argument!
It needs a list of one or two arguments, of which the first must be a
reference, and the second is optional. In this case, that's exactly
what it got: The first argument is a reference, and the second one is
absent.
> return bless \$ENV{$key};
Ooh, that's a little creepy. %ENV was already magical, and now you're
enchanting individual elements of it and pretending that the elements
of %ENV are objects.
> I would think this is the straightforward way!
Hey, there's more than one way to do it. But I think that the way
that the stock module does it is more straightforward.
> Could someone explain what the Env way is doing?
In the standard version of the module, when you ask for
use Env HOME;
The string `HOME' is passed in, and that's the scalar that gets
blessed. The variable $main::HOME gets tied so that fetches on it
turn into calls to FETCH(\'HOME') So FETCH just does this:
return $ENV{$$self}
In your version, you bless the appropriate element of %ENV, so that
fetches on $main::HOME turn into calls to FETCH(\$ENV{'HOME'}); now
FETCH needs to do this:
return $$self;
------------------------------
Date: Fri, 1 May 1998 14:50:20 +0100
From: "Glenn Morgan" <gmorgan@photogrpahics.co.uk>
Subject: Evaluation of hex character representation in double quoted strings
Message-Id: <6icjpc$b78$1@news.u-net.com>
Does anyone have a solution to the following problem?
I have a database table containing hexidecimal character representations,
these are read from the database into a hash table using ODBC and hence are
returned as strings. So I have a hash in the following form
%entities = ('&', '\x26', '∧', '\xDEm1', '*', '*', .........)
I then take a string, something like 'This & that', and look for
anything that matches /(&[a-zA-Z\.]+\;)/ and use the value of $1 as a key to
my hash %entities to return the corresponding characters to be inserted in
the string in place of the lookup name. My problem is this, if the
replacement character(s) contain a hexidecimal representation, when they are
inserted into the string they are not evaluated as the corresponding
character. So the string 'This & that' becomes 'This \x26 that' and not
'This & that' (assume you are using the same character mappings as me
\x26=&). I know why this happening, cos the string has missed a double
quoted evaluation, but I can't think of neat way to solve it (could be being
stupid!)
Any ideas?
Thanks in advance
Glenn Morgan
IT manager
------------------------------
Date: Fri, 01 May 1998 01:04:26 -0400
From: Pat Kane <Pat_kane@compuserve.com>
Subject: Excel via cgi
Message-Id: <354957DA.270E@compuserve.com>
Peter Tapolyai <peter###@uhu.com> wrote
>
> I have to query an MS Excel Spreadsheet across the web.
> I have the simplified core of the cgi below. However, this
> query does not return the very first 'records' (or cell values)
> or any text values either.
> That is if I have:
> A B
> 1 11 12
> 2 21 text
> 3 31 32
> values in a spreadsheet, then all numberical values returned,
> with the exception of A1 and B1 values in addition to the B2 'text'.
> Column A's name is F1 and Column B is F2 through ODBC.
>
> Any ideas what I am missing ?
YES
The first row is the row that should contains the column names.
Therefore you are missing column names in you hash keys.
I tried the following and it worked.
Assume the following excel spreadsheet data.
A B
1 c1 c2
2 666 b
3 555 c
4 444 d
5 333 e
6 222 f
I then changed the line
print " <li>", $in{F1}, " ", $in{F2}, "\n";
to
print " <li>", $in{c1}, " ", $in{c2}, "\n";
and the data returned was
666.0 b
555.0 c
444.0 d
333.0 e
222.0 f
I don't know how to prevent the decimal point and zero in column c1.
I tried using the excel format cells (category = number,decimal places =
0) but to no avail. I found the column names by inserting the following
code inside the while loop:
foreach $row (keys %in) {print "$row\n";}
this printed
c1
c2
This told me I had to change the hash key which I did and it worked.
If anyone can figure out how to avoid decimal places let us know.
Pat
Pat_$No#Spam_$Kane@csi.com
remove the dollar signs and everything between them to reply via email.
> use Win32::ODBC;
> $DSN = "Excel";
> $db = new Win32::ODBC($DSN);
>
> &html_header;
> print "Excel Data<br>\n";
> print "<ol>\n";
> $db->Sql("SELECT * FROM \"Sheet1\$\"");
> while ($db->FetchRow()){
> %in = $db->DataHash();
> print " <li>", $in{F1}, " ", $in{F2}, "\n";
> }
> print "<\/ol>\n";
> $db->Close();
> &html_footer;
>
> --
>
>
>
> Remove ### from before replying
>
> peter###@uhu.com
------------------------------
Date: 01 May 1998 09:44:29 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: Bryan T Hoch <bth@acsu.buffalo.edu>
Subject: Re: How do I print an array in the format I want it?
Message-Id: <4szagieq.fsf@mailhost.panix.com>
[posted and mailed]
Bryan T Hoch <bth@acsu.buffalo.edu> writes:
> suppose an array @info contains the following string :
> 231 Hello 43 (big: medium: small) (right: wrong)
Well, you've lost me there. How can an array "contain" a string?
Could you be more specific about what's in that array?
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
------------------------------
Date: Fri, 1 May 1998 13:44:41 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: http Reg Exp
Message-Id: <EsA66H.6p8@world.std.com>
aml@world.std.com (Andrew M. Langmead) writes:
>But if the "<URL:" and the ">" is the jar, then why does Deja News
>only use from the "<URL:" to the end of a line, breaking many of the
>URLs I put in my text?
As I was thinking more about this, I decided to make a request. If
anyone would prefer to follow the hyperlinks in my Usenet posts when
searching for them in Deja News, write to them at <URL:mailto:
comment@dejanews.com> and ask them to make their software follow the
recomendations for URLs in context of RFC1738.
I believe I'm following the rules, but why bother if others are going
to do so too.
Of course the hyperlinks in my articles are of limited usefulness to
people who know where to find the manual, the FAQ, and CPAN. I just
looked through my ~/News/sent.messages file, which seems to have my
articles from the beginning of the year. Of the 126 URLs that I
specified, only 36 aren't from <URL:http://language.perl.com>,
<URL:http://www.perl.com>, or <URL:http://reference.perl.com>.
(By the way, I didn't start out trying to split the mailto URL over
mutlple lines, but when it landed on the line there, I decided to keep
it.)
--
Andrew Langmead
------------------------------
Date: 01 May 1998 07:58:05 -0400
From: DJ Delorie <dj@delorie.com>
Subject: Re: HTTP Request Headers
Message-Id: <xnpvhyursi.fsf@delorie.com>
webmaster@gardenweb.com (Spike Hernandez) writes:
> I need to see the request headers for an HTTP request EXACTLY as the
> browser sends them. It is a little beyond my ken to make a faux server
> that can record them.
>
> Does anyone know of a script or a site that might be able to show me
> exactly what Netscape sent the server?
http://www.delorie.com/web/
To quote the link on that page:
_HTTP_Request_Viewer_
Find out exactly what your browser is sending to my server.
------------------------------
Date: Fri, 01 May 1998 12:54:45 GMT
From: webmaster@gardenweb.com (Spike Hernandez)
Subject: Re: HTTP Request Headers
Message-Id: <3549c5b9.6433004@news.digex.net>
On Thu, 30 Apr 1998 13:11:53 -0400, comdog@computerdog.com (brian d
foy) wrote:
>here's a short server i wrote a long time ago when i was messing with
>HTTPeek. it simply spits back a lot of info about the request and server
>thingys. you'll have to change some of the hard-coded paths and such
>to play with it. or, try <URL:http://computerdog.com:8088/>, but the
>admins tend to kill it though since they don't know what it is.
>
>good luck :)
>
Brian,
Thanks! That's exactly what I needed.
I really appreciate the help!
Take care,
Spike Hernandez
------------------------------
Date: 1 May 1998 10:23:18 +0100
From: aeb@brains.cartoon.bt.co.uk (Tony Bass)
Subject: Re: Looking for an idiom (cf. Schwartzian Transform)
Message-Id: <6ic4a6$96b$1@brains.cartoon.bt.co.uk>
>From article <Pine.GSO.3.96.980430133039.8307X-100000@user2.teleport.com>, by Tom Phoenix <rootbeer@teleport.com>:
> On 30 Apr 1998, Mitchell Morris wrote:
>> The difficulty is that s/// returns the number of substitutions performed,
>> and what I want is the resulting string. Is there a perl idiom that I
>> could substitute here so the map will work the way I want it to?
> Yes; you want a lexical copy of the data within the (last) map, perhaps
> something like this.
> map {
> my $copy = $_;
> $copy =~ s/(\d+)(\D+)/$2$1/;
> [ $_, $copy ]; # Return from map
> } @items;
Or in a slightly different style,
map [$_, map "$$_[1]$$_[0]", [/(\d+)(\D+)/]], @items;
and other applications might find use for constructions such as
(/(\d+)(\D+)/)[1, 0]
Tony Bass
--
# A E Bass Tel: (01473) 645305
# MLB 3/19, BT Laboratories e-mail: aeb@saltfarm.bt.co.uk
# Martlesham Heath, Ipswich, Suffolk, IP5 7RE DO NOT e-mail to From: line
# Opinions are my own
------------------------------
Date: Fri, 01 May 1998 12:00:34 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
To: mmorris@mindspring.com
Subject: Re: Looking for an idiom (cf. Schwartzian Transform)
Message-Id: <8cbttikxqd.fsf@gadget.cscaper.com>
>>>>> "Mitchell" == Mitchell Morris <mgm@unpkhswm04.bscc.bls.com> writes:
Mitchell> In short, I wanted to sort a list where the key words were
Mitchell> an optional number followed by an alpha word, e.g. Foo,
Mitchell> 0Foo, 1Foo, Bar, 0Bar, 1Bar, etc. I of course wanted all
Mitchell> the "Foo" words to sort together, and all in numeric
Mitchell> sequence amongst themselves. My first try, which doesn't
Mitchell> work, was:
Mitchell> map { $_->[0] } sort { $a->[1] cmp $b->[1] }
Mitchell> map { [ $_, s/(\d+)(\D+)/$2$1/ ] } @lines;
Mitchell> The difficulty is that s/// returns the number of
Mitchell> substitutions performed, and what I want is the resulting
Mitchell> string. Is there a perl idiom that I could substitute here
Mitchell> so the map will work the way I want it to?
Don't use "s". Use "m". (No jokes about that come to mind. :-)
@result = map { $_ -> [0] } sort {
$a->[2] cmp $b->[2] or # words first
$a->[1] <=> $b->[1] or # numbers second
$a->[0] cmp $b->[0] # fall back to entire item
} map { [
$_, # item 0
/(\d+)(.*)/s # item 1, item 2
] } @data;
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 123 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 30 Apr 1998 18:06:49 GMT
From: barg@nickel.as.arizona.edu (Irene Barg)
Subject: perl 5.004 extensions
Message-Id: <6iaejp$8c2$1@news.ccit.arizona.edu>
Hello,
Does the perl5.004_04/ext directory show all the extensions that are
included in Perl v5.004? I got the impression that modules like
CGI.pm, libnet, and sybperl were bundled in this latest version of
Perl?
I've looked at the www.perl.com announce page, but it still wasn't
clear.
Thanks,
--irene
-------------------------------------------------------------------
Irene Barg Email: ibarg@as.arizona.edu
Steward Observatory Phone: 520-621-2602
University of Arizona FAX: 520-621-1891
Tucson, AZ 85721 http://nickel.as.arizona.edu/~barg
-------------------------------------------------------------------
------------------------------
Date: Fri, 01 May 1998 13:36:20 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: Perl/Wall lingo question
Message-Id: <3551cfc0.11989797@news.tornado.be>
John Porter wrote:
>A scalar is dimensionless, by definition.
Nope. Zero dimensions is a point. A scalar, at least a numeric one, can
be represented by a point (any point) on a line. Hence: one dimesion.
HTH,
Bart.
------------------------------
Date: Fri, 01 May 1998 10:32:45 GMT
From: Bill 'Sneex' Jones <webmaster@fccjmail.fccj.org>
Subject: Re: push @strArray, (24..31);
Message-Id: <3549A318.47AC0998@fccjmail.fccj.org>
Dan Boorstein wrote:
> do you mean:
>
> my @strArray = (21..39);
> push @strArray, (90..121);
> push @strArray, (299..310);
>
> if that's all you want to do you can separate the ranges with commas:
>
> my @strArray = (21..39, 90..121, 299..310);
Yes, :-) Just shoot me! I thought I had done it that
way first; but I was really doing:
my $strArray = (21..39), (44..50), (101..200);
Thanks for the quick response :-)
-Sneex-
____________________________________________________________________________
Bill Jones | FCCJ Webmaster | Voice 1-904-632-3089 | Fax 1-904-632-3007
Florida Community College at Jacksonville | 501 W. State St. | Jax, FL 32202
mailto:webmaster@fccjmail.fccj.org | http://webmaster.fccj.org/Webmaster
------------------------------
Date: Fri, 01 May 1998 10:34:52 GMT
From: Bill 'Sneex' Jones <webmaster@fccjmail.fccj.org>
Subject: Re: push @strArray, (24..31);
Message-Id: <3549A397.75742BB9@fccjmail.fccj.org>
Lloyd Zusman wrote:
> > my @strArray = (21..39, 90..121, 299..310);
>
> And furthermore, the two `push' statements you used in your example
> happen to not be syntactically correct. In order for them to be
> accepted by the Perl interpreter, they would have to be written thus:
No, I understand :-) I didn't mean to ask the way I did.
I mind is slipping away. All the extra '=' should have been ','...
:-)
-Sneex-
____________________________________________________________________________
Bill Jones | FCCJ Webmaster | Voice 1-904-632-3089 | Fax 1-904-632-3007
Florida Community College at Jacksonville | 501 W. State St. | Jax, FL 32202
mailto:webmaster@fccjmail.fccj.org | http://webmaster.fccj.org/Webmaster
------------------------------
Date: Fri, 01 May 1998 12:34:04 GMT
From: jdporter@min.net (John Porter)
Subject: Re: push @strArray, (24..31);
Message-Id: <MPG.fb38ccd9a86993a98968a@news.min.net>
On Fri, 01 May 1998 10:32:45 GMT,
in article <3549A318.47AC0998@fccjmail.fccj.org>,
webmaster@fccjmail.fccj.org (Bill 'Sneex' Jones) wrote:
> Dan Boorstein wrote:
>
> > my @strArray = (21..39, 90..121, 299..310);
>
> Yes, :-) Just shoot me! I thought I had done it that
> way first; but I was really doing:
>
> my $strArray = (21..39), (44..50), (101..200);
Is that another typo, bill?
When you assign to a scalar like that, it comes out
an empty string -- even more wrong than assigning
to an array :-)
John Porter
------------------------------
Date: Fri, 01 May 1998 10:58:05 +0200
From: jan.dubois@ibm.net (Jan Dubois)
Subject: Re: Q: COM vs. Excel AddIns
Message-Id: <35508ae7.10923266@news2.ibm.net>
[mailed & posted]
no@spam.net (Tom Vrankar) wrote:
^^^^^^^^^^^ this seriously reduces your chance to get a reply to your help
requests!
>I am using OLE automation to open Excel95/97 and load workbooks. That's all.
>The problem is that one of the workbooks needs functions defined in the
>Analysis ToolPak. For some reason, when dispatching Excel via COM,
>this add-in isn't loaded, even though it loads automatically if
>Excel is started in the usual "manual" ways. How do I force the Analysis
>ToolPak to be loaded?
>
>I've made sure the AddIn's Installed, and have tried to Open the desired
>workbooks with UpdateLinks.
It would help if you would show some sample code. Also don't forget to specify
the versions of all relevant software pieces: Perl (AS/core?), Win (95/NT?),
Service packs?, Excel (95/97?), Service packs?, OLE/Win32::OLE?
You might want to subscribe to the Perl-Win32-Users mailing list at
ActiveState.com.
-Jan
------------------------------
Date: Fri, 01 May 1998 06:59:08 -0600
From: Joel Horowitz <horowitz@ulb.ac.be>
Subject: Safest way to read from a socket?
Message-Id: <6icdec$1m1$1@nnrp1.dejanews.com>
Hye,
I began learning about sockets, and really love it. I wrote my small object-
oriented modules to emulate POP and HTTP protocol, but I wondered if there's
a simple way to read from a socket without knowing how much data (possibly
none) is going to come from the data:
$a=<SOCKET> is nice but reads one line only
recv(SOCKET,$buffer,$len,$flags)
and read(SOCKET,$buffer,$len) work fine but you need to know how much
data to read (although I think it works if you set $len to a BIG value),
but gets stuck if there's no data coming from the socket...
while (<SOCKET>) { ... } is not good, cause it seems to block when
no data is coming...
I guess the best way would be to make a sort of 'background process' of
while (<SOCKET>) { ... }, and still be able to execute other commands. I
think fork does something like this, but I could not find newbie documentation
to the 'fork' function...
Any hint?
Thanks
Joel
NB: I'm using 5.003 at university, on Linux, SunOS and IRIX, so please
don't tell me to install 5.004 - coz' it's free - and use the latest
SocketModuleJustWrittenForYou.pm. I know I might be reinventing the wheel, but
I found out that it's a good way to learn.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Fri, 01 May 1998 10:58:10 +0200
From: jan.dubois@ibm.net (Jan Dubois)
Subject: Re: visual basic replacement
Message-Id: <35528de8.11692102@news2.ibm.net>
[mailed & posted]
Francesc Guasch <frankie@etsetb.upc.es> wrote:
>I know I can use DBI for access a db, what
>I want to know if perl is suitable for building
>typical windows stuff and if there are modules
>for displaying forms and dialogs ...
The module is called Tk (and it is included in the binary distribution of
standard Perl too!). It doesn't work with AS Perl though.
-Jan
------------------------------
Date: 1 May 1998 06:50:40 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Win32 reading in passwords
Message-Id: <6ibrc0$8sd$1@comdyn.comdyn.com.au>
In article <35495F1F.B48573BC@ibm.net>,
Neil Freetly <nfreetly@ibm.net> writes:
> How can I accept input from the keyboard without displaying it to the
> screen?
>
> For instance, I want to prompt for a password in my WIN32 Perl program,
> but I don't want to echo to the screen what the user types in. Any
> Ideas?
Hmmm. I wonder if someone asked this question before. Hey! It might
even be in the faq!
# perldoc perltoc
/password
How do I ask the user for a password?
[yay! It's there! In the perlfaq8 section!]
# perldoc perlfaq8
/How do I ask the user for a password?
[read, read, read]
Martien
PS. Which of the above steps weren't you able to do yourself?
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: Fri, 01 May 1998 07:40:51 GMT
From: miker3@ix.netcom.com (Michael Rubenstein)
Subject: Re: Win32 reading in passwords
Message-Id: <35537c4b.40221004@nntp.ix.netcom.com>
On 1 May 1998 06:50:40 GMT, mgjv@comdyn.com.au (Martien Verbruggen)
wrote:
>In article <35495F1F.B48573BC@ibm.net>,
> Neil Freetly <nfreetly@ibm.net> writes:
>> How can I accept input from the keyboard without displaying it to the
>> screen?
>>
>> For instance, I want to prompt for a password in my WIN32 Perl program,
>> but I don't want to echo to the screen what the user types in. Any
>> Ideas?
>
>Hmmm. I wonder if someone asked this question before. Hey! It might
>even be in the faq!
>
># perldoc perltoc
>/password
> How do I ask the user for a password?
>
>[yay! It's there! In the perlfaq8 section!]
>
># perldoc perlfaq8
>/How do I ask the user for a password?
>[read, read, read]
>
>Martien
>
>PS. Which of the above steps weren't you able to do yourself?
Perhaps it was a step he did do that you forgot: notice that the
answer given in the FAQ will not work under WIN32.
--
Michael M Rubenstein
------------------------------
Date: 1 May 1998 11:55:34 GMT
From: scott@softbase.com
Subject: Re: Win32 reading in passwords
Message-Id: <6icd7m$rsv$1@mainsrv.main.nc.us>
Neil Freetly (nfreetly@ibm.net) wrote:
> How can I accept input from the keyboard without displaying it to the
> screen?
> For instance, I want to prompt for a password in my WIN32 Perl program,
> but I don't want to echo to the screen what the user types in. Any
> Ideas?
First thing's first: the Win32 model of security is based on the idea
that once the user logs in, the user is authenticated and has full
control over the system. On NT, this is definitely true. On Windows
95, "security" is totally irrelevant. Prompting the user for a
password is bad design, since once the user logs in the user is
going to expect to be validated already.
In Perl under Windows, there is probably no way at all to stop keyboard
echo. To do this, you would have to use the console API, which I do
not believe is supported in Perl in any way.
Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
------------------------------
Date: 1 May 1998 12:09:39 GMT
From: "David Richards" <david.richards@alderley.zeneca.com>
Subject: Re: Win32::NetResource::AddConnection exhibiting undocumented behaviour ?
Message-Id: <01bd74fa$049d36e0$55a0479c@UKMCPHISFW051.ukmcph.zeneca.com>
Jonathan
Have you checked that the schedule service is started under an account
which has network access. The default on NT is for the scheduler to be
started under the local system account which has no network access.
David
Jonathan Stowe <Gellyfish@btinternet.com> wrote in article
<35476f8d.11770921@news.btinternet.com>...
> I have a smallish script that for reasons of state runs on (sigh) an
> NT machine and connects in turn to series of Netware servers using
> Win32::NetResource::AddConnection.
>
> This works fine when run from the command line, however when run under
> the schedule service it doesnt.
>
> Thats fine, NT is crap and its nothing to do with Perl agreed.
------------------------------
Date: Fri, 01 May 1998 13:22:57 GMT
From: drummj@mail.mmc.org (Jeffrey R. Drumm)
Subject: Re: Win32::NetResource::AddConnection exhibiting undocumented behaviour ?
Message-Id: <3549c103.91732243@news.mmc.org>
On Fri, 01 May 1998 00:57:00 GMT, drummj@mail.mmc.org (Jeffrey Drumm) wrote:
>[posted and mailed]
>
>On Wed, 29 Apr 1998 18:54:25 GMT, Gellyfish@btinternet.com (Jonathan Stowe)
>wrote:
>
>>I have a smallish script that for reasons of state runs on (sigh) an
>>NT machine and connects in turn to series of Netware servers using
>>Win32::NetResource::AddConnection.
>>
>>This works fine when run from the command line, however when run under
>>the schedule service it doesnt.
>>
>>Thats fine, NT is crap and its nothing to do with Perl agreed.
>
>(snip)
>
>>I am beginning to realize that some sins do have their own punishment.
(snip)
>I'll try an AddConnection under the scheduler when I get into the office
>tomorrow and see what kind of results I get, and let you know. Then I'll
>scurry back to the safe haven of Unix, where Things Always Work Like
>They're Supposed To.
Well, I tried it, and got the same results you did. I don't think it has
anything to do with the client . . . it appears to be related to the fact that
the scheduler runs under the system account. I thought changing the scheduler
to run under my account in Control Panel|Services|Schedule|Startup might have
some effect, but no.
I also tried using opendir on a UNC for which I have rights and it failed when
run under the scheduler. I suspect the system account just doesn't get network
access, at least to Netware resources. Pretty bad, eh?
There are a number of cron knockoffs for NT out there . . . maybe one of them
will give you better results.
--
Jeffrey R. Drumm, Systems Integration Specialist
Maine Medical Center - Medical Information Systems Group
drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented!" - me
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 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.
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 2471
**************************************