[10325] in Perl-Users-Digest
Perl-Users Digest, Issue: 3918 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 7 15:07:21 1998
Date: Wed, 7 Oct 98 12:00:35 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 7 Oct 1998 Volume: 8 Number: 3918
Today's topics:
Re: "Many Jars" Mystery (Bart Lateur)
?: Array Reference vs Anon Array Reference <featheredfrog@geocites.com>
Re: Apache-ASP script troubles... <gellyfish@btinternet.com>
Re: Are there any "perl.newbie" group or forum? (John Moreno)
Back button in Perl? <benderle@mindspring.com>
Re: Back button in Perl? (Steve Linberg)
Re: Bug in open(FH,"| script") ? (Brand Hilton)
Re: build database connection in CGI...what about PerlE <keithmur@mindspring.com>
Re: Capturing command output in Perl <erlangen72@hotmail.com>
Re: Capturing command output in Perl <murrayb@vansel.alcatel.com>
Re: Compiling 5.005_2 indhiraa@hotmail.com
Re: Discussing XSUB Development (Tye McQueen)
Re: eq on if statement causing problems with string <jdporter@min.net>
Re: Extracting muliple values from a hash <Arved_37@chebucto.ns.ca>
format question <jamdiaz@klaskycsupo.com>
Re: format question <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: Grab few lines into the buffer in a while loop matc <vsripada@ca.oracle.com>
Re: HELP! CAN'T GET PERL SCRIPTS TO RUN ON NT SERVER 4! scott@softbase.com
How do I format a system date? <brettr@centuryinter.net>
Re: How do I format a system date? (Steve Linberg)
Re: How do I generate a GIF <rootbeer@teleport.com>
Re: How do I generate a GIF (Bart Lateur)
Re: HTTP_REFERER missing when it shouldn't be (Buzz)
Re: IDE for Perl <corey@virtual-impact.com>
Re: libnet bundle and Net::SMTP <gellyfish@btinternet.com>
Re: Making the date look good <garethr@cre.canon.co.uk>
Re: Need IP Address Sort Subroutine (Kevin Reid)
Re: NEEDED: A good perl programer to... (Marc Bissonnette)
OLE to convert CSV to MS Access Table Lu.Pei@usa.net
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 07 Oct 1998 19:16:49 GMT
From: bart.mediamind@ping.be (Bart Lateur)
Subject: Re: "Many Jars" Mystery
Message-Id: <361fbe17.2176458@news.ping.be>
Patrick Timmins wrote:
>What happened just prior to this post to trigger the tag?
This is not a Perl question.
I just HAD to say that... :-)
Bart.
------------------------------
Date: Wed, 07 Oct 1998 13:57:51 -0400
From: "Michael D. Hofer" <featheredfrog@geocites.com>
Subject: ?: Array Reference vs Anon Array Reference
Message-Id: <361BAB9F.557@geocites.com>
Hey. I'm using the CGI modules, and having a bit of a problem passing
an argument to one of the methods:
use CGI qw(:all);
...
print hidden(-name=>"some_name",
-default=>['foo','bar', 'shoe', 'doobie']);
...
seems to perform as documented, it delivers
<INPUT TYPE="hidden" NAME="some_name" VALUE="foo"><INPUT TYPE="hidden"
NAME="some_name" VALUE="bar"><INPUT TYPE="hidden" NAME="some_name"
VALUE="shoe"><INPUT TYPE="hidden" NAME="some_name" VALUE="doobie">
into the STDOUT stream, but doing
@status = ('foo','bar', 'shoe', 'doobie');
print hidden(-name=>"some_name",
-default=>\@status);
delivers
<INPUT TYPE="hidden" NAME="some_name" VALUE="">
I presume I'm missing something obvious. Clue, please? Don't both
\@array and [...] give references to arrays? (per camel 2ed p246)
Oh, almost forgot:
ObData:
This is perl, version 5.004_04 built for sun4-solaris
Copyright 1987-1997, Larry Wall
and
CGI.pm-2.40.tar.gz
Thanks!
--
Cian ua'Lochan /mka/ Michael D. Hofer
I'm not a medievalist - I just play one on weekends!
http://www.geocities.com/SoHo/Lofts/9800/
------------------------------
Date: 6 Oct 1998 19:46:52 +0100
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Apache-ASP script troubles...
Message-Id: <6vdois$jv$1@gellyfish.btinternet.com>
In comp.lang.perl.misc virgil <horst.k@netway.at> wrote:
> Hi there,
>
> I have tried to use the Apache - ASP script (CPAN). But on compiling
> some strange error occured:
>
> 1) on "make test" perl could not find the module "T.pm" in my @INC. Can
> somebody
> tell me where I can find this module?
>
There is a typo in the test script I think - if you look in the "t"
directory you will find a t.pm which should be renamed T.pm
> 2) on "make" :
> /usr/bin/pod2man: Unrecognized pod directive in paragraph 308 of ASP.pm:
> text
>
Not a real problem. However it appears that the author switched half
way through from using:
=begin text
...
=end text
to
=text begin
...
=text end
I'm sure Joshua would very happy for a patch if he hasnt already fixed it
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Wed, 7 Oct 1998 14:39:27 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <1dgj9c7.yg6eg71hzl4wN@roxboro0-059.dyn.interpath.net>
madame philosophe <mp@mkt2mkt.com> wrote:
> Well it seems that
>
> 1. I shouldn't start a newsgroup
That's probably wise.
> 2. You guys aren't as mean as once thought.
>
> 3. Though snide, can be reasonable.
Hopefully true.
> 4. Have given me a better understanding what on earth the problem is.
>
> What I don't understand is this:
>
> If someone is posting a "dumb" question (If there is such a thing),
> why not just ignore it? Treat it like spam?
Because unlike with spam - prompt action can (as with you) enlighten the
poster and enable him to avoid asking any more "dumb" questions.
> Instead of the subject line: How to Find The Perl FAQ
>
> Say something more for newbies, like: Need Help With Perl? Here's What
> To Do...
>
> or even better: Newbies: How To Use This Newsgroup
Because "FAQ" is the standard way of saying both of those things for any
group - one of the first things you should do when reading or posting to
a group is look up the FAQ. A dejanews search for "faq" in a newsgroup
should /always/ be one of your first steps before asking a question in
it ESPECIALLY if you think the answer is probably simple.
> As far as the "user inyourface" it could diminish some of the more earnest
> learners from having to humiliate themselves.
>
> Comments?
What needs to happen is for the RTFM and FAQ to become such common ideas
that people actually DO RTFM and look for the FAQs. The "inyourface" is
intended to help spread them.
--
John Moreno
------------------------------
Date: Wed, 07 Oct 1998 14:13:00 -0400
From: Brian Enderle <benderle@mindspring.com>
Subject: Back button in Perl?
Message-Id: <361BAF2B.86F58428@mindspring.com>
I wish to include a 'Back' button in my webpage. The webpage is created
'on-the-fly' by a cgi script (perl). I would like to be able to have
the user press the 'Back' button and be taken back one page, just as if
he had pressed the browser's 'Back' button. I have tried using the
javascript snippet:
<A HREF="javascript:history.go(-1)"><INPUT TYPE=button
VALUE="Back"></A>
but it doesn't work. Is there a way to call a javascript routine from
within a cgi script?
Thank you in advance for any help and please dierect responses to my
e-mail.
thank you,
Brian Enderle
www.pcgamex.com
------------------------------
Date: Wed, 07 Oct 1998 14:57:04 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Back button in Perl?
Message-Id: <linberg-0710981457040001@ltl1.literacy.upenn.edu>
In article <361BAF2B.86F58428@mindspring.com>, Brian Enderle
<benderle@mindspring.com> wrote:
> I wish to include a 'Back' button in my webpage. The webpage is created
> 'on-the-fly' by a cgi script (perl). I would like to be able to have
> the user press the 'Back' button and be taken back one page, just as if
> he had pressed the browser's 'Back' button. I have tried using the
> javascript snippet:
>
> <A HREF="javascript:history.go(-1)"><INPUT TYPE=button
> VALUE="Back"></A>
>
> but it doesn't work. Is there a way to call a javascript routine from
> within a cgi script?
Even if that were possible, you're assuming that javascript is available
on the client? What happens when I visit your page with JS turned off, or
with a browser that doesn't support it?
The short answer is: you can't program a "back" button that works in every
case. Abigail wrote a good explanation of this, off her web page
somewhere.
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: 7 Oct 1998 17:05:50 GMT
From: bhilton@tsg.adc.com (Brand Hilton)
Subject: Re: Bug in open(FH,"| script") ?
Message-Id: <6vg71e$7p115@mercury.adc.com>
In article <361B761D.9FB205EE@email.sps.mot.com>,
Tk Soh <r28629@email.sps.mot.com> wrote:
>Mattias Petersson EHS/SKA 62067 wrote:
>> #!/usr/bin/perl
>>
>> open( FH1,"| prgX") or die("prgX not found\n");
>> select FH1; $|=1;
>> (print FH1 "OK\n") or die("filehandle not ready\n");
>>
>> The fact is that if the script prgX doesn't exist, perl anyway
>> continues the execution.
>> When it comes to the last line, it tries to print to a nonexisting
>> filehandle resulting in that the perl prg dies before the dying message.
>>
>> This must be a bug in Perl, right?
>>
>> /Mattias Petersson
>>
>> PS I've seen that open( FH1,"| prgX") always returns the process id of
>> prgX - even though it's non-existing.
>
>This is the Pipe 'bug', not a Perl bug. Please read 'Camel
>Book::Chapter-16(Social Engineering)::Pipes' for detail explanation.
Or, if you don't have the Camel, look in the perlipc man page. The section
titled, "Using open() for IPC" covers the same stuff.
--
_____
|/// | Brand Hilton bhilton@adc.com
| ADC| ADC Telecommunications, ATM Transport Division
|_____| Richardson, Texas
------------------------------
Date: Wed, 07 Oct 1998 13:16:53 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: build database connection in CGI...what about PerlEx?
Message-Id: <361BB015.DFA84F2F@mindspring.com>
Look also at PerlEx on http://www.activestate.com.
I'm curious: has anyone used this, and is it good?
GEMINI wrote:
>
> hi all,
> I have a CGI written in Perl that
> will query some data from database for
> every request from web page. However,
> I have to open the database connection,
> then query data, and close the connection
> for each request. The performance is not good
> because it takes long time to load DBI and DBD
> module, and build connection to database.
>
> So is there any way to build the database
> connection 'per session' rather than 'per request'?
> That is, the connection is build once for the first page,
> and query data directly for the web pages that belong to
> the same user request session.
> Besides, is there any way to speed up the load of
> dynamic loaded modules, say DBI?
> Thanks.
------------------------------
Date: 7 Oct 1998 17:06:45 GMT
From: "ErLanGen" <erlangen72@hotmail.com>
Subject: Re: Capturing command output in Perl
Message-Id: <01bdf214$50e69b80$8914b2d1@gateway--g5-200>
Hi all,
When trying to pipe the output of a command into a
Perl script in WIN32, I can get the command, like dos
"Dir", to execute but the output never appears on $_ .
Is it first necessary to make a registry entry like:
HKEY_LOCAL_MACHINE\Software\ActiveWare\Perl5\COMSPEC
or is something else wrong?
This is a powerfull feature of Perl . Maybe there is a step
in the install of Perl 5 that I missed?
Has anyone else successfully piped commands into
scripts in the WIN32 port of Perl?
Thanks to all who respond,
Mark
Pentti Vanska <vanska@adpser1.gsf.fi> wrote in article
<6vg50u$ukp$1@news.gsf.fi>...
> wkchiu (wkchiu@yahoo.com) wrote:
> : I am writing a perl script in NT which runs the PING.EXE command to
check a
> : node (using system() or win32::create() ??) and examine the reply of
> : PING.EXE to see whether the node is alive or dead. My question is how
can I
> : capture the output of PING.EXE in perl script to carry out the
processing ?
>
> : wkchiu.
>
> Just run ping.exe in pipe.
>
> Something like this ...
>
>
> open(PIPE,"ping.exe host|") or die("\n Can't open pipe !\n");
> while(<PIPE>) {
> print("$_"); # This is output do what ever you want
> }
> close(PIPE);
>
>
> t.pena
>
>
>
------------------------------
Date: 07 Oct 1998 10:06:18 -0700
From: Brad Murray <murrayb@vansel.alcatel.com>
Subject: Re: Capturing command output in Perl
Message-Id: <usoh0mhdh.fsf@vansel.alcatel.com>
"wkchiu" <wkchiu@yahoo.com> writes:
> I am writing a perl script in NT which runs the PING.EXE command to check a
> node (using system() or win32::create() ??) and examine the reply of
> PING.EXE to see whether the node is alive or dead. My question is how can I
> capture the output of PING.EXE in perl script to carry out the processing ?
perldoc -f open
--
-o- Brad Murray "Most programs aren't released;
-o- Alcatel Canada they are allowed to escape."
-o- Software Analyst Jeff DelPapa
------------------------------
Date: Wed, 07 Oct 1998 18:22:00 GMT
From: indhiraa@hotmail.com
To: weitz@goya.informatik.rwth-aachen.de
Subject: Re: Compiling 5.005_2
Message-Id: <6vgbg7$9rr$1@nnrp1.dejanews.com>
You did link your thread libraries.
It should be:
cc -L/usr/local/lib -L/opt/local/lib -L/opt/gnu/lib -lpthread -o miniperl
Hope it helps,
..Indira.
> What can be wrong in following: (while running 'make')
>
> cc -L/usr/local/lib -L/opt/local/lib -L/opt/gnu/lib -o miniperl
> miniperlmain.o libperl.a
> Undefined first referenced
> symbol in file
> pthread_getspecific libperl.a(perl.o)
> log libperl.a(pp.o)
> pthread_self libperl.a(perl.o)
> pow libperl.a(pp.o)
> pthread_detach libperl.a(perl.o)
> sqrt libperl.a(pp.o)
> floor libperl.a(pp.o)
> atan2 libperl.a(pp.o)
> exp libperl.a(pp.o)
> pthread_key_create libperl.a(perl.o)
> pthread_setspecific libperl.a(perl.o)
> pthread_join libperl.a(perl.o)
> sin libperl.a(pp.o)
> cos libperl.a(pp.o)
> ld: fatal: Symbol referencing errors. No output written to miniperl
> make: *** [miniperl] Error 1
>
> --
> +=================================================================+
> | Detlef Weitz : (Lehrstuhl fuer Informatik V |
> | RWTH Aachen / BSCW - Serverbetreuung) |
> | |
> | email : weitz@i5.informatik.rwth-aachen.de |
> | phone : +49-241-80-21512 ( ONLY if important ) |
> | : +49-241-80-21501 ( Sekr. ) |
> | office : R 6241 (Rechnerraum) |
> | postal address: RWTH Aachen |
> | Lehrstuhl Informatik V |
> | Ahornstr.55 |
> | 52072 Aachen (Germany) |
> +=================================================================+
>
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 7 Oct 1998 12:27:21 -0500
From: tye@fumnix.metronet.com (Tye McQueen)
Subject: Re: Discussing XSUB Development
Message-Id: <6vg89p$18g@fumnix.metronet.com>
Arved Sandstrom <Arved_37@chebucto.ns.ca> writes:
)
) is it safe to assume that questions in c.l.p.m. concerning XS code
) intricacies probably won't get deluged with replies?
For certain values of "m".
I often answer XSUB questions that fall into my realm of
experience when I see them. Concerning the latter, such posts
are easier to see in c.l.p.moderated than in c.l.p.misc or even
c.l.p.modules; so adjust your value of "m" accordingly.
But please don't cross-post to multiple c.l.p.* groups (except
with c.l.p.announce).
--
Tye McQueen Nothing is obvious unless you are overlooking something
http://www.metronet.com/~tye/ (scripts, links, nothing fancy)
------------------------------
Date: Wed, 07 Oct 1998 14:55:34 -0400
From: John Porter <jdporter@min.net>
Subject: Re: eq on if statement causing problems with string
Message-Id: <361BB926.72036878@min.net>
Kevin Reid wrote:
>
> John Porter <jdporter@min.net> wrote:
>
> > 0. Always, *Always*, *ALWAYS* check the result of open().
> > There is never, NEVER a situation in which you can safely
> > neglect to check the result of open().
>
> if ($^O eq 'MacOS') {
> open CON, '> Dev:Console:Ha!';
> print CON "Never say never!\n";
> close CON;
> } else {
> print 'This example requires the Mac OS.';
> }
Of course there are cases where assuming open() wont' fail
is within the limits of acceptable risk.
But that's still no justification for not checking the result, IMHO.
You don't know how your script's run-time environment might be
different some time in the future.
--
John "Many Jars" Porter
baby mother hospital scissors creature judgment butcher engineer
------------------------------
Date: Wed, 7 Oct 1998 15:29:40 -0300
From: Arved Sandstrom <Arved_37@chebucto.ns.ca>
Subject: Re: Extracting muliple values from a hash
Message-Id: <Pine.GSO.3.95.iB1.0.981007152607.16146A-100000@halifax.chebucto.ns.ca>
Umm, this _does_ work, actually...
I just tried it, using the literal keys or passing in variables containing
the key values.
Do you have your hash defined as
%somehash = (key0, value0, key1, value1, ...);
Arved
On Wed, 7 Oct 1998 elund@compuserve.com wrote:
> Is there a simple way to extract multiple named values from a hash? For
> example (and this doesn't work):
>
> @array = @hash{key0,key3}; # This could be interpolated in a string
>
------------------------------
Date: Wed, 07 Oct 1998 11:21:39 -0700
From: Jaime Diaz <jamdiaz@klaskycsupo.com>
Subject: format question
Message-Id: <361BB0E8.14BE@klaskycsupo.com>
trying to add formatting capabilities to the format commanad...
right now for testing i have outputted 'df -k ' command in unix to a
file...
then..
open(test, "/test")
while (<test>) {
($one,$two,$three,$four) = split (' ');
write > out;
}
format STDOUT =
@<<<<<<<<. @<<<<<<<<@<<<<<<<<<
$one,$two, $three
I need to add column headings to the output ...
any ideas.....
thank you
------------------------------
Date: 07 Oct 1998 20:46:53 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: format question
Message-Id: <833e905hwi.fsf@vcpc.univie.ac.at>
Re: format question, Jaime <jamdiaz@klaskycsupo.com> said:
Jaime> trying to add formatting capabilities to the format
Jaime> commanad... right now for testing i have outputted
Jaime> 'df -k ' command in unix to a file...
Or you could pipe it inside the program...
Jaime> format STDOUT = @<<<<<<<<. @<<<<<<<<@<<<<<<<<<
Jaime> $one,$two, $three
Jaime> I need to add column headings to the output ... any
Jaime> ideas.....
"perldoc -f format" tells you to look at "perldoc perlform"
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: Wed, 07 Oct 1998 13:47:07 -0400
From: Venu Sripada <vsripada@ca.oracle.com>
To: Venu Sripada <vsripada@ca.oracle.com>
Subject: Re: Grab few lines into the buffer in a while loop matching a pattern
Message-Id: <361BA91B.D8534E59@ca.oracle.com>
Apologize sincerely to everyone for prev error of mine and many postings
of same mesg.
I did manage to get one problem solved using the following code:
$topline = 'TRUE';
while ($line=<>) {
if ($line =~/^1AZ/){
if($topline ne 'TRUE'){
print "--------\n";
print $recordset;
$recordset = ""; # re-initialize
}else{
$topline = 'FALSE';
}
}
$recordset .= $line;
}
print "--------\n";
print $recordset;
Now problem #2: I need to pick many fields within each record set instead
of printing them: for example I check if the string within each record set
starts with 1AY and pick the string starting with an offset of 10 and
length of 5 and so on. I am familiar with substr and unpack function but I
need help in getting some ideas or sample code to enhance the above code to
call subroutines which check for pattern and use unpack to pick out columns
of the line.
Appreciate very much any pointers : ) Venu
------------------------------
Date: 7 Oct 1998 17:47:46 GMT
From: scott@softbase.com
Subject: Re: HELP! CAN'T GET PERL SCRIPTS TO RUN ON NT SERVER 4!!!
Message-Id: <361ba942.0@news.new-era.net>
Adrian Albin-Clark (adrian@pearl.demon.co.uk) wrote:
> It must be something simple that I am not doing.
Then do it!
> I want to use PERL scripts with NT Server 4 but have had no luck at all.
What specific error messages are you getting?
> 2) Downloaded (from the net) various sample scripts including 'Flexbook'
> a simple form that acts as a guestbook, allowing the user to add some
> comments to an evergrowing list (effectively modifying the source HTML
> of the page being viewed).
Are you trying to get Perl to run with IIS? If so, your life will
be a *LOT* happier and nicer if you'll just install the
ActiveState IIS DLL. It does all the system registry mucking
for you, and requires absolutely nothing other than running
the supplied setup program to get it to work. I don't know
why people try to manually set Perl up -- you're not going to
have any luck if you try to do it yourself. Let someone who's
already solved the problem do it for you!
> By the way, what is the correct syntax for the whizbang line in a Perl
> script under NT?
There is none. Unless you use a UNIX shell.
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: Wed, 7 Oct 1998 12:39:45 -0500
From: "brettr" <brettr@centuryinter.net>
Subject: How do I format a system date?
Message-Id: <6vg98i$7ks$1@newsread1-mx.centuryinter.net>
I would like to have this date "10/06/98 06:41:13 CDT" look like this one
"Tuesday October 6, 1998." How would I do that?
brettr
------------------------------
Date: Wed, 07 Oct 1998 14:59:06 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: How do I format a system date?
Message-Id: <linberg-0710981459060001@ltl1.literacy.upenn.edu>
In article <6vg98i$7ks$1@newsread1-mx.centuryinter.net>, "brettr"
<brettr@centuryinter.net> wrote:
> I would like to have this date "10/06/98 06:41:13 CDT" look like this one
> "Tuesday October 6, 1998." How would I do that?
Depends. What system are you on? And look into the Date:: modules on CPAN.
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Wed, 07 Oct 1998 17:59:06 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: How do I generate a GIF
Message-Id: <Pine.GSO.4.02A.9810071051180.4710-100000@user2.teleport.com>
On Wed, 7 Oct 1998, Reiner wrote:
> Subject: Re: How do I generate a GIF
> Yes, I am aware of the existence of the GD but it is overkill.
So is Perl; if you don't want overkill, you should write a custom program
in C which does _just_ what you need and nothing more. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 07 Oct 1998 19:21:37 GMT
From: bart.mediamind@ping.be (Bart Lateur)
Subject: Re: How do I generate a GIF
Message-Id: <3620becb.2356172@news.ping.be>
Reiner wrote:
>All I want to do is plot pixels sequentially, just like Jeffrey Friedl's
>gif.pl only with color.
You could try drawing in a simpler bitmap format, and use a <whatever>
to GIF converter on that.
Possible candidates could be BMP (on PC), TGA, ... anything that is just
a header plus a a string of pixels.
Bart.
------------------------------
Date: Wed, 07 Oct 1998 18:14:39 GMT
From: bavag@dds.nl (Buzz)
Subject: Re: HTTP_REFERER missing when it shouldn't be
Message-Id: <361baf0f.731040@news.dds.nl>
Bit late, but anyway! (D**n that pre-RFD]
"Richard Waddell" <richw3@ix.netcom.com> schreef op Fri, 2 Oct 1998
09:52:15 -0700 in <6v308u$kt6@dfw-ixnews9.ix.netcom.com> in
comp.infosystems.www.authoring.html:
: Greetings,
:
: This is really a CGI question, but I haven't found a CGI newsgroup.
It might be for ciwac (as noted by others), but also...
<snip>
: script. HTTP_REFERER does not show up in the list of environment variables.
:
: The only other significant difference between the two situations is that in
: (2), the Perl script doing the posting is located on a secure server. I
: don't have access yet to a secure server to see if I can duplicate it. I
: don't see why this should make a difference.
:
: I've also tried saving off the generated page in (2) and running it from the
: server in (1). Same result, HTTP_REFERER shows up when the posting page is
: on the same server as the target script.
Hmm, seems to be a server-issue!
:
: The only meaningful documentation I've been able to find on HTTP_REFERER is
: in 'CGI Programming' by Shishir Gundavaram, and none of the discussion seems
: to apply to this situation.
The Referer: header is not required (rfc1945), it is generally not
present if the URL is typed in the ''location-bar''. Also UA's (user
agents (in this case the secure server!)) can (and do) disable sending
it.
I'm no expert on SSL but it seems conceivable a secure server by
default does not hand out this info when posting to another server.
(It might ''give away'' something which *should be* kept private.)
[x-post and followup-to from html & perl groups to
comp.infosystems.www.servers.misc]
hth
Buzz
--
This message consists entirely of true bits and false bits!
------------------------------
Date: Wed, 07 Oct 1998 17:53:25 GMT
From: Corey <corey@virtual-impact.com>
Subject: Re: IDE for Perl
Message-Id: <Pine.LNX.3.95.981007104609.23471X-100000@rainier.devel.virtual-impact.com>
On 7 Oct 1998, Our good fellow Tom Christiansen wrote:
<snippity-snip>
>
> Windows was created to keep the stoopid people away from Unix,
> you know. An "MS advocate" is already beneath contempt.
>
HA! Well said!
Think I'll add that one to my 'lil Black Book O' Quotes!
( I do hope you spelled stupid that way on purpose ... (c; )
Beers,
Corey
corey@virtual-impact.com
"The biggest cause of trouble in the world today is that the stupid
people are so sure about things and the intelligent folks are so
full of doubts."
-- Bertrand Russell
------------------------------
Date: 6 Oct 1998 20:18:30 +0100
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: libnet bundle and Net::SMTP
Message-Id: <6vdqe6$lr$1@gellyfish.btinternet.com>
On Mon, 5 Oct 1998 19:21:20 -0400 -Paul Coleman <Paul.Coleman@CoSeCo.com> wrote:
> Hi,
> My ISP is using Win NT 4.0, IIS 3.0 and Perl 5.001. The libnet bundle I
> found at CPAN will work by itself but has many dependencies. Is there a
> version of Vars.pm that will work on 5.001? I couldn't fond anything on
> CPAN. Does anyone know what and where the other dependencies are the will
> allow SMTP.pm to work on 5.001?
If you run :
perl Makefile.PL
then it will tell you what the dependencies are. Actually libnet is rather
nice and tells you where to get the files from as well.
I would suggest hassling your ISP to upgrade the Perl though. Perl is now
at 5.005.02 for the stable distribution and there have been some bugs under
the bridge since 5.001.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Wed, 7 Oct 1998 16:52:25 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
Subject: Re: Making the date look good
Message-Id: <si7lycmi0m.fsf@cre.canon.co.uk>
"brettr" <brettr@centuryinter.net> wrote:
> How can I convert something like this "10/06/98 06:41:13 CDT" into
> something like this "Tuesday, October 06, 1998"?
You could use UnixDate from the Date::Manip module.
use Date::Manip;
print UnixDate("10/06/98 06:41:13 CDT", "%A, %B %d, %Y");
Output:
Tuesday, October 06, 1998
--
Gareth Rees
------------------------------
Date: Wed, 7 Oct 1998 13:19:14 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Need IP Address Sort Subroutine
Message-Id: <1dgivfw.123f2vy3sqyoN@slip-32-100-246-56.ny.us.ibm.net>
Michal Rutka <erhmiru@erh.ericsson.se> wrote:
> Hi John,
>
> John Porter <jdporter@min.net> writes:
> [...]
> > > return udef unless $_[0] =~ /.*: ([\d.]+)#/;
> > > return inet_aton($1);
> > > }
> >
> > Thank you for noting the difference.
> >
> > Hey, what's 'udef'? I suppose you didn't actually run this code?
>
> Hym... I did run the code but without -w, so I didn't notice this bug, but
> after all the behaviur is almost the same because 'udef' is in anyway
> undefined ;-).
Actually, it's a bareword, therefore it's the string 'udef'.
--
Kevin Reid. | Macintosh.
"I'm me." | Think different.
------------------------------
Date: 7 Oct 1998 17:48:15 GMT
From: dragnet@internalysis.com (Marc Bissonnette)
Subject: Re: NEEDED: A good perl programer to...
Message-Id: <6vg9gv$o8l$1@news.interlog.com>
Keywords: from just another new york perl hacker
In article <comdog-ya02408000R0710981241590001@news.panix.com>,
comdog@computerdog.com says...
>
>the problem is that everyone thinks that they are a worthy recipient.
>there's only so much pro bono stuff one can do before becoming homeless,
>after all.
>
Yeah, I've done my share of pro bono stuff,too, but as one lady in this thread
said, "only if it's interesting". If the client is going to be making money of
the scripting work, or it will directly help him ot make money, I'll charge the
$$, though I've managed to get some interesting work by underquoting, but
telling the client that there's a learning curve involved, thus the lower price
means it'll get done, but slower than a real Perl hacker could do it in. (For
example, I recently completed a web-site builder that was literally
custom-built from line 1 (Yes, i checked the CGI resource-type sites and the
web-builders in there didn't do the job). I billed $1000 (CDN) for something
which probably should have cost $4000 or so. Took me two months to get it all
done (not contiguous time, though, there are a zillion other projects in the
works), but I learned *a lot*!!!! Ideally, I'd like to clean up the code a bit,
document it and release it to CLPM and ask for comments, since I *know* it
could have been done better!!!)
My 0.02
--
Marc Bissonnette
InternAlysis
Corporate Internet Research and Results!
http://www.internalysis.com
------------------------------
Date: Wed, 07 Oct 1998 18:30:59 GMT
From: Lu.Pei@usa.net
Subject: OLE to convert CSV to MS Access Table
Message-Id: <6vgc13$ani$1@nnrp1.dejanews.com>
I'm trying to write a perl script on NT 4.0 to simply convert a comma
delimited file into a table in Access97 using TransferText method.
The following script doesn't work.
use strict;
use Win32::OLE qw(with);
use Win32::OLE::Const 'Microsoft Access';
use Win32::OLE::Const 'Microsoft DAO';
my $Filename = 'c:\my documents\a-test.mdb';
my $inFile = 'c:\my documents\testdata.txt';
my $Access = Win32::OLE->GetActiveObject('Access.Application');
$Access->OpenCurrentDatabase($Filename);
$Access->DoCmd->TransferText ('acImportDelim',' ','TestTable',$inFile,'True')
What did I do wrong?
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3918
**************************************