[11295] in Perl-Users-Digest
Perl-Users Digest, Issue: 4895 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Feb 15 05:07:26 1999
Date: Mon, 15 Feb 99 02:00:33 -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 Mon, 15 Feb 1999 Volume: 8 Number: 4895
Today's topics:
#!/usr/bin/perl AND #!/usr/local/bin/perl both posible <vasquez@zap.a2000.nl>
Re: @ARGV can't take char =?iso-8859-1?Q?=27=F6=27?= (a <jakob.svensson@epk.ericsson.se>
Re: Can 2 "submit" buttons in 1 form do different thing <leviathan@darktech.org>
checking 'use' <andrewf@beausys.demon.co.uk>
create in form in tabullar format (Thana Letchumi)
Re: create in form in tabullar format <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: Datetime manipulation in perl <ebohlman@netcom.com>
Re: DBF format <ebohlman@netcom.com>
executing second script egonw@sci.kun.nl
Re: greedy operators - help! <kswong@bigpond.com>
Re: greedy operators - help! (Sam Holden)
Re: How do I get local IP Address ? <waltman@netaxs.com>
Re: How do I open & size a popup browser window? <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: How to calculate number of working days? <g200@mydejanews.com>
how to get file creation time? <kflin@alumni.csie.nctu.edu.tw>
Is there a perl script for finding out who fingered me? <seongbae@students.uiuc.edu>
Looking for CGI database apps a97485@cs.ait.ac.th
Re: newbie prob - server errors <qbe@mailexcite.com>
Re: Newbie question <hove@ido.phys.ntnu.no>
NEWBIE Reading and Searching a Text File Db. (Rory Campbell Lange)
numerology in perl (Happy Valentine's Day!) luvisi@andru.sonoma.edu
OLE on client browser dmeilinger@cng.dl.nec.com
Re: Perl 'zine (Jon Orwant)
Re: Perl 'zine (Jon Orwant)
Re: PFR: read_file, write_file <uri@sysarch.com>
Re: problem with Hash refs in s/// <rick.delaney@home.com>
Re: Problem With Output of HTML Headers - Interesting <ebohlman@netcom.com>
Re: putting keystrokes into the keyboard buffer in wind <ebohlman@netcom.com>
Re: Simple question of the beginner. <yuriyt@ix.netcom.com>
Re: Speed of Python <mstenber@cc.Helsinki.FI>
Re: Web based calendar <leviathan@darktech.org>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 15 Feb 1999 10:10:55 +0100
From: Joel Wijngaarde <vasquez@zap.a2000.nl>
Subject: #!/usr/bin/perl AND #!/usr/local/bin/perl both posible?
Message-Id: <36C7E49F.65C23361@zap.a2000.nl>
Hi,
Is it possible to give to search paths. I run my Perl script son two
machines and both have Perl in different directories. One has Perl in
/usr/bin/perl and the other in /usr/local/bin/perl.
Now i'm always changing the first line...
--
Joel Wijngaarde (Physics student)
vasquez@zap.a2000.nl
Quote:
"The final solution is possibly a little extreme - create a new
country - and then export all lawyers there. The Brit's tried
this with Australia, but somehow something went awry
somewhere along the line."
"Hrm. The whole of Europe did that with America and it seems to
have been moderately successful."
------------------------------
Date: Mon, 15 Feb 1999 09:59:12 +0100
From: Jakob Svensson <jakob.svensson@epk.ericsson.se>
Subject: Re: @ARGV can't take char =?iso-8859-1?Q?=27=F6=27?= (ascii dec 148)
Message-Id: <36C7E1E0.9701E565@epk.ericsson.se>
Hi!
Yeah, I know it's not the right way to get parameters from a
CGI-program. I used CGI.pm just for the ease of printing out html. I
recieved the parameter directly. When you just have one parameter it is
simple to do i like "/cgi-bin/script.pl?argument".
I just wondered why 'v' doesn't work when all the other swedish
characters does it. If the reason is the installation/configuration of
the Sun Solaris/Apache platform, or if it has something to do with Perl?
regards,
/Jakob
------------------------------
Date: Mon, 15 Feb 1999 06:18:44 GMT
From: Justin Scott <leviathan@darktech.org>
Subject: Re: Can 2 "submit" buttons in 1 form do different things?
Message-Id: <36C7BC9A.D79E1768@darktech.org>
> in each form. What I'd like to do is have my 2 buttons side by side in the
> same form instead of one on top of the other. Is there a way to do this? I'm
> new to perl and cgi, so I'm not sure what gets passed to the perl script.
> Can I have 2 submit buttons in the same form that do different stuff? Can I
> somehow pass to the perl script which button is pressed by the user? Thanks
> for your help!
To me, it sounds like it's simply an HTML layout problem. Maybe try using a 3
celled table (2 rows, 2 columns, with the top two columns connected together).
Start your table, put your form fields in the first cell and span it over 2
spaces, then in the right-bottom cell, your "vote" submit button, end that form,
start lower-left cell, have your other form and the "view" submit button
contained there. That should give the appearence of having your form, then 2
buttons side-by-side underneath it. Of course you would also want to use some
centering tags and such to trim it up a bit as well.
-Justin Scott aka Leviathan
Server Admin, Dark Technologies
http://www.darktech.org
------------------------------
Date: Mon, 15 Feb 1999 09:41:54 +0000
From: Andrew Fry <andrewf@beausys.demon.co.uk>
Subject: checking 'use'
Message-Id: <yZZCCGAiv+x2Ewv3@beausys.demon.co.uk>
I have a program which accesses various types of database,
and so it has a number of 'use ...' statements for the
modules which provide appropriate APIs (for database access).
Of course, on any particular system, the chances are that not
all these modules will be available, and so some must be
commented out.
Further down the code, I have a number of subroutines ...
one for each database type. If I enter one for which the
'use ...' statement was commented out, then the program
bombs out. Is there some way to avoid this ? ie some way
to check whether the current database type is "supported",
perhaps by determining if the appropriate 'use...'
statement was included / commented-out ?
I guess what I want to do is something like this...
if use statement for GDBM included
then $gdbm_supported = 1;
else
$gdbm_supported = 0;
---
Andrew Fry
"Time flies like an arrow. Fruit flies like a banana". (Groucho Marx).
------------------------------
Date: 15 Feb 1999 09:15:05 GMT
From: kthl@msg.ti.com (Thana Letchumi)
Subject: create in form in tabullar format
Message-Id: <7a8oip$rdq$1@tilde.csc.ti.com>
Hi,
I'm suppose to write perl/cgi scripts to produce web form for data entry.
I want it to be in tabular format. is it possible to create a multi-entry
input web form in tabular format ?. Can I disable some columns ?.
Could anyone suggest a good web tutorial to learn perl/cgi ?.
Thank You.
Regards,
Thana
------------------------------
Date: 15 Feb 1999 10:40:30 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: create in form in tabullar format
Message-Id: <83soc83sz5.fsf@vcpc.univie.ac.at>
Re: create in form in tabullar format, Thana
<kthl@msg.ti.com> said:
Thana> I'm suppose to write perl/cgi scripts to
Thana> produce web form for data entry. I want it
Thana> to be in tabular format. is it possible to
Thana> create a multi-entry input web form in
Thana> tabular format ?. Can I disable some columns
Thana> ?. Could anyone suggest a good web tutorial
Thana> to learn perl/cgi ?.
This is an HTML issue irrespective of how the HTML
is produced. You'll get more accurate information
in an HTML newsgroup.
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: Mon, 15 Feb 1999 04:59:55 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Datetime manipulation in perl
Message-Id: <ebohlmanF76J7v.K7y@netcom.com>
sharda@hotmail.com wrote:
: If I knew the position of each of the fields(i.e month,day and year), then it
: would have been a very easy thing to do.
: The problem is that there is no fixed sequence/order of these fields. Month or
: Day or Year could come first or in any combination.
: Whatever the order is, while storing in the database, I am trying to store it
: as mm/dd/yyyy pattern, ofcourse after finding out which fields are month, day
: and year(and this is the most difficult task at present).
: Any suggestions?
Yes. Revise your requirements. What you're trying to do is impossible.
If you get 2/8/1999, is that February 8 or August 2? There is *no way*
to tell by simply inspecting the date string in isolation. Sure, there
will be *some* date strings that make sense one way but not the other
(2/14/1999 is obviously February 14) but there will be others that can be
read either way.
It's a characteristic of languages, both human and machine, that symbols
have no inherent information content; their information content derives
from an agreement between humans (or computers) as to what the symbols
mean. Until someone writes a Phlebotomy::Vegetables::Turnip module,
you're going to have to work that agreement in somehow.
------------------------------
Date: Mon, 15 Feb 1999 05:02:42 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: DBF format
Message-Id: <ebohlmanF76JCI.KFw@netcom.com>
bababozorg@aol.com wrote:
: i need help to change my Comma Delimited database to dbf format by perl
: can anyone help please
Use Text::CSV to read the data in and DBI with DBD::Xbase to write the
data out.
------------------------------
Date: Mon, 15 Feb 1999 09:37:40 GMT
From: egonw@sci.kun.nl
Subject: executing second script
Message-Id: <7a8pt3$3qs$1@nnrp1.dejanews.com>
Can someone explain me what goes wrong:
there are two scripts, run.pl and getnews.pl (listed below).
When I run run.pl at the command line it works, however, when
i have them executed via CGI the second script does NOT give
the resulting news.xml file...
both scripts are chmod 775 and news.xml is chmod 777
run.pl
------
#!/usr/local/gnu/bin/perl
print "Content-type: text/html\n\n";
print "Running program...\n";
exec 'getnews.pl';
getnews.pl
----------
#!/usr/local/gnu/bin/perl
use LWP;
use CGI qw(:standard);
use XML::Parser;
my $sitecurl = "";
my $sitenurl = "";
my $sitename = "";
my $news = "";
my $newsfile = "news.xml";
# Grab new news
$browser = LWP::UserAgent->new();
$browser->agent("News Grabber");
$browser->timeout(19);
open (OUT, ">$newsfile");
print OUT "<?xml version=\"1.0\"?>";
print OUT "<!DOCTYPE AGENDA SYSTEM \"news.dtd\">";
print OUT "<NEWS>\n";
$sitename = "ChemSoc.org";
$sitecurl = "http://www.chemsoc.org/";
$sitenurl = "http://www.chemsoc.org/gateway/chembyte/nfnews.htm";
$skip = 0;
$request = HTTP::Request->new(GET => $sitenurl);
$foo = $browser->request($request);
if ($foo->is_success) {
$_ = $foo->content;
print OUT " <SITE ID=\"$sitename\"\n";
print OUT " CURL=\"$sitecurl\"\n";
print OUT " NURL=\"$sitenurl\">\n";
for ($i = 1; $i < $skip+1; $i++) {
s/\<A.*?\>(.*?)\<\/A\>//;
}
s/\<h3\>\<font.*?\>(.*?)\<\/font\>//;
print OUT " <ITEM>$1</ITEM>\n";
s/\<h3\>\<font.*?\>(.*?)\<\/font\>//;
print OUT " <ITEM>$1</ITEM>\n";
print OUT " </SITE>\n";
}
print OUT "</NEWS>\n";
close OUT;
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 15 Feb 1999 19:30:00 +1100
From: Ka-shu Wong <kswong@bigpond.com>
Subject: Re: greedy operators - help!
Message-Id: <Pine.LNX.4.03.9902151921480.193-100000@goose>
On Sun, 14 Feb 1999, Asterix wrote:
[snip]
> which works but if I use the more elegant:
>
> $fn =~ s/\..*$//;
>
> I get greedy behaviour by default and the non-greedy operator I can't seem
> to make work. What's wrong with this?
>
> $fn =~ s/\..*?$//;
The problem with using the default greedy behaviour is that .* is also
matching the dots. If you use [^.]* instead it would not match the dots
and therefore it will only match the last part of the filename:
$fn =~ s/\.[^.]*?$//;
The \. always matches on the first dot for which the rest of the
expression would match. Doing it this way ensures that the rest of the
expression can only match _after_ the last dot.
KS
------------------------------
Date: 15 Feb 1999 08:44:31 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: greedy operators - help!
Message-Id: <slrn7cfnjf.7on.sholden@pgrad.cs.usyd.edu.au>
On Mon, 15 Feb 1999 19:30:00 +1100, Ka-shu Wong <kswong@bigpond.com> wrote:
>
>
>On Sun, 14 Feb 1999, Asterix wrote:
>
>[snip]
>
>> which works but if I use the more elegant:
>>
>> $fn =~ s/\..*$//;
>>
>> I get greedy behaviour by default and the non-greedy operator I can't seem
>> to make work. What's wrong with this?
>>
>> $fn =~ s/\..*?$//;
>
>The problem with using the default greedy behaviour is that .* is also
>matching the dots. If you use [^.]* instead it would not match the dots
>and therefore it will only match the last part of the filename:
>
>$fn =~ s/\.[^.]*?$//;
True enough, I just thought I'd explain why the non-greedy operator attempt
didn't work.
Perl's regular expressions are locally greedy not globally greedy. What I mean
by this is that at every step a greedy operator tries to match as much as
possible. This does not guarentee the globally longest match however. Taking
your example.
So non-greedy operators are locally non-greedy not globally non-greedy and
thus don't guarentee the shortest match.
Say you had the string "fred.was.here" and you matched against /\..*?$/.
The \. can match the first period and does so. The .*? then tries to match
and since it is non-greedy first tries matching nothing, then the w, then wa,
and so on and so on. The $ at the end means it will only match when it has
gobbled up the rest of the string 'was.here'. This matching was done
non-greedily, but resulted in the longest match since that is what it found
first.
The greediness only determines local behaviour. It does not change what can be
matched only what will be found first. Since the first match is the one used
it often changes the outcome. In your case though, both the greedy and the
non-gredy will first find the same match and thus do the same thing.
--
Sam
People get annoyed when you try to debug them.
--Larry Wall
------------------------------
Date: 15 Feb 1999 01:39:26 -0500
From: Walt Mankowski <waltman@netaxs.com>
Subject: Re: How do I get local IP Address ?
Message-Id: <m34soo1881.fsf@netaxs.com>
fl_aggie@thepentagon.com (I R A Aggie) writes:
> So, making a few minor changes, we get:
>
> use Socket;
> use Sys::Hostname;
>
> ($name,$aliases,$addrtype,$length,@addrs)= gethostbyname(hostname());
> foreach (@addrs) { print join('.',unpack('C4',$_)); }
> print "\n";
>
> Well, whatdoyouknow? I get a valid decimal.dot.notated IP address. So
> it works for a static IP. I'll have to try it at home to see if it
> works for a dynamically generated one. I think that it should work,
> but I can't say so with certainty...
When I run this on my machine (linux, ppp, dynamically-generated IP
address) I get
0.0.0.0
I had this same problem a while back. I ended up parsing the output
of ifconfig to get my IP address. I never did figure out where
ifconfig was getting it from.
Walt Mankowski
waltman@netaxs.com
------------------------------
Date: 15 Feb 1999 10:39:25 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: How do I open & size a popup browser window?
Message-Id: <83u2wo3t0y.fsf@vcpc.univie.ac.at>
Re: How do I open & size a popup browser window?,
Pamela <vikette@earthlink.net> said:
Pamela> Hi, I'm implementing a perl cgi "voting"
Pamela> script that asks users a question then
Pamela> tallies & displays results. The current look
Pamela> of the script is at
Pamela> http://www.lineoffire.com/vote.html. Currently
Pamela> the script replaces the voting page with the
Pamela> results page. However, I'd like the script
Pamela> to open a 2nd browser window that is sized
Pamela> much smaller (say 300 height X 500 width).
Pamela> How do I specify properties of the browser
Pamela> window in perl? I know it can be done in
Pamela> javascript. This is my first attempt at a
You can't. Javascript runs in the browser. Perl
CGI scripts run on the server. Besides, how do you
resize a speech-synthesiser browser?
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: 15 Feb 1999 05:24:57 GMT
From: Q <g200@mydejanews.com>
Subject: Re: How to calculate number of working days?
Message-Id: <8D6DEF343ahqbigfootcom@newshost.cc.utexas.edu>
"Hemant Shah" NoJunkMailshah@xnet.com wrote in
<79q9ij$kta$1@flood.xnet.com>:
use Date::Manip module.
I use it, and it works.
------------------------------
Date: 15 Feb 1999 07:38:52 GMT
From: %[5a?_ <kflin@alumni.csie.nctu.edu.tw>
Subject: how to get file creation time?
Message-Id: <7a8iuc$dbq$1@netnews2.csie.nctu.edu.tw>
hi all,
by stat() function, we can only get
atime (last access time)
mtime (last modification time)
ctime (last change time)
of a file.
if a file is modified,(e.g. appending some data)
the mtime & ctime will be both updated.
so I won't get any info about the create time
of a file.
Anybody knows the solution?
thanks in advance.
------------------------------
Date: Mon, 15 Feb 1999 03:37:51 -0600
From: seong joon bae <seongbae@students.uiuc.edu>
Subject: Is there a perl script for finding out who fingered me???
Message-Id: <Pine.SOL.3.96.990215033341.13847B-100000@ux4.cso.uiuc.edu>
Hello, everyone.
I was just wondering...you know that in Unix, you can finger someone and
find out his/her information, such as when they were logged on, or logged
out.
I have been trying to figure out a perl script that shows me who have
fingered me.
Is that possible?
If so, can someone tell me how...?
you can email me at seongbae@uiuc.edu
thank you.
seong
------------------------------
Date: Mon, 15 Feb 1999 06:06:10 GMT
From: a97485@cs.ait.ac.th
Subject: Looking for CGI database apps
Message-Id: <7a8dgf$pls$1@nnrp1.dejanews.com>
Hi,
I am looking for CGI applications which access SQL database using Perl at the
server side. I am building such a system I want to have a look how others
have done.
Thanks
Ehsan Masud
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 15 Feb 1999 00:16:20 -0700
From: "qbe" <qbe@mailexcite.com>
Subject: Re: newbie prob - server errors
Message-Id: <7a8h9i$uj7$1@news.inconnect.com>
It would appear the difference between using pico directly on the UNIX
server VS. using Notepad locally then uploading to the server was my
problem.
qbe wrote in message <7a6qvl$c01$1@news.inconnect.com>...
> I'm trying to pick up cgi and perl on my own... but so far I'm unable
to
>run my .cgi scripts. <snip>
------------------------------
Date: 15 Feb 1999 10:45:45 +0100
From: Joakim Hove <hove@ido.phys.ntnu.no>
Subject: Re: Newbie question
Message-Id: <k0ng188m246.fsf@ido.phys.ntnu.no>
seong joon bae <seongbae@students.uiuc.edu> writes:
Well, you have got some advice already, but anyway:
1. #!/usr/bin/perl -w
the -w (warn) gives you various diagnostic warnings which are
generally very helpful. IMHO you should _always_ use the -w switch.
2. if (open(INFILE,"filename")) {
while (defined <INFILE>) {
$TheLine = $_;
[.....]
}
} else {
print("Could not open filename \n");
}
you must open the file with the open() statement, and check that it
succededs. Changing while(<INFILE>) -> while(defined<INFILE>) will
assure that you don't read past end of file [I think at least...]
> while (<INFILE>)
> {
> $TheLine = $_;
> chomp($TheLine);
> $Linecount = $Linecount + 1;
> $LineLen = length($TheLine);
> $Charcount = $Charcount + $LineLen;
> ....
> ...
> ...
> }
Good luck,
Joakim
--
=== Joakim Hove www.phys.ntnu.no/~hove/ ======================
# Institutt for fysikk (735) 93637 / 352 GF | Skoyensgate 10D #
# N - 7034 Trondheim hove@phys.ntnu.no | N - 7030 Trondheim #
=====================================================================
------------------------------
Date: Mon, 15 Feb 1999 08:17:26 -0100
From: 'x'campbell-lange@easynet.co.uk (Rory Campbell Lange)
Subject: NEWBIE Reading and Searching a Text File Db.
Message-Id: <'x'campbell-lange-1502990817260001@campbell-lange.easynet.co.uk>
Newbie question: Reading and Searching a Text File Db.
Hello
I'm just beginning to use Perl.
I'm suffering from some newbie problems relating to reading and searching files.
I'm using MacPerl 5.02
What I'd like to do:
1)
Read a text file that is made up of entries in the following format:
subject (one line)
]]]
text (of up to 50 lines)
]]]
2)
Search for subject text such as "perl" (
I can't seem to work out how to 'read' the input file to do a search and
put it into an array.
3)
I would then like to put the found subject lines into an array and put the
associated text in another, associated, array. Perhaps it would be easier
to use a hash, with the subject line as key to each hash value?
4)
I would then like to print (to screen) all the found subject lines
A prompt would ask me which subject I would like to read.
5)
The text for the relevant subject line would be printed to screen.
I'd be extremely grateful for some help.
I apologise for the beginner status of these questions.
Thank you
Rory
--
Rory Campbell-Lange
The Campbell-Lange Workshop
Remove the 'x' to reply
------------------------------
Date: 15 Feb 1999 02:49:03 -0800
From: luvisi@andru.sonoma.edu
Subject: numerology in perl (Happy Valentine's Day!)
Message-Id: <m26794t00w.fsf@andru.sonoma.edu>
#!/usr/bin/perl -wn
# numerology: feed the compat function a string containing the names
# of the two people whose compatability is being tested. supposedly,
# the result will be their percent compatability. algorithm taken from
# C source released by www.lovecalculator.com. does anyone know if this
# is the "correct" way to do numerology?
#
# the author takes no responsibility for use or misuse ;-)
# this software is public domain.
#
# Andru Luvisi Feb 14, 1999
#
use strict;
print compat($_), "\n";
sub compat {
my ($names, $number, $pat, $tries) = (shift, "", "", 0);
($number = "LOVES") =~ s/./$pat = $&; $#{[ $names =~ m($pat)gi]} + 1/ge;
$number =~ s/(.)(?=(.))/$1+$2/eg && chop $number
while $number =~ /^.{3,100}$/ && ++$tries < 100;
return $number =~ /^..?$/ ? $number : 0;
}
------------------------------
Date: Mon, 15 Feb 1999 04:50:35 GMT
From: dmeilinger@cng.dl.nec.com
Subject: OLE on client browser
Message-Id: <7a892q$m86$1@nnrp1.dejanews.com>
Could someone help me out with this.
I want to dump an HTML file to MS Excel or Word. I have already written a
front end using PERL and ODBC and a CGI script for DB manipulation via a web
page, but once I am done I would like for the Web Client to be able to dump
the results to an excel spreadsheet. This works fine now if I am on the web
server with MS Office and Perl installed, but how do I use OLE to open an
excel session on a client that does not have perl installed (local) ? Am I
gonna have to use an Active-x control or something to allow a browser to
manipulate an OLE session on the client side after perl manipulates the
server-side DB?
Thanx in advance for any help.
Dirk
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 15 Feb 1999 07:36:54 GMT
From: orwant@alphaville.media.mit.edu (Jon Orwant)
To: webmaster@wondertek.com
Subject: Re: Perl 'zine
Message-Id: <ORWANT.99Feb15023654@alphaville.media.mit.edu>
"John T. Jarrett" <jjarrett@ecpi.com> writes:
Jon Orwant wrote:
> [snip]
> If it's not frequent enough (I'm working on that; it'll
> go bimonthly in 2000, and all-glossy with the next issue), then
> that's one thing that argues for electronic distribution -- but
> now you're talking about print as well?
>
> [snip]
> If anyone wants to help put out an electronic (and more frequent)
> version of TPJ, I'll be happy to pay you too.
[snip]
If you already plan to go monthly as soon as possible, then maybe we could
just help you out to meet our needs. Lord knows you already have publishers
and paper suppliers and advertisers and all that lined up and that alone
would probably take me a full quarter to line up assuming I did actually
pull off the financial backing.
<em> I </em> wasn't wanting to go into competition with TPJ - more like
supplement it with a monthly.
And as I've been trying to field some of the basic CGI and SSI questions,
what IS actually needed and would probably sell better on news stands is a
perl-based mag <em> for webmasters </em> (be they guys like you with your
own servers or guys like me using a dial-up / commercial website or some
virtual host like hypermart) which was about making things work on the web,
specifically. That is what most of our dumb questions are about and what
this newsgroup just is not for.
Thanks and sorry for stepping on any toes,
John T. Jarrett
No worries. I shot off all my toes long ago. Let's unite our efforts.
-Jon
------------------------------------
Jon Orwant http://tpj.com
Editor & Publisher, The Perl Journal
--
------------------------------
Date: 15 Feb 1999 07:59:44 GMT
From: orwant@alphaville.media.mit.edu (Jon Orwant)
To: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Perl 'zine
Message-Id: <ORWANT.99Feb15025944@alphaville.media.mit.edu>
bart.lateur@skynet.be (Bart Lateur) writes:
John T. Jarrett wrote:
>It's unanimous - all voters agree - don't waste any $ on glossy!
I'd rephrase that as "Don't make *us* pay for the glossy!"
Bart.
I won't. The price will stay at $18/year, as it has since '96.
TPJ is going glossy so that it can publish more issues per year.
Glossy => advertisers *= 2 => money => production staff => more time for Jon
=> more issues per year.
The next issue will be glossy, but it will still have the same look
and feel as the old TPJ. Well, actually it'll have a *smoother* feel,
but you know what I mean :-) It's the same page layout and production
process -- I'm just using a different printer and different paper.
The paper will be lighter, too -- important because TPJ #12 was so
thick and heavy that TPJ lost money on Australian and New Zealand
subscriptions.
-Jon
------------------------------------
Jon Orwant http://tpj.com
Editor & Publisher, The Perl Journal
--
------------------------------
Date: 15 Feb 1999 00:11:38 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: PFR: read_file, write_file
Message-Id: <x7hfsontdh.fsf@home.sysarch.com>
>>>>> "DG" == Daniel Grisinger <dgris@moiraine.dimensional.com> writes:
DG> [posted and mailed]
DG> Uri Guttman <uri@sysarch.com> writes:
>> they are so simple i didn't comment them.
DG> I don't think I like this. Regardless of how trivial the code
DG> is, I'd still like to have documented what it takes as arguments,
DG> what it returns, and any gotchas associated.
well, i (or you) can comment them. they are very trivial.
do you wnat a new posting or do we have a repository place where i send
them? are you going to put that into cpan as some have suggested?
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Mon, 15 Feb 1999 05:07:01 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: problem with Hash refs in s///
Message-Id: <36C7AD54.2F4BE721@home.com>
[posted & mailed]
Tapio Laxstrom wrote:
>
> foreach $record (@arr1) {
> foreach $string (@arr2) {
> #this is for debuging (works fine with both hashes)
> print "Keys: ".$record->{"key1"}."and".$record->{"key2"}."\n";
> #but can someone explain me next line in hash 2 (3,4,...)???
> $string =~ s/<(.*?)>/$record->{"$1"}/g;
> print $string;
>
> #WHY IT KEEPS GETTING VALUES FROM HASH 1 ?????
Because you've already made the substitution so it fails on the second
attempt. After the first substitution, $arr2[0] becomes
Keys: key1_in_hash1 and key2_in_hash1
It remains unchanged for the next $record.
Try this to see.
if ( $string =~ s/<(.*?)>/$record->{"$1"}/g ) {
print $string;
}
And this.
print "$arr2[0]\n";
perldoc perlsyn
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Mon, 15 Feb 1999 05:12:05 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Problem With Output of HTML Headers - Interesting
Message-Id: <ebohlmanF76Js5.KvK@netcom.com>
Tasslhoff Burrfoot <tasslehoff@vt.edu> wrote:
: The problems occur when I access the script though a webpage. I am running
: this script with the newest [as of yesterday] version of ActivePerl.
: Specifcally, I am using perlis.dll under NT4 SP4.
: I have this script:
: #! /usr/local/bin/perl
: do PrintHeader();
This form of subroutine call is now deprecated; drop the 'do'. That's
not your problem, however.
: print "<B>Do you see this?</B>\n";
: do PrintFooter();
: exit;
: sub PrintHeader
: {
: print "<HTML> ";
: print "<HEAD> ";
: print "</HEAD> ";
: print "<BODY> ";
: }
: sub PrintFooter
: {
: print "</BODY>";
: print "</HTML>";
: }
: Which runs but the output HTML does not even resemble what you would expect.
: Here is what I get:
[snip DOCTYPE declaration and <META> element]
Nowhere in your code are you outputting any HTTP headers (like
"Content-type: text/html\n\n"). My hunch is that your HTTP server is
trying to be "helpful" and guessing at what you meant to send.
------------------------------
Date: Mon, 15 Feb 1999 05:06:04 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: putting keystrokes into the keyboard buffer in windows
Message-Id: <ebohlmanF76JI4.Knq@netcom.com>
Andrew Winkler <andrew@winklers.org> wrote:
: Is there a way to emulate keystrokes and mouse movement/clicks
: in Perl? Perhaps a hook into the SendKey function? Thanks, Andy
This is highly platform-dependent. If you're talking about Win32,
SendKey is part of the Visual Basic runtime system, not an OS API call.
You could duplicate its function by writing C code (involving a journal
playback hook) and interfacing it to Perl with XS. If you're talking
about a Unix variant, look into Perl ports of expect.
------------------------------
Date: Sun, 14 Feb 1999 22:07:57 -0800
From: Yuriy Tenenbaum <yuriyt@ix.netcom.com>
Subject: Re: Simple question of the beginner.
Message-Id: <36C7B9BC.1432FD63@ix.netcom.com>
Andre and Stephen, thanks for your help. I got it. Appreciate it.
Sergey
Stephen F Palincsar wrote:
> Yuriy Tenenbaum wrote:
> >
> > I am doing my first assignment and everything is fine except the last
> > question: I have an array of strings. I need to remove the last
> > character of the second element and add this character 3 times to the
> > end of the second last element of that array.
>
> Do you know how to access the second element in an array?
>
> Do you know how to take a substring of a scalar?
>
> Do you know how to concatenate strings?
>
> Break the problem apart into manageable pieces and do not worry about
> how many lines it takes.
>
> Incidentally, this is pretty advanced for a _first_ assignment.
> Generally
> a first assignment is something like "print 'Hello world';"
>
> >
> > I browsed through the textbook and can't find anything on that.
> > I also know that it should be just a couple of lines of code.
> > Does anyone know how to accomplish that?
> >
> > I will appreciate that very, very much.
> >
> > Sergey
------------------------------
Date: 15 Feb 1999 07:09:25 +0200
From: Markus Stenberg <mstenber@cc.Helsinki.FI>
Subject: Re: Speed of Python
Message-Id: <al8r9rss16i.fsf@myntti.helsinki.fi>
ilya@math.ohio-state.edu (Ilya Zakharevich) writes:
> [A complimentary Cc of this posting was sent to Markus Stenberg
> <mstenber@cc.Helsinki.FI>],
> who wrote in article <al81zjy8vvo.fsf@myntti.helsinki.fi>:
> > Perl:
> > @x = <>; import sys
> > x = sys.stdin.readlines()
> > Just for laughs, timings on largest text file I could find (~11M of ping
> > data):
> > Obviously.. Python is still faster in array-building stuff though, by
> > factor of (roughly) 2.5, apparently.
..snip..
> As you see, the difference is nowhere close to 150% times, 20% is a
> better estimate. As TomC noticed, with the current implementation
> Perl's <> copies stuff twice: once to put things on stack, second time
> to put this into an array.
Well. First off, you didn't provide the source, and secondly, I doubt your
average perl newbie hacker knows this. Anyway, whole point of 'speed of
<xxx>' things is moot; I'd use Python were it slower by factor of 5, and
you, probably, perl. ;)
> Ilya
-Markus, ex. perl hacker.
--
I consider "Anthill Inside" to be much more comforting sticker than
"Intel Inside".
------------------------------
Date: Mon, 15 Feb 1999 06:03:33 GMT
From: Justin Scott <leviathan@darktech.org>
Subject: Re: Web based calendar
Message-Id: <36C7B90B.F2FFCFC8@darktech.org>
> I'm very new to perl / CGI programming etc, so excuse my ignorance.
As am I.
> As a learning exercise, I want to create a very simple web based calendar,
> I just want to pick a date, and be able to make an entry. Then redisplay
> the calendar showing the new entry.
Sounds interesting.. I have a similar project that needs to be done for a web
site I'm working on right now.
> Does anyone know of a calendar 'widget', or an perl modual that I could use
> to help me with this effort.
Darryl C. Burgdorf has created an excellent Perl calendar script which I am in
the process of taking apart, modifying, and re-assembling for personal use on
the previously mentioned web site. You might take a peek at that, as he has
done a great job with it. The address to that script is:
http://awsd.com/scripts/webcal/
-Justin Scott aka Leviathan
Webmaster, Riverview High School
http://www.riverviewhs.com
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 4895
**************************************