[9702] in Perl-Users-Digest
Resend: Perl-Users Digest, Issue: 3296 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Aug 1 18:27:11 1998
Date: Sat, 1 Aug 98 15:19:05 -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 Sat, 1 Aug 1998 Volume: 8 Number: 3296
Today's topics:
Can not complile on Ultrix 4.3b system <strat@pacifier.com>
cant compile perl5.005_01 with cygwin32 under nt. gnu c <zephyr@wesell.com>
Re: catch a signal (Abigail)
cgi grep <fcalabro@aisvt.bfg.com>
Re: cgi grep <snif.nospamplease@xs4all.nl>
CGI, Perl & auto file transfer (Terry1519)
Re: CGI, Perl & auto file transfer <Kevin_Babbitt@3com.com>
Challenge: turn one word into another one letter at a t (Peter Scott)
Re: Challenge: turn one word into another one letter at (Peter Scott)
Re: Changing foreign characters <aidan@crux.blackstar.co.uk>
Re: Changing foreign characters (CAPEX Capital Exchange Inc.)
comp.lang.perl.announce redux <gnat@frii.com>
Re: comp.lang.perl.announce redux <dgris@rand.dimensional.com>
Re: comp.lang.perl.announce redux (Joel S Noble)
Re: Condensed followup and continued puzzlement Re: -e (Tye McQueen)
Converting ACCESS database to PERL/CGI <gerald@powys.tec.org.uk>
Re: Converting ACCESS database to PERL/CGI (Fred Hurtubise)
Re: Converting ACCESS database to PERL/CGI <rbowen@databeam.com>
Re: Converting ACCESS database to PERL/CGI <perlguy@inlink.com>
Converting Excel Spreadseet to the text file ? <ln02g@london.waii.com>
Re: Converting Excel Spreadseet to the text file ? (Fred Hurtubise)
Re: Cookie File (CAPEX Capital Exchange Inc.)
Re: Copyright question (Tad McClellan)
Re: Counter Help danzuck@my-dejanews.com
Re: database accessing from UNIX <quednauf@nortel.co.uk>
DB_File conflicts? <jbarbee@singular.com>
differences between sysread/syswrite and recv/send? zwd@my-dejanews.com
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 31 Jul 1998 17:32:28 -0700
From: "Christian Brink" <strat@pacifier.com>
Subject: Can not complile on Ultrix 4.3b system
Message-Id: <35c2637b.0@news.pacifier.com>
I have grabbed the latest.tar.gz from CPAN and tried to compile it on my
Ultrix 4.3b system. All did not go as planed this is my output.... not being
a C programmer (nor much of a Perl Programmer) I need some guidance on how
to compile Perl on this system (Preferrably w/o gcc but if I have to I will)
ccom: Warning: (null), line 1: standard C not fully supported
ccom: Warning: /usr/include/stdio.h, line 185: "const" not yet implemented
extern FILE * fopen( const char *__filename, const char *__type );
------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 185: "const" not yet implemented
extern FILE * fopen( const char *__filename, const char *__type );
------------------------------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 186: "const" not yet implemented
extern int fprintf( FILE *__stream, const char *__format,
... );
------------------------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 188: "const" not yet implemented
extern int fputs( const char *__s, FILE *__stream );
------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 191: "const" not yet implemented
extern FILE * freopen( const char *__filename, const char *__type,
--------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 191: "const" not yet implemented
extern FILE * freopen( const char *__filename, const char *__type,
--------------------------------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 193: "const" not yet implemented
extern int fscanf( FILE *__stream, const char *__format, ... );
-----------------------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 195: "const" not yet implemented
extern int fsetpos( FILE *__stream, const fpos_t *__pos );
ccom: Warning: /usr/include/stdio.h, line 197: "const" not yet implemented
extern size_t fwrite( const void *__ptr, size_t __size,
-------------------------------------^
ccom: Error: /usr/include/stdio.h, line 197: illegal type combination
extern size_t fwrite( const void *__ptr, size_t __size,
-------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 200: "const" not yet implemented
extern void perror( const char *__s );
-------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 201: "const" not yet implemented
extern FILE * popen(const char *__command, const char *__type );
-----------------------------------^
ccom: Warning: /usr/include/stdio.h, line 201: "const" not yet implemented
extern FILE * popen(const char *__command, const char *__type );
----------------------------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 202: "const" not yet implemented
extern int printf( const char *__format, ... );
-------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 203: "const" not yet implemented
extern int puts( const char *__s );
-----------------------------------^
ccom: Warning: /usr/include/stdio.h, line 204: "const" not yet implemented
extern int remove( const char *__filename );
ccom: Warning: /usr/include/stdio.h, line 205: "const" not yet implemented
extern int rename( const char *__from, const char *__to );
-------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 205: "const" not yet implemented
extern int rename( const char *__from, const char *__to );
---------------------------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 207: "const" not yet implemented
extern int scanf( const char *__format, ... );
------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 211: "const" not yet implemented
extern int sscanf( const char *__s, const char *__format,
... );
-------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 211: "const" not yet implemented
extern int sscanf( const char *__s, const char *__format,
... );
------------------------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 215: "const" not yet implemented
extern int vfprintf( FILE *__stream, const char *__format,
va_list;
-------------------------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 216: "const" not yet implemented
extern int vprintf( const char *__format, va_list __ap );
--------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 217: "const" not yet implemented
extern int vsprintf( char *__s, const char *__format, va_list
__ap;
--------------------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 220: "const" not yet implemented
extern char * tempnam( const char *__dir, const char *__pfx);
--------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 220: "const" not yet implemented
extern char * tempnam( const char *__dir, const char *__pfx);
---------------------------------------------------------^
ccom: Warning: /usr/include/stdio.h, line 302: "const" not yet implemented
extern int sprintf( char *__s, const char *__format, ... );
-------------------------------------------------^
I can't compile the test program.
(The supplied flags might be incorrect with this C compiler.)
You have a BIG problem. Shall I abort Configure (and explain the problem)
[y] y
Ok. Stopping Configure.
--
C. Christian Brink,CNE
IS-Manager
All-Sports Supply, LLC
Clackamas,OR
strat@pacifier.com
chrisb@assi.com
------------------------------
Date: Fri, 31 Jul 1998 08:55:09 -0400
From: <zephyr@wesell.com>
Subject: cant compile perl5.005_01 with cygwin32 under nt. gnu c lib trub
Message-Id: <35c1af85.0@phisteria.delmarva.net>
having trub getting new perl 5 installed. just put up nt cause i gave up
trying to do it with 95c. (so its a virgin nt setup and im a nt newbie)
installed cygnus b19, 19.1 with the cdk module. got past the first hurdle of
'gcc2: permission denied' after i used chmod on gcc2/ ld2 (it would have
been nice if the hits/ readme/ faq mentioned little things like this).
current trub that has me dead in the water is message about not finding gnu
c libraries.
am i suppose to find them somewhere and install. if so- where. i throught
its part of cdk and cygnus. sure looks that way.
any help would be great.
tks.
john z.
zephyr@wesell.com.No.spam.pls
------------------------------
Date: 31 Jul 1998 15:54:22 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: catch a signal
Message-Id: <6pspbe$b6e$1@client3.news.psi.net>
Cyril Matalon (matalon@jouy.inra.fr) wrote on MDCCXCV September MCMXCIII
in <URL: news:35C17FF0.572C@jouy.inra.fr>:
++ I would like to catch a kill signal in my perl cgi program in order to
RTFM about %SIG.
++ close a data base if a user press the Stop button in Netscape.
++ Is there a solution ?
What makes you think the stop button is linked to your CGI program?
Abigail
--
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET", "http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content)) =~ /(.*\))[-\s]+Addition/s) [0]'
------------------------------
Date: Fri, 31 Jul 1998 13:54:43 -0400
From: Finn Calabro <fcalabro@aisvt.bfg.com>
Subject: cgi grep
Message-Id: <35C204E3.696B744B@aisvt.bfg.com>
I trying to use a pipeline of greps in a cgi script for a database
search with boolean 'AND'. I've gotten close with things like:
foreach $item (@valuelist) {
$cmd = $cmd . "$grep -i $item $filename | ";
}
$ans = `$cmd`;
but it won't run properly. any feeback is appreciated.
------------------------------
Date: Sat, 1 Aug 1998 10:48:42 +0200
From: "Jonkers" <snif.nospamplease@xs4all.nl>
Subject: Re: cgi grep
Message-Id: <6pukoo$hoo$1@news2.xs4all.nl>
Finn Calabro wrote in message <35C204E3.696B744B@aisvt.bfg.com>...
>I trying to use a pipeline of greps in a cgi script for a database
>search with boolean 'AND'. I've gotten close with things like:
> foreach $item (@valuelist) {
> $cmd = $cmd . "$grep -i $item $filename | ";
> }
> $ans = `$cmd`;
>but it won't run properly. any feeback is appreciated.
The last character in $cmd will always be the pipe symbol '|'. Will that
work, or do you need a 'cat' on the end?
Sander
>
------------------------------
Date: 31 Jul 1998 17:59:15 GMT
From: terry1519@aol.com (Terry1519)
Subject: CGI, Perl & auto file transfer
Message-Id: <1998073117591600.NAA12260@ladder03.news.aol.com>
I have a Perl5 script which is basically a form type script. However, I would
like
went finished to automatically send a ZIP file to the user broswers which
will automatically start to receive. This is similar to when a user clicks on a
filename link but, I want this to be automatic. I know the user still has to
select
a directory. Does anyone have a idea on how to do this in Perl5?
------------------------------
Date: Fri, 31 Jul 1998 15:06:25 -0400
From: Kevin Babbitt <Kevin_Babbitt@3com.com>
Subject: Re: CGI, Perl & auto file transfer
Message-Id: <35C215B1.E62C7EAE@3com.com>
Terry1519 wrote:
> I have a Perl5 script which is basically a form type script. However, I would
> like
> went finished to automatically send a ZIP file to the user broswers which
> will automatically start to receive. This is similar to when a user clicks on a
> filename link but, I want this to be automatic. I know the user still has to
> select
> a directory. Does anyone have a idea on how to do this in Perl5?
Off the top of my head... (ie this isn't tested but is worth trying)
The typical CGI script starts with a line like
print "Content-type: text/html\n\n";
which tells the user's browser that the type of data it will receive is an HTML
file. A ZIP file has the MIME type "application/zip," so you could change the
content type to this and then send the ZIP file to standard output.
In Perl, it would look something like this:
open(IN, "foo.zip") || do {
print <<ERROR_END;
Content-type: text/html
<html><head><title>Error</title></head>
<body>
<h2>Error</h2>
Could not find the file foo.zip.
</body></html>
ERROR_END
exit;
};
print "Content-type: application/zip\n\n";
print while read(IN, $_, 16384);
Notice that I don't send the content-type line until I have the ZIP file open --
that way I can notify the user if an error occurred.
You don't want to use "while <IN>" because the <> operator reads up to the next
newline character, and in a zip file, there may very well not be any newlines
(read: potential memory overflow).
Kevin
------------------------------
Date: 30 Jul 1998 18:47:31 GMT
From: psj@euclid.jpl.nasa.gov (Peter Scott)
Subject: Challenge: turn one word into another one letter at a time
Message-Id: <6pqf43$2ru@netline.jpl.nasa.gov>
I was thinking about those puzzles in children's books that say, "Can
you turn BLACK into WHITE in 8 steps, changing only one letter at a time,
making a valid word at each stage?" And the answer is something like
BLACK
SLACK
SLICK
SLICE
SPICE
SPINE
SHINE
WHINE
WHITE
So I wrote a Perl program to do it. It can turn Java into Perl :-)
JAVA
LAVA
LANA
LANK
LARK
PARK
PERK
PERL
if you don't mind using some proper names from /usr/dict/words, although
there are many longer solutions that probably don't.
You might want to do it yourself before letting your thinking be contaminated
by looking at my solution.
It could be enhanced for performance considerably, although I don't
know how to do that without making it harder to understand. I have a
suspicion that an optimal solution would involve tries, but I haven't
checked any algorithm sources yet.
#!/usr/local/bin/perl -w
# Solve the puzzle of turning one word into another by changing only one
# letter at a time, at each step making a valid word (we use /usr/dict/words).
# Will output solutions in order of number of intervening words. Sometimes
# repeats a solution. Approach: search outward from source and target words
# finding all words differing by one letter until search lists intersect.
use strict;
require 5.004;
my $SRC = shift or die "No beginning word\n";
my $TRG = shift or die "No ending word\n";
foreach ($SRC, $TRG) {
tr/a-z/A-Z/;
tr/A-Z//cd;
}
die "Usage: $0 beginning_word ending_word\n" if @_ or (!$SRC) or (!$TRG);
my $LENGTH = length($SRC);
die "Words not same length\n" unless length($TRG) == $LENGTH;
die "Degenerate case\n" if $SRC eq $TRG;
my @WORDS = ();
foreach (`cat /usr/dict/words`) {
tr/a-z/A-Z/; # Reject words containing capital letters
tr/A-Z//cd; # if you don't want to use proper names
next unless length == $LENGTH;
push @WORDS, $_ if $_ ne $SRC and $_ ne $TRG;
}
die "No words of length $LENGTH left!\n" unless @WORDS;
push @WORDS, $SRC, $TRG; # We assume inputs may not be in dictionary
my @w = (); # Words found so far, value is predecessor
my @ww = (); # Same words, indexed by distance from origin
$w[0]{$SRC} = $SRC; # Index 0 for source
$w[1]{$TRG} = $TRG; # Index 1 for target
$ww[0][0]{$SRC}++;
$ww[1][0]{$TRG}++;
my $dist = 0;
while (++$dist) {
my $found = 0;
foreach my $z (0, 1) {
my $y = 1 - $z;
foreach my $k (keys %{$ww[$z][$dist-1]}) {
foreach my $n (near ($k, $z)) {
$found = 1;
$ww[$z][$dist]{$n}++;
$w[$z]{$n} = $k;
solution ($n) if exists $ww[$y][$dist-$y]{$n};
} # exit after solution if you only want the first
}
}
die "No (more) solutions possible, reached distance $dist\n" unless $found;
}
# Don't print solution if you're looking only for ones of a different length
sub solution {
my $front = my $back = shift;
my @sol = ($front);
my $again;
do {
$again = 0;
$front = $w[1]{$front}, $again = 1, push @sol, $front
if $front ne $w[1]{$front};
$back = $w[0]{$back}, $again = 1, unshift @sol, $back
if $back ne $w[0]{$back};
} while ($again);
print "Solution with separation of ", scalar @sol - 2, "\n",
join ("\n", @sol), "\n\n";
}
# Return words differing by one letter and not used in this search branch yet
sub near {
my ($word, $z, @near) = @_;
for (my $i = 0; $i < @WORDS; $i++) {
my $w = $WORDS[$i];
next if exists $w[$z]{$w};
my $x = $w ^ $word;
push @near, $w if ($x =~ tr/\000//) == $LENGTH-1;
}
return @near;
}
--
This is news. This is your | Peter Scott, NASA/JPL/Caltech
brain on news. Any questions? | (psj@euclid.jpl.nasa.gov)
Disclaimer: These comments are the personal opinions of the author, and
have not been adopted, authorized, ratified, or approved by JPL.
------------------------------
Date: 31 Jul 1998 23:35:47 GMT
From: psj@euclid.jpl.nasa.gov (Peter Scott)
Subject: Re: Challenge: turn one word into another one letter at a time
Message-Id: <6ptkcj$qqo@netline.jpl.nasa.gov>
In article <6pqh7j$s33$2@csnews.cs.colorado.edu> on 30 Jul 1998 19:23:31
GMT, Tom Christiansen <tchrist@mox.perl.com> says...
...
> Are you aware that this is being disgussed in the other moderated
> newsgroup?
Which I had omitted to subscribe to yet. One of the more amazing
coincidences I've encountered. GMTA, if I may be permitted the hubris..
I'm following this thread up there now, of course.
--
This is news. This is your | Peter Scott, NASA/JPL/Caltech
brain on news. Any questions? | (psj@euclid.jpl.nasa.gov)
Disclaimer: These comments are the personal opinions of the author, and
have not been adopted, authorized, ratified, or approved by JPL.
------------------------------
Date: Fri, 31 Jul 1998 15:44:36 GMT
From: Aidan Rogers <aidan@crux.blackstar.co.uk>
Subject: Re: Changing foreign characters
Message-Id: <901903461.722482@sparc.tibus.net>
Martin <minich@globalnet.co.uk> wrote:
: You can use standard regular expressions.
: $text =~ tr/DdVv\|Qq/AaOoUuNn/;
I could, but this doesn't really help for other text characters from
other languages like the french c in garcon, and n-tilde in spanish. Is
there any way round all this or do I have to program in a substitution for
all of them?
This sounds like such a common problem that someone must have written a
Perl module to do it, surely? If not, I will :)
Aidan
------------------------------
Date: Fri, 31 Jul 98 16:50:12 GMT
From: capex@capex.net (CAPEX Capital Exchange Inc.)
Subject: Re: Changing foreign characters
Message-Id: <OzBZYMKv9GA.311@ntdwwaaw.compuserve.com>
In article <901731311.712595@sparc.tibus.net>, Aidan Rogers <aidan@crux.blackstar.co.uk> wrote:
>I'm currently writing a program in Perl which generates TeX dynamically, and
>the output of the TeX gets printed. However, TeX barfs any time I try to send
>it a foreign character, like a-umlaut, or n-tilde and so forth. Does anyone
>know of a Perl module that will change a-umlauts in to a's, as I have not
>been able to find one on CPAN. (This could however be down to my lack of
>experience and general short-sightedness when it comes to finding things that
>are right in front of me).
>
>Any help (including alternative solutions) would be greatly appreciated.
>
>Thank,
>
>Aidan
I use the following subroutine for that purpose:
sub bst {my $xyz=$_[0];
$xyz =~ s/\x84/ae/g;
$xyz =~ s/\x94/oe/g;
$xyz =~ s/\x81/ue/g;
$xyz =~ s/\x9A/Ue/g;
$xyz =~ s/\x8E/Ae/g;
$xyz =~ s/\x99/Oe/g;
return $xyz;}
------------------------------
Date: 31 Jul 1998 09:34:48 -0600
From: Nathan Torkington <gnat@frii.com>
Subject: comp.lang.perl.announce redux
Message-Id: <5qvhoeavaf.fsf@prometheus.frii.com>
Summary of responses:
Tag Commercial: 9
Tag Unproductive: 3
Don't approve CGI: 7
Respondents: 11
So, I'd like to suggest that the new comp.lang.perl.announce policy
be:
--begin--
1) Posts must be relevant to Perl. That is, applications written in
Perl, development tools for Perl, new Perl modules, and conferences,
meetings, and magazines featuring Perl.
2) Posts must mention whether the product or event described is free
or commercial. Commercial posts will be tagged [COM] on the subject
line by the moderator unless already so tagged.
3) Unless the software otherwise meets the criteria for acceptance in
(1), CGI scripts written in Perl won't be accepted. CGI modules and
CGI scripts that help with development in Perl will be accepted.
4) Keep announcements to a minimum. That is, announce only
significantly changed versions of software, and make no more than
three announcements or reminders for conferences. Exceptions will be
made for extenuating circumstances, like a conference change of venue,
or fixes to security holes.
--end--
This would make Perl Conference announcements [COM]mercial, while
PerlMongers meetings would not be. Announcements of The Perl Journal
would be [COM]mercial, while announcements of a new Perl FAQ would not
be. Announcements about Matt's Script Archive would not appear at
all, while announcements of new versions of CGI.pm would.
Is this finally consensus? Can we take the next step and actually
make it *happen* now?
Nat
------------------------------
Date: Sat, 01 Aug 1998 02:26:07 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6pttk8$5m5$1@rand.dimensional.com>
[posted to comp.lang.perl.misc and mailed to the cited author]
In article <5qvhoeavaf.fsf@prometheus.frii.com>
Nathan Torkington <gnat@frii.com> wrote:
[snip]
>Is this finally consensus? Can we take the next step and actually
>make it *happen* now?
Sounds fine to me.
dgris
--
Daniel Grisinger dgris@perrin.dimensional.com
"No kings, no presidents, just a rough consensus and
running code."
Dave Clark
------------------------------
Date: 31 Jul 1998 21:08:24 -0600
From: joel@pueblo.uswmedia.com (Joel S Noble)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6pu0r8$esb@pueblo.uswmedia.com>
In article <5qvhoeavaf.fsf@prometheus.frii.com>,
Nathan Torkington <gnat@frii.com> wrote:
>
>This would make Perl Conference announcements [COM]mercial, while
>PerlMongers meetings would not be. Announcements of The Perl Journal
>would be [COM]mercial, while announcements of a new Perl FAQ would not
>be. Announcements about Matt's Script Archive would not appear at
>all, while announcements of new versions of CGI.pm would.
>
>Is this finally consensus? Can we take the next step and actually
>make it *happen* now?
Yes, yes, yes.
Joel Noble
joel@uswmedia.com, etc.
------------------------------
Date: 27 Jul 1998 12:33:44 -0500
From: tye@fumnix.metronet.com (Tye McQueen)
Subject: Re: Condensed followup and continued puzzlement Re: -e glob $filename returns true and false in identical cases
Message-Id: <6pidlo$b4r@fumnix.metronet.com>
John Adams <John.Adams@BentonvilleAR.ncr.com> writes:
) if (-e glob $storefile) {
C<glob> in a scalar context [which I think should be a warning
under B<-w>, but then I'm strange] returns successive matches
and may not notice that you changed the value of C<$storefile>
so you shouldn't write your code this way. The shortest
replacement that comes to mind is:
@files= glob $storefile;
if (-e $files[0]) {
--
Tye McQueen Nothing is obvious unless you are overlooking something
http://www.metronet.com/~tye/ (scripts, links, nothing fancy)
------------------------------
Date: Thu, 30 Jul 1998 15:39:28 +0100
From: "Gerald Lewis" <gerald@powys.tec.org.uk>
Subject: Converting ACCESS database to PERL/CGI
Message-Id: <6pq0bh$841@news5-gui.server.cableol.net>
IM currently doing a database in access 95 and am now ready to change it to
a online database. Is it possible to interact between access and perl/cgi.
Hope you can help
Gerald Lewis
Y2K researcher
Powys TEC
Wales
Uk
------------------------------
Date: Thu, 30 Jul 1998 15:03:06 GMT
From: fhurtubi@videotron.net (Fred Hurtubise)
Subject: Re: Converting ACCESS database to PERL/CGI
Message-Id: <35c089a3.6402084@news.videotron.net>
On Thu, 30 Jul 1998 15:39:28 +0100, "Gerald Lewis"
<gerald@powys.tec.org.uk> wrote:
>IM currently doing a database in access 95 and am now ready to change it to
>a online database. Is it possible to interact between access and perl/cgi.
Nope..
No ODBC drivers does this (well, im on the DBI mailing list and thats
what many say :)
I had to access an Access DB, and what I did is a Visual Basic Program
that reads Access stuff and then sends it via ODBC to Oracle. Had to
do this because the Access DB was the main database and it was
changing every 5 minutes...
If you have an Access DB that won't change too often, you could
export the data to a flat file, then use the CSV module
(comma-separated values (i think thats whats it means :)) or any
database you want.
[ Fridiric Hurtubise (frederic.hurtubise@videotron.net) ICQ : 390555 ]
[ Programmeur WWW - Perl - Oracle | Tiliphone: (514)281-1232 # 2972 ]
[ Groupe Vidiotron Ltie - Vidiotron.Net | http://spc.videotron.com ]
- Hi, Montreal Expos Office.
- Hi, what time is the game tonight?
- Well, depends, what time can you be here?
------------------------------
Date: Thu, 30 Jul 1998 11:31:35 -0400
From: Rich Bowen <rbowen@databeam.com>
To: Gerald Lewis <gerald@powys.tec.org.uk>
Subject: Re: Converting ACCESS database to PERL/CGI
Message-Id: <35C091D7.D74@databeam.com>
Gerald Lewis wrote:
>
> IM currently doing a database in access 95 and am now ready to change it to
> a online database. Is it possible to interact between access and perl/cgi.
I'm using Win32::ODBC (www.roth.net/odbc) to talk to Access 95
databases.
Rich
--
###############################################
# Rich Bowen rbowen@databeam.com #
# Web Services Engineer DataBeam Corporation #
###############################################
------------------------------
Date: Thu, 30 Jul 1998 15:49:33 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: Converting ACCESS database to PERL/CGI
Message-Id: <35C0960D.F087790A@inlink.com>
Yes,
You can use the ODBC drivers at http://www.roth.net/odbc
These drivers only work on NT as far as I know.
ALso, look at http://www.perl.com and choose either "Databases" or
"Windows NT" to find out even more information.
Good luck,
Brent
------------------------------
Date: Thu, 30 Jul 1998 17:32:25 +0100
From: Marian Zurek <ln02g@london.waii.com>
Subject: Converting Excel Spreadseet to the text file ?
Message-Id: <Pine.A32.3.96.980730170206.686722G-100000@kite.london.waii.com>
Hi All !,
Could anyone help me in converting Excel Spreadsheet into
raw-text file.
I'd like to avoid running the application and perform that
from command line using Perl/Awk/Shell/XXX script under the UNIX
environment.
Thanx in advance.
Any help welcome.
Marian ZUREK
--
***********************************************************************
* Marian ZUREK E-mail: Marian.Zurek@waii.com *
* Marine Processing *
* Western Atlas International Inc. *
***********************************************************************
------------------------------
Date: Thu, 30 Jul 1998 17:42:15 GMT
From: fhurtubi@videotron.net (Fred Hurtubise)
Subject: Re: Converting Excel Spreadseet to the text file ?
Message-Id: <35c0afcc.16172042@news.videotron.net>
On Thu, 30 Jul 1998 17:32:25 +0100, Marian Zurek
<ln02g@london.waii.com> wrote:
>
>Hi All !,
>
>Could anyone help me in converting Excel Spreadsheet into
>raw-text file.
>I'd like to avoid running the application and perform that
>from command line using Perl/Awk/Shell/XXX script under the UNIX
>environment.
I think in Excel there is the F1 command that will show you how to
export your data to a flat file...
[ Fridiric Hurtubise (frederic.hurtubise@videotron.net) ICQ : 390555 ]
[ Programmeur WWW - Perl - Oracle | Tiliphone: (514)281-1232 # 2972 ]
[ Groupe Vidiotron Ltie - Vidiotron.Net | http://spc.videotron.com ]
- Hi, Montreal Expos Office.
- Hi, what time is the game tonight?
- Well, depends, what time can you be here?
------------------------------
Date: Fri, 31 Jul 98 16:53:39 GMT
From: capex@capex.net (CAPEX Capital Exchange Inc.)
Subject: Re: Cookie File
Message-Id: <eDZ9TOKv9GA.209@ntdwwaaw.compuserve.com>
In article <1dcy0e9.1hfai771h51jggN@bay1-90.quincy.ziplink.net>, rjk@coos.dartmouth.edu (Ronald J Kimball) wrote:
>Daniel <dan@NOSTINKINSPAM.nwsl.west.ga.net.> wrote:
>
>> print "Set-Cookie:ORDER=",$name,"; path=/; expires=Wednesday, 09-Nov-99
>> 23:12:40 GMT
>> ";
>> print "\n";
>>
>>
>> Notice that the "; is on a seperate line. For some reason my scripts bomb if
>> it is on the same line as the cookie statement
>
>Probably because HTTP headers must be separated from the content by two
>newlines. With "; on the following line, you have the literal \n within
>that string, plus the "\n" being printed in the next print statement.
>With "; on the same line, you only have the "\n" newline.
>
>You could change the above to
>
>print "Set-Cookie:ORDER=",$name,"; path=/; expires=Wednesday, 09-Nov-99
>23:12:40 GMT\n\n";
>
>and it should still work.
>
I use these subroutines:
##-cookies
sub getcookie {
unless(exists $ENV{HTTP_COOKIE}){return '0';}
else{my @rawc=split(/;/, $ENV{HTTP_COOKIE});%cook={};
foreach(@rawc){($skey,$sval)=split(/=/, $_);$cook{$skey}=$sval;}
return %cook;}}
sub setcookie {
print 'Set-Cookie:';
print $_[0].'='.$_[1].';expires=Sat, 31-Dec-2005 23:59:59 GMT';
if($#_>1){print ';path='.$_[2];}
if($#_>2){print ';domain='.$_[3];}
if($#_>3){print ';secure;}
print "\n";return '0';}
sub delcookie {
print 'Set-Cookie:'.$_[0].'=; expires=Thu, 01-Jan-1970 00:00:00 GMT';
print "\n";return '0';}
------------------------------
Date: Fri, 31 Jul 1998 08:58:18 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Copyright question
Message-Id: <qhisp6.fad.ln@localhost>
Alan Silver (alan@find-it.furryferret.uk.com) wrote:
: >What, really, are you going to copyright? Are you going to patent
: >
: >$i += 1;
: Aren't you being childish ? You know fully well that was not the
^^^ ^^^
: intention of the poster.
Who you?
You should have an attribution in there if you are going
to address someone in particular...
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 30 Jul 1998 18:00:42 GMT
From: danzuck@my-dejanews.com
Subject: Re: Counter Help
Message-Id: <6pqcca$fft$1@nnrp1.dejanews.com>
In article <6pohr6$aad$1@nnrp1.dejanews.com>,
Juli@my-dejanews.com wrote:
> $count = @file;
> $index = 0;
>
> while ($index < $count) {
>
> ($one, $two, $three, $four) = split(" ", $file[$index]);
> $index++;
> print "$one $two $three $four";
> }
>
> What I'm doing is splitting elements in an array and printing each one.
>
> What I would like to do, if for every other line, do something different
> EX:
> if index count is 0 print "<blue>$one $two $three $four";
> if index count is 1 print "<green>$one $two $three $four";
> if index count is 2 print "<blue>$one $two $three $four";
> if index count is 3 print "<green>$one $two $three $four"; etc.....
>
> Thanks much.
> Juli@my-dejanews.com
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
>
You can use the mod "%" function. EG:
if( $index % 2 == 0 ) {
print "<blue> this is an even number...";
}
Note: the index 0 will always return 0.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Thu, 30 Jul 1998 14:26:00 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: database accessing from UNIX
Message-Id: <35C07468.CABB4D93@nortel.co.uk>
Chris Wareham wrote:
>
> dominic01@my-dejanews.com wrote:
> >
> > Hello Perlians,
> >
>
> Actually, I'm human ...
>
I've got a new newsgroups server !! Yes !! I am seeing messages much
longer now!!
OFF-TOPIC: There's this science Fiction series in Germany called Perry
Rhodan. If I remember well there were some aliens called Perlians. I
just realize now ! Freaky !
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Tue, 28 Jul 1998 12:38:37 -0700
From: John Barbee <jbarbee@singular.com>
Subject: DB_File conflicts?
Message-Id: <35BE28BC.B7BEE89F@singular.com>
Hi,
I have a script that function both as a cgi and an interface to a
DB_File RECNO database.
I use the tie() function to bind the database into an array, as
perscribed by what I read in perldoc for DB_File.
Whenever the cgi is called it hangs, I get no output whatsoever.
The only time that I could get output was when I either 1) commented out
"use DB_File;" or 2) commented out "$FORM{$key} = $value;" which is
just a line within my parse_data sub that parses form from the previous
page.
So, if I leave them uncommented, my page hangs. If I comment out
use DB_File, I can't access the database. If I comment out the FORM
hash value assignment, the form never gets processed.
I have no idea why this is happening. It seems like the DB_File
module is interfering with my ability to uses plain old hashes. The
only thing that stands out in the documentation is that tied arrays are
not full implementation like tied hashes are.
If anyone could give me some insight, it'd be greatly appreciated.
I could always rewrite the parse_data sub to not use hashes, but I'd
rather not.
tia
------------------------------
Date: Fri, 31 Jul 1998 18:08:11 GMT
From: zwd@my-dejanews.com
Subject: differences between sysread/syswrite and recv/send?
Message-Id: <6pt16c$2k7$1@nnrp1.dejanews.com>
Is one or the other preferred for socket communication?
They both seem to work identically.
Already did RTFM and STFW. (Search the effin web).
Thanks,
-Zach
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
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 3296
**************************************