[6398] in Perl-Users-Digest
Perl-Users Digest, Issue: 23 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 27 11:28:17 1997
Date: Thu, 27 Feb 97 08:00:31 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 27 Feb 1997 Volume: 8 Number: 23
Today's topics:
Re: 27 min. while () buffering of who (Jim Davis)
Re: [Q] Two pipes <tom@nospam.eiscat.no>
Re: Array in Hash Object <dbenhur@egames.com>
Beginner - outputting images (GIF) <chrisp@earthlink.net>
Re: Beginner - outputting images (GIF) (Terence Jordan)
Re: Counting lines of Perl code <ajs@ajs.com>
DBM and AIX 3.2.5 (Chris Nandor)
Re: File Locking (Jamie Hoglund)
Re: flock question <tchrist@mox.perl.com>
GDBM file with perl code inside <prl@info.bt.co.uk>
Re: GDBM file with perl code inside <simono@demon.net>
Re: how long before I can put down the books? <merlyn@stonehenge.com>
How to define a C++ static method in Perl <baku@india.ti.com>
Re: How to spam - legitimately (James Youngman)
Re: How to spam - legitimately (Stijn van Dongen)
HTTPd and perl5 <dsduquet@digital.net>
Re: HTTPd and perl5 (Nathan V. Patwardhan)
Re: Learning Perl!!!! (Jay Flaherty)
Re: Learning Perl!!!! (Nathan V. Patwardhan)
Looking for a Perl Web Browser for win32 (Terence Jordan)
Re: Mail Attachments (Nathan V. Patwardhan)
Re: max string size. (Nathan V. Patwardhan)
Re: new win32::ODBC("DSN") <ted.wang@bowne.com>
Newbie Perl / HTML Content-type question (Parillo)
Re: Newbie Perl / HTML Content-type question (Nathan V. Patwardhan)
PERL - Contract Work Atlanta, GA (AJMart)
Re: PERL FOR WINDOWS (Jarle Aasland)
Re: PERL FOR WINDOWS (Terence Jordan)
Re: Perl on Windows 95 (Terence Jordan)
Perl PRO needed here ! <intaba@iafrica.com>
Re: Perl PRO needed here ! (Nathan V. Patwardhan)
Perl Purity Test (Erik Braun)
Re: perl-system call-security (Mike Stok)
PERL5 - reading from a socket is not interrupted by an (Claudia Bondila)
Problem with system() in browser!! (Kenneth Joergensen)
Quick way to undef all vars in a package? <dbenhur@egames.com>
Re: Quick way to undef all vars in a package? (Bob Wilkinson)
weird behavior with my perl script (Donna Schwede)
Re: Windows95 (Terence Jordan)
Digest Administrivia (Last modified: 8 Jan 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 27 Feb 1997 15:12:02 GMT
From: hippie@server.multipro.com (Jim Davis)
Subject: Re: 27 min. while () buffering of who
Message-Id: <5f4882$454@news.multipro.com>
D. Black (alecto@arlington.pe.net) wrote:
: while () {
: print LOG grep /foo|bar/ && /grue/, `who` ;
: sleep 10;
: }
Try setting $|=1; that forces it to flush the output buffer.
(Oops. Sorry. Should be:
select LOG; $|=1;
)
Jim
------------------------------
Date: 27 Feb 1997 15:22:03 +0100
From: Tom Grydeland <tom@nospam.eiscat.no>
Subject: Re: [Q] Two pipes
Message-Id: <tr7mju5nxw.fsf@palver.i-have-a-misconfigured-system-so-shoot-me>
Vegard Bakke <vegardb@knoll.hibu.no> writes:
> I would like to have two sockets. And I don't know which one
> is the next to ask me something.
>
> How do I do that?
the long story: Use the four-argument version of select (man perlfunc)
the short story: Use IO::Socket and IO::Select
(man IO::Select even has example)
> vegard.bakke@hibu.no
--
//Tom Grydeland <Tom@nospam.eiscat.no> # delete 'nospam.' for valid address
The case of Randal Schwartz - http://www.lightlink.com/fors/
------------------------------
Date: Thu, 27 Feb 1997 00:45:49 -0800
From: Devin Ben-Hur <dbenhur@egames.com>
To: James Duncan <jduncan@hawk.igs.net>
Subject: Re: Array in Hash Object
Message-Id: <331549BD.2448@egames.com>
James Duncan wrote:
> I have an object (lets call it $self) with the following constructer:
> sub new {
> my ($class, %args) = @_;
> my $self = {};
> $self->{'People'} = ( [], );
> $self->{'People Count'} = 0;
>[snip]
I'm not sure what assigning ( [], ) does, but I suspect you
probably meant:
$self->{People} = []; # People element is ref to empty anonymous array
or:
$self->{People} = \( ); # same thing
or even:
$self->{People} = \( [], ); # ref to anonymous array of array refs
BTW, these three lines could be expressed more consisely as:
my $self = { People => [], 'People Count' = 0 };
> foreach $person ($self->{'People'}) {
here's another problem ^^^^^^^^^^^^^^^^^
The foreach expects a list and you've given it a reference
(the scalar value of $self->{People}). Do this instead:
foreach $person ( @{ $self->{People} } ) {
The surrounding @{...} accesses the array pointed to by the
reference. I recommend you go read Camel ch.4 and/or man perlref
again.
BTW, you don't need quotes around barewords inside the {...}
of a hash subscript. Makes it easier to type and easier to
read.
HTH
--
Devin Ben-Hur <dbenhur@egames.com>
eGames.com, Inc. http://www.egames.com/
eMarketing, Inc. http://www.emarket.com/
"Don't run away. We are your friends." O-
------------------------------
Date: Thu, 27 Feb 1997 03:33:57 -0800
From: Chris Puram <chrisp@earthlink.net>
Subject: Beginner - outputting images (GIF)
Message-Id: <33157125.279E@earthlink.net>
I have a very basic question. I'm using a prewritten perl script and I
have no perl experience. ( Starting to learn soon, but I don't have time
to wait)
I have a bulletin board script that creates new pages on the fly. The
links it uses are HTML and I would like to be able to replace them with
graphics. For example, I would like to replace the "Follow Ups" link
below with a graphic button. What do I have to do? Thanks for helping
out a mental midget!
print NEWFILE "<center>[ <a href=\"#followups\">Follow Ups</a> ] [ <a
href=\"#postfp\">Post Followup</a> ] [ <a
href=\"$baseurl/$mesgfile\">$title</a> ] [ <a
href=\"$baseurl/$faqfile\">FAQ</a> ]</center>\n";
}
------------------------------
Date: Thu, 27 Feb 1997 13:55:46 GMT
From: tjordan@ns15.cca.rockwell.com (Terence Jordan)
Subject: Re: Beginner - outputting images (GIF)
Message-Id: <33159204.5356180@news>
On Thu, 27 Feb 1997 03:33:57 -0800, Chris Puram <chrisp@earthlink.net>
wrote:
>I have a very basic question. I'm using a prewritten perl script and I
>have no perl experience. ( Starting to learn soon, but I don't have time
>to wait)
Replace the FOLLOW UP
with
<img src="/wherever/the/image/is.gif">
(and, of course, escape quotes if necessary)
It's that easy. :-)
+--Terence Jordan(x7233)----------------+----------------------------+
|TJordan@NS15.CCA.ROCKWELL.COM | "When in danger, <O> |
|(parenthesis) | Or in doubt, | |
|---------------------------------------| Run in circles, _/ \ |
|Views expressed are Terence's | Scream and shout!" / |
+-----and of no other.------------------|----------------------------+
------------------------------
Date: Thu, 27 Feb 1997 08:16:59 -0500
From: Aaron Sherman <ajs@ajs.com>
To: Michael Fuhr <mfuhr@dimensional.com>
Subject: Re: Counting lines of Perl code
Message-Id: <3315894B.591AB4C8@ajs.com>
Michael Fuhr wrote:
>
> lab@slpabu.msd.ray.com (Leonhard Brenner {13031} 7149 [ ]) writes:
>
> >Has someone written a utility to count the lines of code
> >in a perl script. It should deal with for loops (3 ;).
> >Multiple code lines per line. And other goodies.
> >Yes I know this is a stupid metric but, WCID?
>
> % wc -l foo
>
> What's a line of code? Isn't this one line?
>
> my($a, $b, $c) = @_;
>
> What about this code that does the same thing - isn't it three lines?
>
> my $a = shift;
> my $b = shift;
> my $c = shift;
>
> Do comments count? If not, why not? I had to type them, didn't I?.
> They have to be maintained just the same as "real code", don't they?
> --
> Michael Fuhr
> http://www.dimensional.com/~mfuhr/
I know I'll get slapped for a serious answer, here, but it would be very
interesting to have the perl parser announce how many "statements" it
had seen. This, of course, is artificially colored by included
libraries, but if you had pre-determined statement counts for the libs,
you could subtract those numbers manually.
You can already get some of the way there by using the -D options and
dumoing the symbol table. This can be slurped by a fairly simple perl
script that would then spit out the number of nodes in the syntax table.
-AJS
------------------------------
Date: Thu, 27 Feb 1997 10:49:49 -0500
From: pudge@pobox.com (Chris Nandor)
Subject: DBM and AIX 3.2.5
Message-Id: <pudge-ya02408000R2702971049490001@news.idt.net>
I am looking at doing some work for someone that has an IBM RS/6000 AIX
3.2.5+ system. Does anyone know what kind of DBM facilities it has
built-in? He also has Perl 4 running, but that is a more easily fixed
problem.
Thanks,
#================================================================
All the plants in my house are dead -- I shot them last night. I
was torturing them by watering them with ice cubes.
--Steven Wright
Chris Nandor pudge@pobox.com
PGP Key 1024/B76E72AD http://pudge.net/
Keyfingerprint = 08 24 09 0B CE 73 CA 10 1F F7 7F 13 81 80 B6 B6
------------------------------
Date: 27 Feb 1997 13:16:29 GMT
From: jhoglund@skypoint.com (Jamie Hoglund)
Subject: Re: File Locking
Message-Id: <5f41fd$kp3$1@shadow.skypoint.net>
Tom Christiansen (tchrist@mox.perl.com) wrote:
: BUG BUG BUG: Your open mode is wrong. You need +< instead.
I don't know how many times I've had that backwards, I always catch it,
after an hour of looking it over, but I should have learned by now. (that
and the comma) thanks for pointing it out. I should probably remember to
actually TEST stuff before posting it, rather than rely on my own memory.
(it's scary to realize my machine has better memory than I do.)
: : flock(FILE,8);
: : close(FILE);
: BUG BUG BUG: You unlocked the file before your data made
: it to disk. Close the thing, or autoflush the handle.
Ok, here is something I find very confusing, is it possible to unlock a
file AFTER closing it? What if we don't, can other processes use it?
I would have figured that as soon as a file is closed, we lose the lock.
(and if thats the case, I suppose unlocking it is kind of pointless)
The fact that the data doesn't always go directly to disk, wow. There are
so many little hidden things that never dawn on me until someone points
them out, Thanks! I presume just using the code in flush.pl will work?
Jamie - who is on his way to update the mail filter before losing any
more email.
------------------------------
Date: 27 Feb 1997 15:40:30 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: flock question
Message-Id: <5f49te$q32$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
simberg@interglobal.org (Rand Simberg) writes:
:Maybe there's an obvious answer to this, but I'm concerned about how
:to use flock. If I want to update a file, I need to open it for a
:rewrite, but if I do this, I lose all of the data in it before I can
:process it. So I open it for read only first, read the data, close
:it, and then reopen it for a rewrite. Each time I do this, I lock it,
:but I'm concerned that another program instance will grab the file in
:between the time that I close it for the read, and reopen it for the
:rewrite.
You need to open for update:
open(FH, "+<file") || die "can't update file: $!";
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
Some are born to perl, some achieve perl, and some have perl
thrust upon them.
------------------------------
Date: Thu, 27 Feb 1997 14:01:55 +0000
From: Rowan Limb <prl@info.bt.co.uk>
Subject: GDBM file with perl code inside
Message-Id: <331593D3.167E@info.bt.co.uk>
I am using GDBM_File in my Perl program with gdbm-1.7.3. The created
gdbm data file seems to have some segments of my perl code in it (found
by doing a 'strings' on the file. Is this normal? The actual records
(key/value pairs) read OK on test.
Rowan Limb
prl@info.bt.co.uk
BT laboratories, UK
http://www.labs.bt.com
------------------------------
Date: 27 Feb 1997 15:20:52 +0000
From: Simon Oke <simono@demon.net>
Subject: Re: GDBM file with perl code inside
Message-Id: <pt20a2b7hn.fsf@sos.support.demon.net>
Rowan Limb <prl@info.bt.co.uk> writes:
> I am using GDBM_File in my Perl program with gdbm-1.7.3. The created
> gdbm data file seems to have some segments of my perl code in it (found
> by doing a 'strings' on the file. Is this normal? The actual records
> (key/value pairs) read OK on test.
Indeed, I just noticed the same thing myself this morning. I'm using
perl 5.003 and gdbm 1.7.3 on sunos 5.5 and netbsd 1.2, and have
observed the same behaviour on both systems. I haven't yet dug
through the *DBM modules to see what's going on here.
--
Simon Oke, Demon Internet Ltd.
------------------------------
Date: 27 Feb 1997 07:13:08 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: how long before I can put down the books?
Message-Id: <8csp2il4ln.fsf@gadget.cscaper.com>
>>>>> "I" == I R A Aggie <fl_aggie@hotmail.com> writes:
I> In article <5eq682$4dt@nr1.toronto.istar.net>, qnc496@durhamnews.net wrote:
I> + off the desk beside them? I feel kinda lame havin' to go back
I> + to them all the time. Does everyone do this?
I> Ever watch _Indiana Jones and the Last Crusade_? Dr. Jones, Senior has
I> a wonderful line:
I> I wrote it down so I wouldn't HAVE to remember.
Shh. Don't tell anyone, but I once asked Larry a question about Perl
that he couldn't answer off the top of his head. I was a bit
surprised by this, but his next line was a classic... "sometimes I
have to look at the [Perl] manpage."
So, don't feel bad if you can't keep this all in your head... we *all*
look at the manpages. Even Larry.
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 551 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@ora.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: Thu, 27 Feb 1997 20:22:58 +0530
From: Ajitesh Das <baku@india.ti.com>
Subject: How to define a C++ static method in Perl
Message-Id: <33159FCA.59E2B600@india.ti.com>
Hi All,
I am facing a problem while working with perl object.
I need to have a methoed in a Perl class, which will be
a "static" method. ( eg same C++ static method )
Can anybody give me an example/URL?....
P.S : Please send me a copy of your reply via E-mail
Thanks in Advance,
--
Regards,
Ajitesh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AJITESH DAS TI INTERNAL MSGID : BAKU
SOFTWARE DESIGN ENGINEER E-MAIL ID : baku@india.ti.com
DART GROUP baku@msg.ti.com
EDA SYSTEMS a-das1@ti.com
ASIC PHONE: (091)-(080)-526-9451
TEXAS INSTRUMENTS INDIA PVT LTD Extn: 174
Wind Tunnel Road URL:- http://www.india.ti.com/~baku/
Murugheshpalya
Bangalore- 560017
Karnataka
India.
"Anything can change any time,in any manner,the whole world is the
field of all probabilities, all possibility." -- "The Discipline of
Yoga"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: 27 Feb 1997 10:33:31 GMT
From: JYoungman@vggas.com (James Youngman)
Subject: Re: How to spam - legitimately
Message-Id: <5f3ntr$eoe$1@halon.vggas.com>
In article <pudge-ya02408000R2502970950490001@news.idt.net>, pudge@pobox.com
says...
>
>In article <33125E0C.F94@ionaprep.pvt.k12.ny.us>,
>99borns@ionaprep.pvt.k12.ny.us wrote:
>
>#BTW, while we are on the subject is it spelled email or e-mail?
>#I've seen it both ways.
>
>In all liklihood, it will lose the hyphen and become email. It is rare for
>hyphenation -- or any punctuation -- to remain embedded in popular nouns
>and verbs for very long. It is not unheard of, however.
Indeed, this has happened alreay in the UK.
--
James Youngman VG Gas Analysis Systems The trouble with the rat-race
Before sending advertising material, read is, even if you win, you're
http://www.law.cornell.edu/uscode/47/227.html still a rat.
------------------------------
Date: Thu, 27 Feb 1997 13:14:33 GMT
From: stijnvd@cwi.nl (Stijn van Dongen)
Subject: Re: How to spam - legitimately
Message-Id: <stijnvd.857049273@news.cwi.nl>
Tom Christiansen <tchrist@mox.perl.com> writes:
> [courtesy cc of this posting sent to cited author via email]
>In comp.lang.perl.misc,
> Andrew Johnson <ajohnson@gpu.srv.ualberta.ca> writes:
>:Although 'send me an email' doesn't sound that bad,
>It does to me. It doesn't sound like a native speaker.
>Everyone I know would just say "send me email" in that case.
Since there are many people on Usenet whose native tongue (like mine :)
is not English, probably the use of English on Usenet will be affected
by this. Are you willing to accept that, or do you want the English
language only to be bended in such a way that it sounds nice to you,
or some representative bunch of native speakers? -- disregarding for
the time being the wide range of national and local English varieties.
It is rather interesting: while many languages are experiencing
Anglicist influences, they may even effect English itself in this process.
And it's always slightly more painful if this affects syntax than if
it affects the lexicon only :)
On the other hand, it is always nice to learn from a native speaker.
It's the difference between viewing language development as a process
of aeons, and buying something in the grocery store (well, make that
a fancy warehouse).
Hope this helps :)
Stijn
stijnvd@cwi.nl
------------------------------
Date: Thu, 27 Feb 1997 01:27:13 -0500
From: Donald Duquet <dsduquet@digital.net>
Subject: HTTPd and perl5
Message-Id: <33152941.7EFA@digital.net>
I have the server installed in directory C:\HTTPd and perl5 for win32
in C:\perl what's next? I just want to be able to test scriptsbefore
ftp to my server.
--
Mallmeister for Mims Mall: http://mims.com/mimsmall/
Skipper for Messing About in Boats: http://mims.com/maib/
General all around nice guy: http://mims.com/mimsmall/Donald.htm
------------------------------
Date: 27 Feb 1997 15:09:51 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: HTTPd and perl5
Message-Id: <5f483v$35h@fridge-nf0.shore.net>
Donald Duquet (dsduquet@digital.net) wrote:
: I have the server installed in directory C:\HTTPd and perl5 for win32
: in C:\perl what's next? I just want to be able to test scriptsbefore
: ftp to my server.
I think you've misdirected your posting. comp.lang.perl.misc deals with
Perl language issues, not web servers.
You might redirect future postings of this nature to:
(1) comp.infosystems.www.authoring.cgi
(2) comp.infosystems.www.servers.misc
--
Nathan V. Patwardhan
nvp@shore.net
"What is your favorite color?
Blue ... I mean yellow ... aieeeee!
--From the Holy Grail"
------------------------------
Date: 27 Feb 1997 13:53:38 GMT
From: fty@hickory.engr.utk.edu (Jay Flaherty)
Subject: Re: Learning Perl!!!!
Message-Id: <5f43l2$im9$1@gaia.ns.utk.edu>
Claes Gustafsson (hakan.gustafsson@varberg.mail.telia.com) wrote:
:
: I can't find any good tutorials or courses on the World Wide Web.
: Now I wonder if anyone can send me a zipped tutorial or an address to a site
: on the Web.
[flame on]
I found the following tutorials in under 15min. My guess is you did not
put forth the effort to really search the WWW, or your searching skills
have much to be desired.
[flame off]
http://www.elemental-atl.com/~carlson/perl_tutorial/
http://www.it.kth.se/labs/ts/media/mms/perl/start.html
http://www.ncsa.uiuc.edu/General/Training/PerlIntro/
http://www.geek-girl.com/perl/SAG-perl.ps
http://cptsu5.univ-mrs.fr/~madon/html/silverperl.html
http://www.cs.unm.edu/~bwylie/perl/start.html
http://publix.empath.on.ca/publix_pointers/tutorials/perl.html
http://xarch.tu-graz.ac.at/~caketin/perl/perl4/basic.html
http://www.postino.com/aldham/cgi.html
http://www.theochem.uni-stuttgart.de/internal/docu/Perl/perl_tutorial.html
This does not include the dozens of CGI tutorials that use perl
Jay
--
**********************************************
Jay Flaherty fty@hickory.engr.utk.edu
------visualize whirled peas------
**********************************************
------------------------------
Date: 27 Feb 1997 15:05:35 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Learning Perl!!!!
Message-Id: <5f47rv$35h@fridge-nf0.shore.net>
Claes Gustafsson (hakan.gustafsson@varberg.mail.telia.com) wrote:
: I can't find any good tutorials or courses on the World Wide Web.
: Now I wonder if anyone can send me a zipped tutorial or an address to a site
: on the Web.
Two words: search engine.
http://www.yahoo.com
http://www.dejanews.com
--
Nathan V. Patwardhan
nvp@shore.net
"What is your favorite color?
Blue ... I mean yellow ... aieeeee!
--From the Holy Grail"
------------------------------
Date: Thu, 27 Feb 1997 13:57:32 GMT
From: tjordan@ns15.cca.rockwell.com (Terence Jordan)
Subject: Looking for a Perl Web Browser for win32
Message-Id: <33159282.5482034@news>
Aloha, everybody.
If you read the subject line, which states
Looking for a Perl Web Browser for win32.
That's it...
:-)
+--Terence Jordan(x7233)----------------+----------------------------+
|TJordan@NS15.CCA.ROCKWELL.COM | "When in danger, <O> |
|(parenthesis) | Or in doubt, | |
|---------------------------------------| Run in circles, _/ \ |
|Views expressed are Terence's | Scream and shout!" / |
+-----and of no other.------------------|----------------------------+
------------------------------
Date: 27 Feb 1997 15:07:09 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Mail Attachments
Message-Id: <5f47ut$35h@fridge-nf0.shore.net>
Bill Volz (wvolz@atwill.com) wrote:
: Is it possible to send binary attachments using perl and sendmail?
You should check out the host of fine, MIME modules from:
http://www.perl.com/CPAN/modules/by-module/MIME/
--
Nathan V. Patwardhan
nvp@shore.net
"What is your favorite color?
Blue ... I mean yellow ... aieeeee!
--From the Holy Grail"
------------------------------
Date: 27 Feb 1997 15:11:37 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: max string size.
Message-Id: <5f4879$35h@fridge-nf0.shore.net>
Mohammed Dewan (s798284@aix2.uottawa.ca) wrote:
: i was trying to copy a whole file into a
: string . The file size is only 200k . But i could
Why not store the file in an array?
open(FILE, "filename") || die("No: $!");
@lines = <FILE>;
close(FILE);
do something with @lines...
--
Nathan V. Patwardhan
nvp@shore.net
"What is your favorite color?
Blue ... I mean yellow ... aieeeee!
--From the Holy Grail"
------------------------------
Date: Thu, 27 Feb 1997 09:20:58 -0500
From: ted wang <ted.wang@bowne.com>
Subject: Re: new win32::ODBC("DSN")
Message-Id: <3315984A.6053@bowne.com>
David J. Evans wrote:
>
> Philippe Simonet wrote:
> >
> > Roth Consulting wrote:
> > Where can I find these FAQ ?
> >
> > Regards Philippe
>
> http://www.roth.net/users/rothd/perl/odbc.html
>
> should get you started.
>
> David
> http://tigger.rdg.ac.uk
I think the link is :L
http://www.roth.net/odbc/
give a try.
..
------------------------------
Date: 27 Feb 1997 14:38:04 GMT
From: lparillo@newshost.li.net (Parillo)
Subject: Newbie Perl / HTML Content-type question
Message-Id: <5f468c$p5c@linet06.li.net>
In my perl script I have:
print "Content-type: text/html\n\n";
print "<HTML>", "\n";
print "<HEAD>", "\n";
I have found this kind of thing in other scripts.
On my server, the Content-type line prints.
I expected it to be "eaten" by my web server.
BTW it is IIS 2.0, and I am running Perl 5.
Is there a FAQ for this kind of question?
Is it possible that this is related to my server and not to Perl?
Thanks In Advance.
------------------------------
Date: 27 Feb 1997 15:15:32 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Newbie Perl / HTML Content-type question
Message-Id: <5f48ek$35h@fridge-nf0.shore.net>
Parillo (lparillo@newshost.li.net) wrote:
: I expected it to be "eaten" by my web server.
: BTW it is IIS 2.0, and I am running Perl 5.
comp.lang.perl.misc has nothing to do with webservers. There are some
servers groups, like comp.infosystems.www.servers.misc.
Your server's docs/helpfiles will certainly put you in the right direction.
--
Nathan V. Patwardhan
nvp@shore.net
"What is your favorite color?
Blue ... I mean yellow ... aieeeee!
--From the Holy Grail"
------------------------------
Date: 27 Feb 1997 15:35:33 GMT
From: ajmart@aol.com (AJMart)
Subject: PERL - Contract Work Atlanta, GA
Message-Id: <19970227153501.KAA26555@ladder02.news.aol.com>
Have a few small PERL jobs I need done immediately, nothing very complex.
I would like to establish a long term relationship for ongoing work.
Preference given to you if you reside or can meet me in Atlanta.
Here is one project:
Zip Code processor
person enters in zip code and is routed new URL
If interested please reply with your email, experience level, day/evening
phone and hourly rate
to ajmart@aol.com
thanks,
aj
------------------------------
Date: Thu, 27 Feb 1997 11:45:47 GMT
From: sajaa@sn.no (Jarle Aasland)
Subject: Re: PERL FOR WINDOWS
Message-Id: <331573c6.19617871@news.eunet.no>
>Yes. Look at Activeware's site; unfortunately my ISP's down at the
>moment, so I can't look up the URL for you.
The URL is http://www.activeware.com/
------------------------------
Date: Thu, 27 Feb 1997 13:34:54 GMT
From: tjordan@ns15.cca.rockwell.com (Terence Jordan)
Subject: Re: PERL FOR WINDOWS
Message-Id: <33158d4d.4148324@news>
On 12 Feb 1997 22:03:37 GMT, help <college@tbaytel.net> wrote:
>What is the perl for Windows newsgroup, and has perl
>been ported to Windows NT 4.0 yet?
http://www.activeware.com
--or--
http://www.perl.hip.com/
They're both the same site. The second is more direct...
+--Terence Jordan(x7233)----------------+----------------------------+
|TJordan@NS15.CCA.ROCKWELL.COM | "When in danger, <O> |
|(parenthesis) | Or in doubt, | |
|---------------------------------------| Run in circles, _/ \ |
|Views expressed are Terence's | Scream and shout!" / |
+-----and of no other.------------------|----------------------------+
------------------------------
Date: Thu, 27 Feb 1997 13:36:55 GMT
From: tjordan@ns15.cca.rockwell.com (Terence Jordan)
Subject: Re: Perl on Windows 95
Message-Id: <33158dd2.4281113@news>
On Tue, 25 Feb 1997 23:51:46 GMT, wilsonpm@gamewood.net (Pete M.
Wilson) wrote:
>Microsoft has the free PWS (Personal Web Server) for Win95 on their
>site. I don't know if it supports scripting.
>
>Peter Holtan <puzzled@cris.com> wrote:
I tried it, but I couldn't get it to work with perl.
+--Terence Jordan(x7233)----------------+----------------------------+
|TJordan@NS15.CCA.ROCKWELL.COM | "When in danger, <O> |
|(parenthesis) | Or in doubt, | |
|---------------------------------------| Run in circles, _/ \ |
|Views expressed are Terence's | Scream and shout!" / |
+-----and of no other.------------------|----------------------------+
------------------------------
Date: 27 Feb 1997 11:20:49 GMT
From: "Charles Robbie" <intaba@iafrica.com>
Subject: Perl PRO needed here !
Message-Id: <01bc249f$f5e72ee0$b7c007c4@charles>
Hi
Can anyone write me a good script that when a person clicks on a link in my
site, it will bring up a frames page in my site and IMPORT the outside URL
or site INTO the body of my frame - That way I do not lose the viewer from
my site?
Any Genius out there?
Thanx
Charles
intaba@iafrica.com
------------------------------
Date: 27 Feb 1997 15:13:24 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Perl PRO needed here !
Message-Id: <5f48ak$35h@fridge-nf0.shore.net>
Charles Robbie (intaba@iafrica.com) wrote:
: Can anyone write me a good script that when a person clicks on a link in my
: site, it will bring up a frames page in my site and IMPORT the outside URL
: or site INTO the body of my frame - That way I do not lose the viewer from
: my site?
Ahh, you're looking for the experts on: comp.infosystems.www.authoring.cgi
who would be more than happy to help you with your problem.
--
Nathan V. Patwardhan
nvp@shore.net
"What is your favorite color?
Blue ... I mean yellow ... aieeeee!
--From the Holy Grail"
------------------------------
Date: 27 Feb 1997 10:38:10 GMT
From: erik@paxp01.mipool.uni-jena.de (Erik Braun)
Subject: Perl Purity Test
Message-Id: <slrn45hap2f.kd8.erik@paxp01.mipool.uni-jena.de>
I found in http://orwant.www.media.mit.edu/tpj/programs/Vol_1_Issue_4_Purity/
a perl purity test, and just for testing CGI.pm module I wrapped this test
in HTML and I think, it's funny. It includes 181 questions and a hiscore.
You can test your perl purity in:
http://www.minet.uni-jena.de/cgi-bin/user/erik/purity.pl
have fun,
erik
--
erik@minet.uni-jena.de
------------------------------
Date: 27 Feb 1997 13:18:34 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: perl-system call-security
Message-Id: <5f41ja$ebs@news-central.tiac.net>
In article <01bc2438$103e0600$8a0e0792@flipbits>,
Jeff Peck <peck@csc.smsu.edu> wrote:
>I webmaster a small college webserver. I am concerned that hackers slipping
>"system" calls into cgi scripts on this server.
You might want a more general overview of what can be done through CGI,
http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html
is a good place to start...
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com | Pencom Systems Administration (work)
------------------------------
Date: Thu, 27 Feb 1997 11:45:47 GMT
From: Claudia.Bondila@cern.ch (Claudia Bondila)
Subject: PERL5 - reading from a socket is not interrupted by an ALARM signal
Message-Id: <claudia.857043947@news.cern.ch>
Hello there,
I've written a program which opens a datagram socket, writes something
to that socket and afterwards it reads from that socket. If writing and
reading takes longer than 10 sec. I send an alarm signal and I close the
connection. The program works fine in perl4.
Perl5, version 5.003_07 doesn't work on all platforms(HP-UX 10.10, 10.20,
Solaris, OSF), but on HP-UX 9.05. The reason for that is that reading from
a socket is not interrupted by an ALARM signal, I think.
Could somebody tell me if they had ever problems with that and how
they handled that?
Here it's a test program where the problem occurs:
#!/usr/local/bin/perl
$AF_INET=2;
$SOCK_DGRAM=2;
$SOCK_DGRAM = 1 if (`uname -sr` =~ /SunOS 5/);
$BUFSZ=256;
$SERVICE="daytime";
$sockaddr = 'S n a4 x8';
$timeout=0;
$SIG{'ALRM'} = 'bingo';
foreach $hostname (@ARGV){
($name, $aliases, $proto) = getprotobyname('udp');
if (!socket(S, $AF_INET, $SOCK_DGRAM, $proto)) {
die $!;
}
($name, $aliases, $port) = getservbyname($SERVICE, 'udp');
select(S); $|=1; select(STDOUT);
($name,$aliases,$type,$len,$addr) = gethostbyname($hostname);
if ($addr eq '') {
print "$hostname: Unknown host\n";
next;
}
$that=pack($sockaddr, $AF_INET, $port, $addr);
if (!connect(S,$that)) {
die $!;
}
alarm(10);
print S "hello";
$msg=<S>;
close(S);
alarm(0);
if ($msg eq '') {
if ($timeout) {
print "Machine is dead\n";
}
else {
print "Machine is alive but doesn't accept connection on the daytime port.\n";
}
}
else {
print "$hostname: $msg";
}
}
sub bingo{
$timeout=1;
}
Many thanks,
Claudia
------------------------------
Date: Fri, 28 Feb 1997 00:17:53 GMT
From: kenrj@tdk.dk (Kenneth Joergensen)
Subject: Problem with system() in browser!!
Message-Id: <5f48j0$i0o@gatekeeeper.teledanmark.dk>
Hi there !!!
I have a script like this !! :
#!/zpi/pgm/perl/bin/perl
$proglib = "/zpi/pgm/hprogs/pipstatlog";
$inlib="/home/wtdbuo/a58967";
$outlib="/tmp";
# start html
system("'$proglib'/log '$inlib'/sv1511.log '$outlib'/ 21");
#end html code
exit;
When I run the script in a Unxi promt the system call works fine!! but
when I run the script via the IE or Netscape browser the system()
function is not executed !!
WHY IS WHAT???
Thanks !!
_____________________________________________________________
``UNIX was not designed to stop you from doing stupid things, because
that would also stop you from doing clever things.''
------------------------------
Date: Thu, 27 Feb 1997 02:36:46 -0800
From: Devin Ben-Hur <dbenhur@egames.com>
Subject: Quick way to undef all vars in a package?
Message-Id: <331563BE.2DA2@egames.com>
Is there a quick and easy way to undefine all
the variables in a package?
I'm sure I've seen some funky symbol table magic
which lets one treat a package name space as just
another hash, but I can't seem to find the reference
right now.
Assuming there is some expression (%fooX) which represents
the package hash, can I just say:
undef %fooX;
and zap the whole thing with one fell swoop?
Or do I have to loop over all the keys and
delete or undef each variable individually?
Thanks for your attention.
--
Devin Ben-Hur <dbenhur@egames.com>
eGames.com, Inc. http://www.egames.com/
eMarketing, Inc. http://www.emarket.com/
"Don't run away. We are your friends." O-
------------------------------
Date: Thu, 27 Feb 1997 14:38:34 -0500
From: b.wilkinson@pindar.co.uk (Bob Wilkinson)
Subject: Re: Quick way to undef all vars in a package?
Message-Id: <b.wilkinson-2702971438340001@ip57-york.pindar.co.uk>
In article <331563BE.2DA2@egames.com>, dbenhur@egames.com wrote:
> Is there a quick and easy way to undefine all
> the variables in a package?
>
> I'm sure I've seen some funky symbol table magic
> which lets one treat a package name space as just
> another hash, but I can't seem to find the reference
> right now.
>
> Assuming there is some expression (%fooX) which represents
> the package hash, can I just say:
> undef %fooX;
> and zap the whole thing with one fell swoop?
> Or do I have to loop over all the keys and
> delete or undef each variable individually?
>
> Thanks for your attention.
> --
> Devin Ben-Hur <dbenhur@egames.com>
> eGames.com, Inc. http://www.egames.com/
> eMarketing, Inc. http://www.emarket.com/
> "Don't run away. We are your friends." O-
>From turquoise camel pp. 198 -
The main package's symbol table is %main:: for example.
So, by extrapolation, I think that
undef %foo::;
should undef all of the symbols in the package foo.
Bob
P.S. Careful, I've not tested this.
--
All is flux, nothing is still; nothing endures but change
- Heraclitus
------------------------------
Date: 27 Feb 1997 13:46:21 GMT
From: schwede@hpcc (Donna Schwede)
Subject: weird behavior with my perl script
Message-Id: <5f437d$pn9@monsoon.rtpnc.epa.gov>
I am new at writing scripts in Perl and my latest attempt has me quite confused.
Can someone explain what is going on?
My script file reads a file of runs to be done, copies files over to the names
expected by more FORTRAN program, writes the site name to a SITES.DAT, then
executes a FORTRAN program. The FORTRAN program reads the SITES.DAT file to
determine which site to process.
If I run the FORTRAN program using my perl script, the FORTRAN program sees
the SITES.DAT file as empty, which it isn't. If I run the FORTRAN program
without the script, it runs fine. I have hardcoded the file name (including path)
in the FORTRAN file, so I know that the program is always reading the same
SITES.DAT file.
Please explain!
Thanks!
Donna
------------------------------
Date: Thu, 27 Feb 1997 13:44:24 GMT
From: tjordan@ns15.cca.rockwell.com (Terence Jordan)
Subject: Re: Windows95
Message-Id: <33158e7f.4454621@news>
On 26 Feb 1997 23:15:25 GMT, stampes@xilinx.com (Jeff Stampes) wrote:
>there is no perl for DOS...
Buzz! Wrong!
There is still DOS versions of Perl, but as far as I know, it's only
Perl 4. I have used it myself.
Activeware's FTP site might still have it, (doubtful)
or try this:
http://ftpsearch.ntnu.no/ftpsearch/
search for "bperl4"
(without the quotes)
+--Terence Jordan(x7233)----------------+----------------------------+
|TJordan@NS15.CCA.ROCKWELL.COM | "When in danger, <O> |
|(parenthesis) | Or in doubt, | |
|---------------------------------------| Run in circles, _/ \ |
|Views expressed are Terence's | Scream and shout!" / |
+-----and of no other.------------------|----------------------------+
------------------------------
Date: 8 Jan 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Jan 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 23
************************************