[13446] in Perl-Users-Digest
Perl-Users Digest, Issue: 856 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 20 14:07:16 1999
Date: Mon, 20 Sep 1999 11:05:14 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <937850713-v9-i856@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 20 Sep 1999 Volume: 9 Number: 856
Today's topics:
Re: Anomymous Hash (Kragen Sitaker)
Re: Anomymous Hash <dove@synopsys.com>
AutoSplit warnings <macintsh@cs.bu.edu>
Can't quite figure out DBI and references... learningapache@my-deja.com
Re: Can't quite figure out DBI and references... learningapache@my-deja.com
Constructing a next/more feature for a list display usi wharmon@prodigy.net
Re: Constructing a next/more feature for a list display (Kragen Sitaker)
Re: how to change order files from readdir <uri@sysarch.com>
Re: how to change order files from readdir <dan@tuatha.sidhe.org>
Re: Is anyone capable of explaining this?? <amonotod@netscape.net>
Re: list of lists (elephant)
Math with Perl? (Turgut Durduran)
Re: NEW @ PERL CGI - ASSOCIATATIVE ARRAY PROBLEM <g-preston1@ti.com>
Re: NEW @ PERL CGI - ASSOCIATATIVE ARRAY PROBLEM <mike@crusaders.no>
Re: NEW @ PERL CGI - ASSOCIATATIVE ARRAY PROBLEM (Kragen Sitaker)
Re: NEW @ PERL CGI - ASSOCIATATIVE ARRAY PROBLEM (Kragen Sitaker)
newbie : eliminating perl/html for translation (H.P. Stroebel)
Re: newbie : eliminating perl/html for translation (Kragen Sitaker)
Re: Passing variables around in multi-screen cgi script (Jed Parsons)
Re: Passing variables around in multi-screen cgi script <dove@synopsys.com>
Re: PB opening access .mdb <tbornhol@prioritytech.com>
Perl : Excel OLE Automation <mattking@techie.com>
Perl and Win32 API <jbtech@mpinet.net>
Re: Perl Module for MS Access? jdkronicz@my-deja.com
pl reads files on remote server? <bs986112@skynet.be>
Re: pl reads files on remote server? (Kragen Sitaker)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 20 Sep 1999 16:49:11 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Anomymous Hash
Message-Id: <bAtF3.22234$N77.1778533@typ11.nn.bcandid.com>
In article <7s5hig$i5k$1@nnrp1.deja.com>,
Anders Wallin <anders.wallin@sebank.se> wrote:
>I need to build a structure that looks as follows while processing a
>text file:
I don't understand your structure diagrams.
>It seemed that the concept of anonymous hashes could be useful. I am
>however stuck getting this to work (both creating the hashes and
>printing them). I would greatly appreciate any help.
Perhaps you can post your code? I'm having a hard time understanding
what you're trying to do.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Mon Sep 20 1999
49 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Mon, 20 Sep 1999 09:55:25 -0700
From: David Amann <dove@synopsys.com>
Subject: Re: Anomymous Hash
Message-Id: <37E666FD.2856025@synopsys.com>
Hi Anders,
Anders Wallin wrote:
>
> Hi !
>
> I need to build a structure that looks as follows while processing a
> text file:
>
> Country
> City
> Street
>
Here's a quick script which should do the trick.
#!/usr/local/bin/perl-5.004 -w
# hash.pl
# Version: 1.0
# Author: Dav Amann
#
# This is an example of using a complex data structure to store
# information from a file.
#
# For a real good discussion of complex data structures, see 'Advanced
# Perl Programming' by Sriram Srinivasan.
use strict;
open (FILE, "cities.txt");
# The file 'cities.txt' is assumed to have the following format:
# COUNTRY, CITY, STREET
#
# For example, Johnson Ave. in Oslo, Norway would have a line in the
# file as follows:
#
# NORWAY, OSLO, Johnson Ave.
#
my %country_hash;
# country_hash is the hash table we will store all of our data.
# Here's an example of how the data could be stored.
#
# $country_hash{'NORWAY'} = {
# 'Stockholm' => ['Johanson Ave.', 'Dav Blvd'],
# 'Lund' => ['Viking Ave.']
# }
while (<FILE>) {
my ($country, $city, $street) = split(/,/);
chop $street;
push @{$country_hash{$country}->{$city}}, $street;
# This is the line that does all the work.
}
# We use three embedded foreach loops to traverse each hash and the
# array and print out the values.
foreach my $country (keys %country_hash) {
print "$country\n";
foreach my $city (keys %{$country_hash{$country}}) {
print "\t$city\n";
foreach my $street (@{$country_hash{$country}->{$city}}) {
print "\t\t$street\n";
}
}
}
Hope this helps,
-=dav
------------------------------
Date: 20 Sep 1999 17:38:31 GMT
From: John Siracusa <macintsh@cs.bu.edu>
Subject: AutoSplit warnings
Message-Id: <7s5ren$pa0$1@news1.bu.edu>
From the AutoSplit docs:
AutoSplit will warn the user of all subroutines whose name causes
potential file naming conflicts on machines with drastically limited
(8 characters or less) file name length. Since the subroutine name is
used as the file name, these warnings can aid in portability to such
systems.
From the AutoSplit.pm code:
# for portability warn about names longer than $maxlen
$Maxlen = 8; # 8 for dos, 11 (14-".al") for SYSVR3
Observations:
* No one seems to edit $Maxlen in the code. Is that what the comment
is suggesting? It's not clear to me.
* Why oh why is the default limit *8* characters? What systems that
Perl runs on are so horribly limited? Just DOS? Doesn't it make
sense to have a more reasonable default like 14 or even 32? The
*vast* majority of OSes Perl runs on can handle much longer file
names. At some point the DOS Perl users will just have to take
their lumps, IMO.
I've had to obfuscate my own Auto-Loaded code to get around this
default, and it bothers me. When will this change?
-----------------+----------------------------------------
John Siracusa | If you only have a hammer, you tend to
macintsh@bu.edu | see every problem as a nail. -- Maslow
------------------------------
Date: Mon, 20 Sep 1999 16:17:50 GMT
From: learningapache@my-deja.com
Subject: Can't quite figure out DBI and references...
Message-Id: <7s5mmv$mec$1@nnrp1.deja.com>
As a farily new Perl user, I'm trying to learn a number of new things,
including the DBI module and hard references.
Up till now, I've been using an array which contains a list of words
which can be used in two contexts: either as regular words OR as
the names of existing variables. The "regular words" context is used
for a SQL CREATE statement, and the variable context is used for a SQL
INSERT statement:
@dbvars = qw(firstname lastname phonenum);
$myquery = "CREATE TABLE foo (";
for (@dbvars) {
# "regular words" context
$query .= "$_ CHAR(50),";
}
chop($query);
...
$query = "INSERT INTO foo VALUES (";
for (@dbvars) {
# variable context
$query .= $dbh->quote(${$_}) . ",";
}
chop($query);
However, I now want to use the "bind_columns" function of DBI, which
expectins an array of references. From its man page:
$rc = $sth->bind_columns(@list_of_refs_to_vars_to_bind);
Now I suppose I could convert my current @dbvars array to be an array of
references:
@dbvars = "\$firstname,\$lastname,\$phonenum";
then later use them in "variable context":
for (@dbvars) {
# variable context
$query .= $dbh->quote($$_) . ",";
}
but then it seems I've lost the ability to use the contents of dbvars as
"regular words". IS there a way to use a single array so that it can be
in all three contexts (regular words for CREATE, variable names for
INSERT, references to variable for bind_columns) ?
Thanks.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 20 Sep 1999 16:36:59 GMT
From: learningapache@my-deja.com
Subject: Re: Can't quite figure out DBI and references...
Message-Id: <7s5nr9$nbp$1@nnrp1.deja.com>
> IS there a way to use a single array so that it can be
> in all three contexts (regular words for CREATE, variable names for
> INSERT, references to variable for bind_columns) ?
Hmmm. I suppose I could do something like this:
@dbvars = qw(firstname lastname phonenum);
for (@dbvars) {
push(@dbvars_ref, \${$_});
}
to create a new array of references, suitable for passing to
"bind_columns", but perhaps there's a better way...?
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 20 Sep 1999 17:32:05 GMT
From: wharmon@prodigy.net
Subject: Constructing a next/more feature for a list display using PERL (CGI)
Message-Id: <37e66e1b.311240610@news.prodigy.net>
At the moment I am using a foreach loop to loop through an array to
display a list of database items retrieved from an external db.
I don't plan to leave it that way, but I am wondering why putting a
getc or stdin statement doesn't seem to interrupt the execution of the
foreach statement as it loops through the array?
I am constructing a list that displays 10 items at a time (this being
my first shot at it), and I am quite sure this routine has been
written a few zillion times before for PERL CGI database apps on the
Web.
Anyone have a stock routine that can be borrowed (on a permanent
basis)?
Thanks,
Will
------------------------------
Date: Mon, 20 Sep 1999 18:04:48 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Constructing a next/more feature for a list display using PERL (CGI)
Message-Id: <4HuF3.22509$N77.1787853@typ11.nn.bcandid.com>
In article <37e66e1b.311240610@news.prodigy.net>, <wharmon@prodigy.net> wrote:
>At the moment I am using a foreach loop to loop through an array to
>display a list of database items retrieved from an external db.
>
>I don't plan to leave it that way, but I am wondering why putting a
>getc or stdin statement doesn't seem to interrupt the execution of the
>foreach statement as it loops through the array?
What language are you writing this in? Perl doesn't have getc or stdin
statements. What do you mean by "interrupt"?
>I am constructing a list that displays 10 items at a time (this being
>my first shot at it), and I am quite sure this routine has been
>written a few zillion times before for PERL CGI database apps on the
>Web.
>
>Anyone have a stock routine that can be borrowed (on a permanent
>basis)?
How about this:
#!/usr/bin/perl -w
use strict;
my @nums = qw(zero one two three four five six seven eight nine);
foreach my $num (0..100) {
my $x = $num;
$x =~ s/([0-9])/$nums[$1] /g;
print "$x\n";
if ($num % 10 == 9) {
my $garbage = <STDIN>;
}
}
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Mon Sep 20 1999
49 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: 20 Sep 1999 12:13:04 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: how to change order files from readdir
Message-Id: <x7k8pl8str.fsf@home.sysarch.com>
>>>>> "DS" == Dan Sugalski <dan@tuatha.sidhe.org> writes:
DS> readdir doesn't guarantee any ordering at all, though alphabetical is
DS> typical. If you want to reorder the list, you'll have to do it yourself
DS> once you've got the filenames.
>> how would alphabetical be typical? it could be in that order, but it is
>> more likely to be the order the files were created. if you then delete
>> and create new files then the order from readdir is whatever.
DS> Well, it's typical on my primary perl platforms (VMS and NT). My
DS> linux box here returns them in some random order, presumably in
DS> whatever order the inodes are stuck in the directory.
it may be typical there but not on any *nix platform. you seem to work
on stuff developed by the same guy. any particular reason? his dislike
for fork and other things used by perl is bizarre.
and inodes are not in directories in *nix. only inode numbers and file
name pairs. actual inodes are in a table in the file system. this is how
you can have multiple hard links to a file and only one real file
inode. and why the rename syscall can do moves within a file system
without touching the file.
>> always assume there is no ordering from readdir.
DS> That would be covered by the 'readdir doesn't guarantee any
DS> ordering at all' bit, I'd think. Perhaps it wasn't forceful
DS> enough.
that was my point.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: Mon, 20 Sep 1999 16:47:02 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: how to change order files from readdir
Message-Id: <aytF3.8858$xg5.639@news.rdc1.ct.home.com>
Uri Guttman <uri@sysarch.com> wrote:
>>>>>> "DS" == Dan Sugalski <dan@tuatha.sidhe.org> writes:
> DS> readdir doesn't guarantee any ordering at all, though alphabetical is
> DS> typical. If you want to reorder the list, you'll have to do it yourself
> DS> once you've got the filenames.
> >> how would alphabetical be typical? it could be in that order, but it is
> >> more likely to be the order the files were created. if you then delete
> >> and create new files then the order from readdir is whatever.
> DS> Well, it's typical on my primary perl platforms (VMS and NT). My
> DS> linux box here returns them in some random order, presumably in
> DS> whatever order the inodes are stuck in the directory.
> it may be typical there but not on any *nix platform. you seem to work
> on stuff developed by the same guy. any particular reason? his dislike
> for fork and other things used by perl is bizarre.
Hmmm? I'm afraid you've lost me here. (If you're speaking of Dave Cutler,
his rep as the architect of VMS is *way* overstated--VMS was based on a
lot of other folks work, and he left long before all the interesting stuff
went in. FWIW, NT is based on an experimental system called Mica, not VMS.
Rumor has it he took the source with him to NT, bugs and all, though that
might be an apocryphal story)
> and inodes are not in directories in *nix. only inode numbers and file
> name pairs. actual inodes are in a table in the file system. this is how
> you can have multiple hard links to a file and only one real file
> inode. and why the rename syscall can do moves within a file system
> without touching the file.
It's been ages since I've had to delve down that low, and I'd forgotten
some of the details. Sorry 'bout that.
> >> always assume there is no ordering from readdir.
> DS> That would be covered by the 'readdir doesn't guarantee any
> DS> ordering at all' bit, I'd think. Perhaps it wasn't forceful
> DS> enough.
> that was my point.
Fair enough.
Dan
------------------------------
Date: Mon, 20 Sep 1999 16:04:08 GMT
From: Amonotod <amonotod@netscape.net>
Subject: Re: Is anyone capable of explaining this??
Message-Id: <7s5ltd$lsm$1@nnrp1.deja.com>
lr@hpl.hp.com (Larry Rosler) wrote:
> Then you have not read the documentation for 'open', which one might
> consider a prerequisite for offering answers based on it. This is
from
> the second paragraph of that document:
>
> You can put a '+' in front of the '>' or '<' to indicate that you want
> both read and write access to the file; thus '+<' is almost always
> preferred for read/write updates--the '+>' mode would clobber the file
> first.
>
Could not find mention of this in Camel Book, and found only one
mention in the Llama Book. However, the mention is distinctly on "+<",
"+>", "++>" and is under the "Fixed Length Random Access Databases"
section. Obviously directly related to the subject, however, it does
still seem to me that ">>" can still be used. Please accept my most
humble apology.
> It seems the same to me. I must admit that I didn't read it before.
> Why would one read a second 49-line article submitted one minute later
> than the first?
>
> Most newsreaders have a 'Cancel Article' capability. I assume you
tried
> that and it didn't work.
I will verify next time.
>
> Welcome to the club.
Your humbleness is astoundingly impressive.
> > --
> A magic invisible space character after those two dashes would make my
> newsreader cut out the signature automatically, which is a Good Thing.
Please explain further, I will accomodate as posssible.
>
> Cute enough, and only four lines, which conforms to etiquette.
At least you didn't completely hack every line of my post. Thank you
for the (Alas, very minimal) acceptance and/or approval. BTW, thank you
to whomever it was that I stole that from.
>
> We can't hold you responsible for that absurdity, except for your poor
> choice of ISP.
Know you of any other web-based news read/post services? I am quite
happy to change. However, it has nothing to do with my ISP. I am
behind a firewall which blocks NNTP, as well as SMTP and a few others.
I'm somewhat suprised that FTP and TELNET work.
`\|||/ amonotod@
(@@) netscape.net
ooO_(_)_Ooo________________________________
_____|_____|_____|_____|_____|_____|_____|_____|
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Tue, 21 Sep 1999 04:16:35 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: list of lists
Message-Id: <MPG.125108edfcd6694a989ce4@news-server>
Andreas Kneifel writes ..
>I`ve the following problem creating a lists, that contains lists:
>
>push(@array1,@array2);
>
>pushes every element of array2 as one element on array1, but not the
>hole list/array as one element.
>I hope this is possible without using references (because I have to puth
>several lists on array1 that way, and build these lists by just one
>loop.)
maybe the perllol documentation will help clarify any misunderstanding
that you're having...
perldoc perllol
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: 20 Sep 1999 16:37:29 GMT
From: durduran@mail1.sas.upenn.edu (Turgut Durduran)
Subject: Math with Perl?
Message-Id: <7s5ns9$kh1$1@netnews.upenn.edu>
any experiences with number crunching, mathematical simulations,
monte-carlo etc with perl? how does it rate??? the ease of
programming, data file handling capabilities etc make it attractive for
me but is it a lot slower than C? are there any numerical recipes type of
libraries written for perl? IF not, is it easy to embedd the C libraries
into perl?
also, how is the complex math module?
turgut
PS: please reply by e-mail aswell, my address is below.
--
-----------------
d u r d u r a n @
m a i l . s a s . u p e n n . e d u
-----------------
www.stwing.upenn.edu/~durduran/
------------------------------
Date: Mon, 20 Sep 1999 11:01:17 -0500
From: Jerry Preston <g-preston1@ti.com>
Subject: Re: NEW @ PERL CGI - ASSOCIATATIVE ARRAY PROBLEM
Message-Id: <37E65A4D.5087B77D@ti.com>
Kragen, what I am trying to do scroll the key onto the screen to allow the user
to select their ID number?
Does this help?
Thanks,
Jerry
Kragen Sitaker wrote:
> In article <37E645BB.B2DAAFAF@ti.com>,
> Jerry Preston <g-preston1@ti.com> wrote:
> >But this does not:
> >
> > %who = sort %who;
>
> You don't want to do that. Keys turn into values, values turn into
> keys, and the pairs get arbitrarily scrambled anyway when you store
> them back into %who.
>
> > print $query->scrolling_list( -name=>'Who_Number',
> > -values=> \@{ $Who_Number %who},
> > -default=>\@{ $Who_Number %who},
> > -size=>3,
> > -multiple=>'true' );
> >
> >
> >I get the following error:
> >
> > llegal modulus zero.
> >
> >I believe this is due to %who. But if I put a ',' after $Who_Number. I get
> >this error:
> >
> > Can't use an undefined value as an ARRAY reference at
>
> I can see why you're getting the errors. (You should be using strict,
> by the way, so you'd get more helpful errors.) I can't see what you're
> trying to do, so I don't know how to help you.
> --
> <kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
> Sun Sep 19 1999
> 50 days until the Internet stock bubble bursts on Monday, 1999-11-08.
> <URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Mon, 20 Sep 1999 18:29:04 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: NEW @ PERL CGI - ASSOCIATATIVE ARRAY PROBLEM
Message-Id: <8htF3.772$1s6.6364@news1.online.no>
Jerry Preston <g-preston1@ti.com> wrote in message
news:37E645BB.B2DAAFAF@ti.com...
> This is my first program. The following works:
>
> while(($Who_Number, $who_name) = each(%who)) {
> print "^ $Who_Number ^ $who_name ^ ";
> }
>
> But this does not:
>
> %who = sort %who;
Kragen already told you why this won't work, so I won't.
> print $query->scrolling_list( -name=>'Who_Number',
> -values=> \@{ $Who_Number %who},
I think you need to read up on references.
perldoc perlref
perldoc perldsc
\@{...} would be the reference to the dereferenced array-reference (or
something).
Anyway - this should work:
-values => \%who,
> -default=>\@{ $Who_Number %who},
This should be a reference to an array that contains the names of the
elements that should be selected.
if the names you want to be selected are: "this" and "that" you can
write:
-default => [qw/this that/],
or
-default => ["this", "that"],
or
@selected = ("this", "that");
...
-default => \@selected,
> -size=>3,
> -multiple=>'true' );
these look fine.
oh... The subject-line needs a few lower-case characters.
--
Trond Michelsen
------------------------------
Date: Mon, 20 Sep 1999 16:51:20 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: NEW @ PERL CGI - ASSOCIATATIVE ARRAY PROBLEM
Message-Id: <cCtF3.22239$N77.1777504@typ11.nn.bcandid.com>
In article <37E65A4D.5087B77D@ti.com>,
Jerry Preston <g-preston1@ti.com> wrote:
>Kragen, what I am trying to do scroll the key onto the screen to allow the user
>to select their ID number?
What does this have to do with sorting or scrolling lists? I guess the
scrolling list is supposed to have ID numbers in it, but I'm not clear
on what it's supposed to have in it. I'll go back and read your each
example again.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Mon Sep 20 1999
49 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Mon, 20 Sep 1999 16:53:53 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: NEW @ PERL CGI - ASSOCIATATIVE ARRAY PROBLEM
Message-Id: <BEtF3.22244$N77.1779023@typ11.nn.bcandid.com>
In article <37E65A4D.5087B77D@ti.com>,
Jerry Preston <g-preston1@ti.com> wrote:
>Kragen, what I am trying to do scroll the key onto the screen to allow the user
>to select their ID number?
Well, OK, I've read the 'each' example, and it doesn't output HTML. So
I still don't understand what you're trying to do.
%who is a hash. What are its keys (people's names? ID numbers?) and
what are its values? What are people trying to do with this list
(select themselves?) and how do you want it to be sorted (by key of
%who? by value of %who?)
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Mon Sep 20 1999
49 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Mon, 20 Sep 1999 17:07:15 GMT
From: hpstr@operamail.com (H.P. Stroebel)
Subject: newbie : eliminating perl/html for translation
Message-Id: <1103_937851375@default>
hi !
i have to translate a huge perl database script in german. as the output
of the program for email and browsers is intertwined with perl and html code,
it would be great to have a possibility to eliminate the perl and html code so
that the text to translate remains (with line numbers would be even better...).
do you have any hints ? is there an editor for dos/win16/32 that can do that
work or any workaround (not to complicated... ) ?
thank you
h.p. stroebel
hpstr@operamail.com
------------------------------
Date: Mon, 20 Sep 1999 17:58:41 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: newbie : eliminating perl/html for translation
Message-Id: <lBuF3.22488$N77.1786727@typ11.nn.bcandid.com>
In article <1103_937851375@default>, H.P. Stroebel <hpstr@operamail.com> wrote:
>i have to translate a huge perl database script in german. as the output
>of the program for email and browsers is intertwined with perl and html code,
>it would be great to have a possibility to eliminate the perl and html code so
>that the text to translate remains (with line numbers would be even better...).
This is not possible.
You may wish to have the script get German messages from some
centralized place, such as a hash or a disk file; then, translating it
to another language will be a matter of changing that centralized
place.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Mon Sep 20 1999
49 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: 20 Sep 1999 16:17:14 GMT
From: jed@socrates.berkeley.edu (Jed Parsons)
Subject: Re: Passing variables around in multi-screen cgi script
Message-Id: <7s5mma$l84$1@agate-ether.berkeley.edu>
Thanks for the suggestions. I thought about using Storable and MLDBM.
Maybe I'll try a cookie.
Cheers,
Jed
--
Jed Parsons : mailto:jed@socrates.berkeley.edu
: http://socrates.berkeley.edu/~jed/
--------------------------------------------------------------------------
use Curses;initscr;for(;;){$f=($f+10)%360;clear;grep(do{$i=$
------------------------------
Date: Mon, 20 Sep 1999 10:57:11 -0700
From: David Amann <dove@synopsys.com>
Subject: Re: Passing variables around in multi-screen cgi script
Message-Id: <37E67577.26844429@synopsys.com>
Hi Jed,
Jed Parsons wrote:
>
> Thanks for the suggestions. I thought about using Storable and MLDBM.
> Maybe I'll try a cookie.
>
No problem,
By the way, I went to your web page. Are you working on the Living
Textbook thing with this sort of stuff? I've done similar projects in
the past and I'm interested into how this is going for you.
Take care,
-=dav
------------------------------
Date: Mon, 20 Sep 1999 12:34:52 -0500
From: "Tim Bornholtz" <tbornhol@prioritytech.com>
Subject: Re: PB opening access .mdb
Message-Id: <C893641777FF0B7D.38A82CC5DFBD00E9.8E39CEE774FC88F0@lp.airnews.net>
Olivier Maas <olivier.maas@at-lci.com> wrote in message
news:37E653CB.A785A710@at-lci.com...
> Hi
> I have an access database and I do not succeed in opening it, I used the
> same syntax described in the win32::OLE doc, but it seems that my file
> is not found.
> (same syntax works with excel)
Perhaps if all you are doing is reading recordsets and inserting rows you
might want to try Win32::ODBC. The homepage for this is
http://www.roth.net/perl/odbc/
hth,
Tim Bornholtz
------------------------------
Date: Mon, 20 Sep 1999 19:43:26 +0200
From: "Matt King" <mattking@techie.com>
Subject: Perl : Excel OLE Automation
Message-Id: <7s5pj3$opa$1@news.uk.ibm.com>
I have been taking a look at the information located here
http://www.mkaz.com/web/perl/xl_oleauto.html . It looks and sounds like a
simple thing to use and work with. Regretfully I can not get it to work
(yes, I'm running the script on Windowz, 98 to be exact). I have tried
running the script on two different 98 installations one gives me this
error:
Undefined subroutine &Win32::OLECreateObject called at
D:/web/banking/perl/lib/O
LE.pm line 104.
And the other error:
Can't call method "Workbooks" on unblessed reference at test.pl line 16.
Has anyone gotten this script to work? What do I need to install/change to
make it work? I copied the script exactly as it is on the site.
Matt
------------------------------
Date: Mon, 20 Sep 1999 13:00:05 -0400
From: "Jon Banquer" <jbtech@mpinet.net>
Subject: Perl and Win32 API
Message-Id: <rucptnfjlg786@corp.supernews.com>
Is there a good book available on this subject ?
Can Perl be compiled into an .exe ?
I tried the FAQ and got this :
"Perl for Win32 FAQ from Evangelo Prodromou is currently
missing. We are trying to contact the author, but he too is
missing. "
jon
------------------------------
Date: Mon, 20 Sep 1999 17:12:26 GMT
From: jdkronicz@my-deja.com
Subject: Re: Perl Module for MS Access?
Message-Id: <7s5pte$p4q$1@nnrp1.deja.com>
Thanks to you and Eric for the responces. Just to clarify ... are you saying
that using both DBD::ODBC and Win32::ODBC are suitable to use if I'm going to
switch to a more robust database later or just DBD::ODBC?
Secondly, (please pardon the simplicity of the question) what do you mean
when you say that they are both available from the active state repository?
Does that mean that they are inherently a part of recent versions of Perl?
Last question- I am constructing a website on my webhosts server. If I find
a module that does some things I like would I want my webhost to install it
or could I just upload it to my directory tree on there server? My webhost
(Burlee) seems to be somewhat inresponsive to individual requests. They take
the attitude that they will upgrade or whatever when they deem it is time.
And based on that and my general lack of understanding in regards to using
modules, I'm not sure if I'm going to have a problem.
Thanks much.
JDK
>
> However that said you will need to use one of DBD::ODBC (preferred if you
> are going to change to a proper database later) or Win32::ODBC both of
> these modules are abailable from the activestate repository using PPM.
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>
> <http://www.gellyfish.com>
> Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sun, 19 Sep 1999 19:35:12 +0200
From: Pascal <bs986112@skynet.be>
Subject: pl reads files on remote server?
Message-Id: <37E51ECF.CE0E6E7D@skynet.be>
Is it possible to read .pl or html files on a webserver or is it only
possible to execute them.
If so, how can they be read ? as if they were files that have to be
opened ?
WHAT SHOULD I CHANGE TO MAKE THIS WORK ?
$data_file='http://www.microsoft.com/process/enter.pl';
# example !!
open(IN, $data_file);
@lines=<IN>;
close(IN);
Thanx for any answers:-)
------------------------------
Date: Mon, 20 Sep 1999 17:55:38 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: pl reads files on remote server?
Message-Id: <uyuF3.22480$N77.1786601@typ11.nn.bcandid.com>
This post is off-topic.
In article <37E51ECF.CE0E6E7D@skynet.be>, Pascal <bs986112@skynet.be> wrote:
>Is it possible to read .pl or html files on a webserver or is it only
>possible to execute them.
It is possible to read them. Indeed, it is impossible to execute HTML files.
>If so, how can they be read ? as if they were files that have to be
>opened ?
Well, if you want to read them, opening them and reading them is
definitely one way. Depending on the context, telling your web server
to send them to you may be easier and/or more useful.
>WHAT SHOULD I CHANGE TO MAKE THIS WORK ?
Use LWP.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Mon Sep 20 1999
49 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 856
*************************************