[13146] in Perl-Users-Digest
Perl-Users Digest, Issue: 556 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 16 16:07:24 1999
Date: Mon, 16 Aug 1999 13:05:14 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 16 Aug 1999 Volume: 9 Number: 556
Today's topics:
%0 %1 %2 ???? <ricklim@vcn.bc.ca>
-T mode and "Too late for "-T" option" <perrot@francenet.fr>
Re: -T mode and "Too late for "-T" option" <flavell@mail.cern.ch>
Re: -T mode and "Too late for "-T" option" <mikecard@my-deja.com>
Re: -T mode and "Too late for "-T" option" (Malcolm Ray)
Re: -T mode and "Too late for "-T" option" (Larry Rosler)
Re: <== importing hash symbols from one package to anot (Mark-Jason Dominus)
Re: <== importing hash symbols from one package to anot <khowe@performance-net.com>
ActiveState PDK <dchender@esn.net>
Re: Array/list/split/push handling question <aqumsieh@matrox.com>
Re: automatic text formatting for 80 chars a line (J. Moreno)
CGI.pm or here document for html support@gethits.com
Connecting to a MAPI compliant mailer. <ryan.h.bark@boeing.com>
Re: continual reading of file (Michel Dalle)
Re: djgpp, Win98, Perl, and serial port <dchristensen@california.com>
Re: HARASSMENT -- Monthly Autoemail (I R A Darth Aggie)
Re: HARASSMENT -- Monthly Autoemail <AgitatorsBand@yahoo.com>
Re: HARASSMENT -- Monthly Autoemail (Gil Harvey)
Re: HARASSMENT -- Monthly Autoemail (Donovan Rebbechi)
Re: hash in record <aqumsieh@matrox.com>
Re: How to view code as text in working cgi script <resource@ERASEjps.net>
Re: Msql-Mysql-modules-1.2202 <khera@kciLink.com>
Not running Perl from Perl! Why not? mark@bstar.net
Re: ODBC & UNIX <purchase9@hotmail.com>
Re: ODBC & UNIX <aperrin@mcmahon.qal.berkeley.edu>
pack-unpack question <naren.dasu@divatv.com>
Re: pack-unpack question <jeffp@crusoe.net>
Pattern matching and extracting data ("willow")
Re: Pattern matching and extracting data (Larry Rosler)
Re: Performance difference printing single vs double qu <aqumsieh@matrox.com>
perl and ftp download <heather.wiley.fake@bentley.com>
Perl Compiler for Solaris 2.7? <s_shah@ix.netcom.com>
Re: Perl Services (Randal L. Schwartz)
returning a ref to a hash from a different module... <priced@doctor.chem.yale.edu>
Re: s/// and interpolation <chris_conway@my-deja.com>
Re: s/// and interpolation <aqumsieh@matrox.com>
Re: Why use Perl when we've got Python?! <aqumsieh@matrox.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 16 Aug 1999 06:36:14 GMT
From: Rick Lim <ricklim@vcn.bc.ca>
Subject: %0 %1 %2 ????
Message-Id: <7p8bgu$1e$1@sylvester.vcn.bc.ca>
are the %0 %1 %2 the same as command line parameters
in the statment
perl -S %0 %1 %2
--
The wealth of reality, cannot be seen from your locality.
------------------------------
Date: 16 Aug 1999 19:14:19 +0200
From: Gildas PERROT <perrot@francenet.fr>
Subject: -T mode and "Too late for "-T" option"
Message-Id: <rdhflzsl5g.fsf@localhost.francenet.fr>
Hi,
I have that error message :
Too late for "-T" option at webverif.pl line 1.
However I have in line 1 :
#!/usr/bin/perl5 -T
Any idea about that error ?
Thanks in advance for your help. Gildas.
--
Gildas PERROT, perrot@francenet.fr __o
FranceNet, 28 rue Desaix, 75015 Paris ---_ \<,_
http://www.francenet.fr ---- (_)/ (_)
------------------------------
Date: Mon, 16 Aug 1999 19:59:37 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: -T mode and "Too late for "-T" option"
Message-Id: <Pine.HPP.3.95a.990816194556.25501M-100000@hpplus03.cern.ch>
On 16 Aug 1999, Gildas PERROT wrote:
> Too late for "-T" option at webverif.pl line 1.
>
> However I have in line 1 :
>
> #!/usr/bin/perl5 -T
Problems with diagnostics? -> perldoc perldiag
Too late for "-T" option
(X) The #! line (or local equivalent) in a Perl script
contains the -T option, but Perl was not invoked with -T
in its command line. This is an error because, by the
time Perl discovers a -T in a script, it's too late to
properly taint everything from the environment. So Perl
gives up.
Please, use the documentation that comes with your Perl system before
considering invoking the resources of the group. If the diagnostics
don't seem clear, show the group what it is you're having trouble with,
so that more effective and focussed help can be given.
My guess is that you executed it with e.g
perl name_of_script
instead of e.g
./name_of_script
The perldiag page shows the solution.
------------------------------
Date: Mon, 16 Aug 1999 18:27:47 GMT
From: mike cardeiro <mikecard@my-deja.com>
Subject: Re: -T mode and "Too late for "-T" option"
Message-Id: <7p9l6k$gho$1@nnrp1.deja.com>
Gildas PERROT <perrot@francenet.fr> wrote:
> Hi,
>
> I have that error message :
>
> Too late for "-T" option at webverif.pl line 1.
>
> However I have in line 1 :
>
> #!/usr/bin/perl5 -T
^
you can't have a space before the -T
mike cardeiro
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 16 Aug 1999 18:54:14 GMT
From: M.Ray@ulcc.ac.uk (Malcolm Ray)
Subject: Re: -T mode and "Too late for "-T" option"
Message-Id: <slrn7rgnim.qba.M.Ray@carlova.ulcc.ac.uk>
On Mon, 16 Aug 1999 18:27:47 GMT, mike cardeiro <mikecard@my-deja.com> wrote:
>Gildas PERROT <perrot@francenet.fr> wrote:
>> Hi,
>>
>> I have that error message :
>>
>> Too late for "-T" option at webverif.pl line 1.
>>
>> However I have in line 1 :
>>
>> #!/usr/bin/perl5 -T
> ^
>you can't have a space before the -T
What gave you that idea? I have a space before the -T flag in all *my*
scripts! In fact, if you didn't have a space there, it wouldn't be
a flag!
--
Malcolm Ray University of London Computer Centre
------------------------------
Date: Mon, 16 Aug 1999 11:58:34 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: -T mode and "Too late for "-T" option"
Message-Id: <MPG.1221ff36d06407be989e5e@nntp.hpl.hp.com>
In article <7p9l6k$gho$1@nnrp1.deja.com> on Mon, 16 Aug 1999 18:27:47
GMT, mike cardeiro <mikecard@my-deja.com> says...
> Gildas PERROT <perrot@francenet.fr> wrote:
> > I have that error message :
> >
> > Too late for "-T" option at webverif.pl line 1.
> >
> > However I have in line 1 :
> >
> > #!/usr/bin/perl5 -T
> ^
> you can't have a space before the -T
Where did you come up with that nonsense? Did you try *anything* before
posting it?
You *must* have a space before the -T, unless your perl is located at
/usr/bin/perl5-T .
Sheesh!
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 16 Aug 1999 18:27:09 GMT
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: <== importing hash symbols from one package to another ==>
Message-Id: <7p9l4s$mci$1@monet.op.net>
In article <37b838e6.256389@news.skynet.be>,
Bart Lateur <bart.lateur@skynet.be> wrote:
> sub import {
> my $package = (caller)[0]; # "main"
Just
my $package = caller;
is enough here. The default behavior of `caller' was designed to
cover this common case.
------------------------------
Date: Mon, 16 Aug 1999 16:20:22 -0300
From: "Kevin Howe" <khowe@performance-net.com>
Subject: Re: <== importing hash symbols from one package to another ==>
Message-Id: <DpZt3.45883$5r2.95506@tor-nn1.netcom.ca>
I'd like to thank everyone for being so helpful, my module is working well
using the sub import{} method. I am left with lingering questions about
Exporter though. I've read it's documentation many times, I've tried many
different things, but I still could not properly export the hashes using
Exporter. Can anyone prove that Exporter can actually do this?
Something along the lines of this:
package main;
use one;
print $hash{'Color'};
package one;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(hash);
$hash{'Color'} = "Red";
Thanks
------------------------------
Date: Mon, 16 Aug 1999 14:41:49 -0700
From: "M.A. Henderson" <dchender@esn.net>
Subject: ActiveState PDK
Message-Id: <37B8859D.E383CAF9@esn.net>
Is anyone familiar with installing this dev kit on Win95, either the
beta or latest release? I keep getting " out of drive space", tho' there
is plenty.
dalehend@netscape.net
------------------------------
Date: Mon, 16 Aug 1999 14:35:11 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Array/list/split/push handling question
Message-Id: <x3y907br2u9.fsf@tigre.matrox.com>
marcza@my-deja.com writes:
> (undef, undef, undef, @arr) = split(/ +/,$text);
> push(@arr, "newelem");
The easiest I could come up with is:
@arr = split ' ', $text;
splice @arr, 0, 3, $newelem;
HTH,
Ala
------------------------------
Date: Mon, 16 Aug 1999 13:29:28 -0400
From: planb@newsreaders.com (J. Moreno)
Subject: Re: automatic text formatting for 80 chars a line
Message-Id: <1dwmtba.3eesgdquw6wxN@roxboro0-0022.dyn.interpath.net>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
> >One of the big reasons to keep a line length of under 80 is because you
> >are dealing with email or usenet messages -- in which case they may
> >contain quoted lines, in which cases that fails miserably.
>
> There are dozens of reasons to fold long lines, all with different
> requirements. Michael didn't specify any.
True. But what I said is true also, and if he is dealing with text that
may be quoted then he really should deal with it properly.
--
John Moreno
------------------------------
Date: Mon, 16 Aug 1999 18:17:07 GMT
From: support@gethits.com
Subject: CGI.pm or here document for html
Message-Id: <37B8573E.34CA2782@gethits.com>
I've been using here documents for html in my perl
scripts which has been pretty convenient and
malleable in the past. I'm considering converting
to CGI.pm to generate web documents, but I'm
wondering if it's worth it. The textbooks say its
great, but does anybody have some real world
experience with using CGI.pm for this purpose?
If so, why is it better?
Thanks,
Darryl Dyck
------------------------------
Date: Mon, 16 Aug 1999 16:48:42 GMT
From: "Ryan Bark" <ryan.h.bark@boeing.com>
Subject: Connecting to a MAPI compliant mailer.
Message-Id: <FGKHDs.3qy@news.boeing.com>
Could someone post an example of a perl script sending a mail message
through a MAPI compliant mailer?
(ex: Outlook)
------------------------------
Date: Mon, 16 Aug 1999 17:56:47 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: continual reading of file
Message-Id: <7p9jb3$5ai$1@xenon.inbe.net>
In article <yhXt3.2115$1B5.125845@monger.newsread.com>, "Darren Janisse" <djanisse@northrock.bm> wrote:
>
>Hello,
>
> I am fairly new to Perl and am attempting to write a perl script which
>parses data from a sendmail log file. Is it possible to have a file open in
>perl for continual processing (i.e. perl would keep the maillog file open
>and read any new data which is added to it)?
>
>Any suggestions would be greatly appreciated!
Funnily enough, this is a FAQ (although you wouldn't know it if you're
not familiar with Unix commands).
Look in Perl FAQ 5, under "How do I do a tail -f in Perl ?"
Michel.
------------------------------
Date: Mon, 16 Aug 1999 12:20:20 -0700
From: "David Christensen" <dchristensen@california.com>
Subject: Re: djgpp, Win98, Perl, and serial port
Message-Id: <37b8620b@news5.newsfeeds.com>
-----Original Message-----
From: Bbirthisel@aol.com <Bbirthisel@aol.com>
To: dchristensen@california.com <dchristensen@california.com>
Date: Friday, August 13, 1999 10:50 PM
Subject: Re: djgpp, Win98, Perl, and serial port
Hi David:
In a message dated 8/13/99 6:07:37 PM Central Daylight Time,
dchristensen@california.com writes:
> am running the FSF distribution of DJGPP 2.01 (?) and Perl
5.004_02 on my Win98 box.
I think you mean a Perl version build with DJGPP 2.01. Did you
compile it yourself, or just use a pre-build binary distribution? I
also must ask WHY? The last time I looked, the DJGPP-built Perl was
intended for MSDOS-based systems that were not running Win32. But
Win98 is not a plausible target. The MSDOS port traded full
functionality and module support for the ability to run on
older/reduced_capability platforms.
There are at least two common ports for Win98 which have complete
serial support: The 5.004_02 binary from CPAN (the GSAR port) and
the 5xx builds from ActiveState. Both are freely available (for
almost all meanings of the word free - all I care to discuss,
anyway).
> I am attempting to communicate with a machine we are developing
via the serial port (9600 8-N-1). I have grep'ed and read through
several docs (open, sysopen, perlfaq8, config.h, ioctrl.h, etc.)
trying to piece together the clues. This is my current attempt
And it, like all others based on the Un*x driver model, is doomed
to failure on Win9x. Sorry. I wasn't my idea. I tried once, too.
And failed.
> Searching around on Deja, it looks like people with ActivePerl
have some modules (Win32::SerialPort, Win32::CommPort, and
Win32::API) to make life easier. There is also supposed to be a
Un*x version of ::SerialPort.
People with either of the above ports, or even the 3xx ActiveState
builds which are no longer encouraged for new installations, do in
fact use those modules on Win9x/NT/2000. With great success. The
Un*x one is named Device::SerialPort and it has been run on linux,
AIX and Solaris. Cross-platform scripts exist which run on all
platforms (takes a messy BEGIN {eval { use } } setup, but works. I
usually just fix the "use" statement and keep two copies).
Actually, Win32::API is a prerequisite for Win32::CommPort - but is
itself a free-standing module. The source is available. Mostly XS
plus a bit of inline X86 assembly code is how it was described to
me. I have not heard of anyone compiling it with DJGPP.
Device::SerialPort uses POSIX.pm. But I suspect no one can create a
Win98 version of THAT module.
> On 1999/07/23, Bbirthisel <bbirthisel@aol.com> posted a message
"Re: What is the best way to write data to a com port under DOS."
to comp.lang.perl.misc:
>> There is a gentleman in Japan who is working on limited COM port
support for the djgpp-built version of Perl - but he has not yet
released results.
I still have not seen results. He was compiling his own Perl. I'm
not sure if he was using XS for the serial port code or hacking the
source directly. Portability and "general purpose" did not head his
list of priorities - so I'm not sure when or what will happen with
his project.
-bill
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 16 Aug 1999 16:55:56 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: HARASSMENT -- Monthly Autoemail
Message-Id: <slrn7rggor.oav.fl_aggie@thepentagon.com>
On Mon, 16 Aug 1999 16:01:05 GMT, miker3@ix.netcom.com
<miker3@ix.netcom.com>, in <7p9cjp$9jp$1@nnrp1.deja.com> wrote:
+ In article <slrn7rg5h7.nhi.fl_aggie@thepentagon.com>,
+ fl_aggie@thepentagon.com (I R A Darth Aggie) wrote:
+ > On Mon, 16 Aug 1999 06:13:35 GMT, Michael Rubenstein
+ <miker3@ix.netcom.com>, in
+ > <37b7a952.701300396@nntp.ix.netcom.com> wrote:
+ >
+ > + I R A Darth Aggie has taught them that it is OK to send spam to
+ > + anyone who posts on usenet. After all, posting on usenet is an
+ > + invitation for unsolicited email.
+ >
+ > I'll accept your apology for that smear any time once you figure out
+ > that the culture of Usenet says that email-followups to a posting is
+ > acceptable.
+ You will not get an apology to accept.
So, you stand by your accusation that I support spam?
+ There is no way one can reasonably interpret Tom's message as an email
+ followup. A followup contains the subject of the post it is following
+ up in the subject line.
Why? That's not a user configurable option on your system?
+ I'm sorry to have to be the one to tell you this, but you no longer have
+ a good name for me to smear.
*yawn*
+ If you ever had one, it was lost when you started making excuses for
+ Tom's harrassment.
You're aren't worth my time.
James - oh, and don't email me...
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: Mon, 16 Aug 1999 17:48:34 GMT
From: Scratchie <AgitatorsBand@yahoo.com>
Subject: Re: HARASSMENT -- Monthly Autoemail
Message-Id: <S9Yt3.267$mV.98701@news.shore.net>
In comp.lang.perl.misc I R A Darth Aggie <fl_aggie@thepentagon.com> wrote:
: On Sat, 14 Aug 1999 02:34:09 GMT, Gil Harvey <gh@netquick.net>, in
: <37b4d4b0.25250093@news.interpath.net> wrote:
: + Tom, I love your books, I bought them, when I want to hear
: + from you I will buy your next book, don't send me unxolicted email.
: You realize that by posting to Usenet, you are implicitly permitting
: email responses?
True, but Tom has a habit of sending auto-replies to addresses that he
won't accept email from. That's kind of obnoxious.
--Art
--------------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.agitators.com/calendar/
--------------------------------------------------------------------------
------------------------------
Date: Mon, 16 Aug 1999 18:15:10 GMT
From: gh@netquick.net (Gil Harvey)
Subject: Re: HARASSMENT -- Monthly Autoemail
Message-Id: <37b85509.7174514@news.interpath.net>
On 16 Aug 1999 16:39:41 GMT, fl_aggie@thepentagon.com (I R A Darth
Aggie) wrote:
>
>+ >Does that make sense?
>
>+ Nope - None...
>
>Then you shouldn't be on Usenet.
LOL - I think maybe you shouldn't be
------------------------------
Date: 16 Aug 1999 15:22:21 -0400
From: elflord@panix.com (Donovan Rebbechi)
Subject: Re: HARASSMENT -- Monthly Autoemail
Message-Id: <slrn7rgp7a.mip.elflord@panix3.panix.com>
On 16 Aug 1999 13:44:07 GMT, I R A Darth Aggie wrote:
>On Mon, 16 Aug 1999 06:13:35 GMT, Michael Rubenstein <miker3@ix.netcom.com>, in
><37b7a952.701300396@nntp.ix.netcom.com> wrote:
>I'll accept your apology for that smear any time once you figure out
>that the culture of Usenet says that email-followups to a posting is
>acceptable.
If he only sent it once, it would be half reasonable to
call it a followup. However, if he sends an automatic message
periodically, ( ie the same one each time ), this is harrassment.
This is more about the codes of conduct for email more than usenet
( ie it's OK to mail someone but not mail them the same thing
over and over )
I'd also say that to repeatedly send the same message to an address
that you have blocked is harrassment ( it's like shouting at someone
and blocking your ears simoultaneously )
TC might be a great perl programmer, but that doesn't mean that everything
he does is right.
--
Donovan
------------------------------
Date: Mon, 16 Aug 1999 11:24:45 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: hash in record
Message-Id: <x3yd7wnrbnm.fsf@tigre.matrox.com>
lr@hpl.hp.com (Larry Rosler) writes:
> + List value constructors
> +
> + List values are denoted by separating individual values by commas (and
> + enclosing the list in parentheses where precedence requires it):
We see here that a list is a sequence of expressions, separated by
commas and enclosed by parentheses.
But is the converse also true?
So the question becomes, is "a sequence of expressions, separated by
commas and enclosed by parentheses" also a list?
> Regardless of the terminology, there is no question that the value of
> the construct in scalar context is the value of the last expression.
Agreed.
Ala
------------------------------
Date: Mon, 16 Aug 1999 12:06:00 -0700
From: Warren Bell <resource@ERASEjps.net>
Subject: Re: How to view code as text in working cgi script
Message-Id: <37B86118.39122E2A@ERASEjps.net>
In article <slrn7rdmhj.a5.abigail@alexandra.delanet.com>,
abigail@delanet.com wrote:
> Warren Bell (resource@ERASEjps.net) wrote on MMCLXXIV September MCMXCIII
> in <URL:news:37B5A827.5F8D74B7@ERASEjps.net>:
> // How can I call a cgi program on the web to see it's code? Is there a
> // way to do this? Any adjustments I can do to my browser?
>
> No, you cannot steal CGI programs that way.
I wasn't planning on it.
You should really get a little more info before accusing someone. Just
because I want to SEE the code doesn't mean I'm going to steal it. And
who's to say I'm not doing some sort of experiment and the script in
question is on my own server.
You see, think before you speak.
>
> Abigail
> --
> sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
> h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
> c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
> print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");
>
> -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
> http://www.newsfeeds.com The Largest Usenet Servers in the World!
> ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
>
--
####### Remove ERASE to reply #######
------------------------------
Date: 16 Aug 1999 14:41:11 -0400
From: Vivek Khera <khera@kciLink.com>
Subject: Re: Msql-Mysql-modules-1.2202
Message-Id: <x7emh3lgag.fsf@kci.kciLink.com>
add the directory path to libmysqlclient.so to your /etc/ld.so.conf
file and re-run ldconfig.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera@kciLink.com Rockville, MD +1-301-545-6996
PGP & MIME spoken here http://www.kciLink.com/home/khera/
------------------------------
Date: Mon, 16 Aug 1999 17:51:52 GMT
From: mark@bstar.net
Subject: Not running Perl from Perl! Why not?
Message-Id: <7p9j3j$eq4$1@nnrp1.deja.com>
Help me! Why won't the following code work?
$todo = "/usr/bin/perl /path/to/my/cgi/file.cgi";
# Changing the line above here to $todo = "whois microsoft.com"; will
show the whois entry for microsoft.com
$output = `$todo`;
print $output;
It just won't print anything!
But if I telnet in and run:
/usr/bin/perl /path/to/my/cgi/file.cgi
Then It'll work.
The reason I'm doing this is because I'm using SSI in my 500 Internal
Server Error thing so I can run the CGI again (via telnet sorta) to see
what errors there are straight in the browser.
What's wrong!?!
Thanks
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 16 Aug 1999 14:43:09 -0400
From: "SH" <purchase9@hotmail.com>
Subject: Re: ODBC & UNIX
Message-Id: <37b85a0d@news1.us.ibm.net>
<pyammine@my-deja.com> wrote in message news:7p94c3$340$1@nnrp1.deja.com...
> I am fairly new to perl and have a question.
>
> I have been researching into whether or not there is a way to get ODBC
> to work in UNIX. we currently have PERL connected through ODBC but on
> an IIS and were talking about ditching IIS and wasn't sure how much
> changes would have to be made.
>
> I noticed a lot of talk about using DBI instead of the win32::ODBC. So
> first, is it possible to use ODBC & UNIX and what is typically more
> favored the win32::odbc or DBI?
Just so ya know there is no such thing as ODBC on a Unix Platform. ODBC is
strictly a Microsoft thing. On the subject of which is faster ODBC is a
slug so invariable DBI is much faster.
>
> Thanks in advance for your opinions.
>
> P
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
------------------------------
Date: Mon, 16 Aug 1999 12:25:19 -0700
From: Andrew J Perrin <aperrin@mcmahon.qal.berkeley.edu>
Subject: Re: ODBC & UNIX
Message-Id: <37B8659F.B65918B0@mcmahon.qal.berkeley.edu>
SH wrote:
>
> Just so ya know there is no such thing as ODBC on a Unix Platform. ODBC is
> strictly a Microsoft thing.
Although this should, perhaps, be true, it is not:
http://www.applix.com/applixware/options/data.cfm
--
-------------------------------------------------------------
Andrew Perrin - NT/Unix/Access Consulting -
aperrin@mcmahon.qal.berkeley.edu
I'M LOOKING FOR ANOTHER EXPERIENCED ACCESS
DEVELOPER - CONTACT ME IF INTERESTED.
http://www.geocities.com/SiliconValley/Grid/7544/
-------------------------------------------------------------
------------------------------
Date: Mon, 16 Aug 1999 12:13:20 -0700
From: Naren Dasu <naren.dasu@divatv.com>
Subject: pack-unpack question
Message-Id: <37B862CF.AD30D94@divatv.com>
Hi,
Looks like the place where I unpack a message matters. CASE 1 is the
faulty one. Tried CASE2 and found that I get the right values.
Not sure why this is happening, what am I missing here
CASE 1
# I get a message on a socket in scalar $msg
#now call a function to process it
&process_msg($msg);
sub process_msg
{
my $msg = @_;
my($msg_type, $result, $action) = unpack "H2aa", $msg;
print STDOUT "msg_type = $msg_type, $result, $action \n";
}
I am expecting msg_type = 91, result = 1 and action = 1
but the values when I print are msg_type = 3, result = 1 ( nothing for
action ).
__________________________________________________________
CASE 2
This works fine, but not sure why
# I get a message on a socket in scalar $msg and unpack it
my($msg_type, $result, $action) = unpack "H2aa", $msg;
#now call a function to process it
&process_msg($msg_type, $result, $action);
sub process_msg
{
my($msg_type, $result, $action) = @_ ;
print STDOUT "msg_type = $msg_type, $result, $action \n";
}
------------------------------
Date: Mon, 16 Aug 1999 15:39:52 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: pack-unpack question
Message-Id: <Pine.GSO.4.10.9908161539080.6370-100000@crusoe.crusoe.net>
[posted & mailed]
On Aug 16, Naren Dasu blah blah blah:
> my $msg = @_;
$number_of_elements_in_array = @array;
($first_element_in_array) = @array;
There's a difference.
--
jeff pinyan japhy@pobox.com japhy+perl@pobox.com japhy+crap@pobox.com
japhy's little hole in the (fire) wall: http://www.pobox.com/~japhy/
japhy's perl supposit^Wrepository: http://www.pobox.com/~japhy/perl/
The Art of Perl: http://www.pobox.com/~japhy/perl/book/
The "CRAP" Project: http://www.pobox.com/~japhy/perl/crap/
CPAN ID: PINYAN http://www.perl.com/CPAN/authors/id/P/PI/PINYAN/
------------------------------
Date: Mon, 16 Aug 1999 10:32:01 -0800
From: chettah@msn.com ("willow")
Subject: Pattern matching and extracting data
Message-Id: <vMYt3.3553$C%.2262885@WReNphoon3>
I am new to Perl programming. I'm attempting a program (on a Unix platform)
and I'm trying to read a file and match a certain pattern on a line, then
separate out some dollar amounts on that line, add them up and print out a
total. Is it possible to move the numbers into an array and then add the
values in that array? I managed to get the pattern matching down.
/\s\-\d\d\d\d\d\d\d\d\d\.\d\d/gi;
Thanks,
Tara Pillion
-**** Posted from RemarQ, http://www.remarq.com/?a ****-
Search and Read Usenet Discussions in your Browser - FREE -
------------------------------
Date: Mon, 16 Aug 1999 12:12:36 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Pattern matching and extracting data
Message-Id: <MPG.1222027972f64fa8989e5f@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <vMYt3.3553$C%.2262885@WReNphoon3> on Mon, 16 Aug 1999
10:32:01 -0800, willow <chettah@msn.com> says...
> I am new to Perl programming. I'm attempting a program (on a Unix platform)
> and I'm trying to read a file and match a certain pattern on a line, then
> separate out some dollar amounts on that line, add them up and print out a
> total. Is it possible to move the numbers into an array and then add the
> values in that array? I managed to get the pattern matching down.
>
> /\s\-\d\d\d\d\d\d\d\d\d\.\d\d/gi;
/\s-\d{9}\.\d\d/g;
Does every number on the line have exactly the format ' -123456789.01'?
If not, your pattern won't match them.
The following little program doesn't check the format of each number,
except to confirm that it has an optional signed, followed by a sequence
of digits or decimal points. If you want to be more restrictive, adjust
the pattern accordingly.
The program sums the numbers on the fly. If you really want them in an
array, assign the result of the pattern match to an array, then use
'foreach' to sum the array similarly.
I hope as a newcomer to Perl programming you are using good books and
tutorials. 'Learning Perl' is recommended.
#!/usr/local/bin/perl -w
use strict;
$_ = '1.23 -4.56 +7 .01';
my $sum = 0;
$sum += $1 while /([+-]?[\d.]+)/g;
print $sum;
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 16 Aug 1999 14:40:51 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Performance difference printing single vs double quote?
Message-Id: <x3y7lmvr2ks.fsf@tigre.matrox.com>
Chi Yu <chi@cybie.com> writes:
> Is there an appreciable performance gain in printing static text using
> single quotes versus standardizing on double quotes for both static and
> dynamic strings?
I can't remember where I read this, but I believe it is attributed to
Ilya Zakharevich (not sure though, and I apologize if it isn't).
print 'a string';
print "a string";
Both of the above will generate the exact same byte code when the
program is compiled. So, once your program starts running, there
should be absolutely no difference.
Thus, the only difference is at the compiling stages, and shouldn't be
that significant anyway.
Ala
------------------------------
Date: Mon, 16 Aug 1999 13:56:38 -0400
From: Heather Wiley <heather.wiley.fake@bentley.com>
Subject: perl and ftp download
Message-Id: <37B850D6.54E96DC5@bentley.com>
Before I reinvent the wheel I was wondering if any one has written/seen
a automatic perl
download for an ftp site. I DON'T want to mirror the site. I just want
to download
any file that has been posted since I last downloaded. Most programs I
have seen also check to see if you have the file and if not, it will
download it to your site. Again I really don't want this. I have written
"push" programs before that run on the server, gathering all new or
modified files, and posting them. I want the analogous of this for
"pull".
Thanks
heather.wiley@bentley.com
------------------------------
Date: Mon, 16 Aug 1999 00:37:22 -0500
From: "Snehanshu Shah" <s_shah@ix.netcom.com>
Subject: Perl Compiler for Solaris 2.7?
Message-Id: <7p9i2q$psk@dfw-ixnews11.ix.netcom.com>
Hello,
Is there a perl compiler or source obfuscator for Perl
on the Sun Solaris 2.7 platform?
Also, does anyone know if the next major revision (5.6?)
of Perl will have support built in for creating executable
or 'C' code.
I remember a project that Malcolm Beatie was working on
a while back to do this but have not heard much about this
lately,
Thanks,
Shah
--
-----------------------------------------
Snehanshu Shah
HiveTech, Inc.
ph. (512) 791 4372
fax. (630) 839-7513
shah@hivetech.com
www.hivetech.com
------------------------------------------
------------------------------
Date: 16 Aug 1999 12:20:02 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Perl Services
Message-Id: <m1k8qvv8gt.fsf@halfdome.holdit.com>
>>>>> "mknickelbein" == mknickelbein <mknickelbein@my-deja.com> writes:
mknickelbein> Please see our new site at http://perlservices.com/
The first program I looked at contained the following in the first few
lines:
print "Content-type:text/html\n\n";
Perhaps these guys need to spend a few more months on the net before
they promote themselves. To have not submitted their code for peer
review is, uh, a bit embarassing.
(Not to mention that a few more lines down, they're dumping raw
characters into HTML without encoding entities... <sigh>. Shades of
Matt Wright and Selena Sol combined.)
print "Just another Perl hacker,"
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Mon, 16 Aug 1999 15:16:16 -0400
From: Dan Price <priced@doctor.chem.yale.edu>
Subject: returning a ref to a hash from a different module...
Message-Id: <37B8637F.F55B63EA@doctor.chem.yale.edu>
Thanks in advance to any suggestions.
I have a routine within a separate package/module from which I would
like to return a reference to a hash. I've used code similar to what is
found in 'man perlmod':
use my_module;
%settings = ( );
*settings = &get_settings;
Within my_module:
sub get_settings {
my %what_is_set;
# some code here to fill in %what_is_set
return \%what_is_set;
}
This works correctly, except I get a warning:
Array found where operator expected at (eval 2) line 1 of line
(Missing operator after ?)
I've also used a scalar as opposed to a glob and dereferenced it with
identical results:
$settings=&get_settings();
print "$$settings{on}\n";
Getting the warning is not clean. Is their a way I can quell this
message and/or use another syntactic approach to avoid the warning
altogether?
thanks,
Dan
priced@doctor.chem.yale.edu
------------------------------
Date: Mon, 16 Aug 1999 16:56:57 GMT
From: Christopher Conway <chris_conway@my-deja.com>
Subject: Re: s/// and interpolation
Message-Id: <7p9fsi$c4t$1@nnrp1.deja.com>
In article <7p9bg1$2sd$1@lublin.zrz.tu-berlin.de>,
anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
> >the question here is how to make perl
> >interpolate backreference variables within a variable
> >on the right-hand side of the s/// operator, or how do
> >you get perl to interpolate within an interpolated
> >variable?
>
> From perldoc perlre:
>
> When the bracketing construct ( ... ) is used, \<digit>
> matches the digit'th substring. Outside of the pattern,
> always use "$" instead of "\" in front of the digit.
>
> The right hand side of s/// is outside of the pattern. What else
> do you need to know?
Please see my original posts and dialogue with Steve
Linberg (8/11/99) -- backreference syntax is not at
issue.
I apologize for attributing a FAQ to perlre. I couldn't
get to perlre this morning (perl.org is asking for a
login) and the FAQ was relevant (not relevant enough)
to the question.
Chris
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 16 Aug 1999 14:21:47 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: s/// and interpolation
Message-Id: <x3yaerrr3gl.fsf@tigre.matrox.com>
Christopher Conway <chris_conway@my-deja.com> writes:
> In article <x3yyaff1yyb.fsf@tigre.matrox.com>,
> Ala Qumsieh <aqumsieh@matrox.com> wrote:
> > When was the last time you checked out perlre? I advise you to go
> > ahead and read it once more.
>
> I have read perlre recently. Many times. The only portion
> that seems relevant ("How can I quote a variable to use in
> a regexp?") is quoted below.
That portion is part of the FAQs, and not perlre. I still insist: if
someone hasn't read perlre for a long time, then they should go back
and read it once more.
> If there is a simple way
> to do this, please stop acting like an arrogant jerk and
> share it with us.
My reply wasn't even targeted towards you. I wasn't supplying a
solution to your original question. I replied to one of the
replies. If you think I was an "arrogant jerk" then that is your
problem.
> Chris
>
> How can I quote a variable to use in a regexp?
Again, this is from perlfaq6, and not perlre. So now go and read
perlre.
Ala
------------------------------
Date: Mon, 16 Aug 1999 11:36:27 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <x3ybtc7rb44.fsf@tigre.matrox.com>
goetz@cse.buffalo.edu (Phil Goetz) writes:
> Perl programmers seem to be at the extreme opposite end of the spectrum:
> "We are willing to devote entire regions of our brain to Perl and the
> recognition of Perl constructs if it will enable us to save typing one
> parenthesis a day."
"Patience, laziness, hubris" .. you will also learn them one day :-)
> "The . operator is too pretty to be used for just one thing."
I also said:
"Don't create a new syntax just for the sake of creating a new
syntax."
> "The convenience of having fewer keystrokes is easily worth the
> ambiguity introduced by this use of brackets."
I'll have to see the context to comment on this one.
> and (my favorite)
>
> "It would seem redundant to specify the parameters of a function
> both when you call it and when you define it."
I agree with this one.
If you are concerned about the way Perl's future is discussed, then
you should lurk a little bit around p5p.
Ala
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu.
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 V9 Issue 556
*************************************