[11149] in Perl-Users-Digest
Perl-Users Digest, Issue: 4749 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jan 26 05:07:13 1999
Date: Tue, 26 Jan 99 02:00:22 -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 Tue, 26 Jan 1999 Volume: 8 Number: 4749
Today's topics:
Re: Bar code gif generation tj@navweb.com
Re: CGI.pm and Redirection question (peter)
Re: Counting characters with tr/// (in perl) <David_J_Pratt@sbphrd.com>
Re: edit @INC?/DBI install--Can't locale Config.pm <eugene@snailgem.org>
Re: File Upload. <eugene@snailgem.org>
How do I expand a variable within `'s (John Morse)
Re: How do I expand a variable within `'s (brian d foy)
Re: how do I insert this in my HTML code? <gwynne@utkux.utk.edu>
Re: How do I split this string? (Bart Lateur)
Re: How I direct STDIN to shell command? <dbikle@rahul.net>
Re: How to calculate time difference? <gwynne@utkux.utk.edu>
Re: Perl Books for Beginners <gwynne@utkux.utk.edu>
Re: Perl Criticism [summary] (Bart Lateur)
Re: Perl Criticism (Sam Holden)
Perl update causes problems with scripts <kole@semp.net>
Re: Printing back gif-file (counter) (Marc-A. Woog)
Problems using "or" and "chomp" <kole@semp.net>
Q: PREFIX doesn't work in Windows? <dwc3q@cs.virginia.edu>
Re: Remove all non a-z characters? (Larry Rosler)
Re: Request for negative value list indexes (Andrew Johnson)
Re: sorting dates (Bart Lateur)
TEST <colbert@nh.ultranet.com>
TEST <colbert@nh.ultranet.com>
Using a variable as a variable name <bruceh@interaccess.com>
Using MS Access <mitswa@ix.netcom.com>
Re: Using MS Access <m_ching@hotmail.com>
Re: Using MS Access <m_ching@hotmail.com>
Win32 Process Script: Help! <mwebster@inetarena.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 26 Jan 1999 02:49:24 GMT
From: tj@navweb.com
Subject: Re: Bar code gif generation
Message-Id: <78jafi$pkb$1@nnrp1.dejanews.com>
Well I have a solution for converting font text to gif. It uses two C
libraries: The t1lib that can convert text and selected font to a array
bitmap in memory. And a gif creation library called gd. If you want example
code or a demonstration drop me a line. I am using this technique to create
a java program that does some basic text design.
gd1.3 located at:
http://www.boutell.com/gd/
t1lib located at:
http://www.neuroinformatik.ruhr-uni-bochum.de/ini/PEOPLE/rmz/t1lib.html
In article <77do6d$2of$1@fu-berlin.de>,
schalkwy@minnie.RZ-Berlin.MPG.DE (Leo Schalkwyk) wrote:
> If you're working on unix,
> GhostScript can produce a ppm file from a PostScript file,
> and ppmtogif converts that to gif. This is packaged in
> pstogif which happens to be a perl script. I
> don't know where we got it but the following is from the comments and is
> probably enough to help you find it (if you don't already have it!)
>
> # pstogif.pl v1.0, July 1994, by Nikos Drakos <nikos@cbl.leeds.ac.uk>
> # Computer Based Learning Unit, University of Leeds.
> #
> # Accompanies LaTeX2HTML Version 96.1
> #
> # Script to convert an arbitrary PostScript image to a cropped GIF image
> # suitable for incorporation into HTML documents as inlined images to be
> # viewed with WWW browsers.
> #
> # This is based on the pstoepsi script
> # by Doug Crabill dgc@cs.purdue.edu
> #
>
> lucinda.moutou@digital.com wrote:
> : Hi,
>
> : I need to generate barcode GIFs (or jpegs). The perl module for this
> : purpose generates postscript. Also, there is a postscript/TT font available
> : that does barcodes. Finally, there must be someone who's done this before.
>
> : From this one need and three pieces, can anybody suggest how to connect
point
> : A to point B? (ie convert ps to gif, print fonts as gifs, or other solution)
>
> : Thanks,
> : Lucinda
>
> : -----------== Posted via Deja News, The Discussion Network ==----------
> : http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
> --
> ------------------------------------------------------------
> schalkwy@mpimg-berlin-dahlem.mpg.de
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 25 Jan 1999 10:23:12 GMT
From: pdroogma@netscape.net (peter)
Subject: Re: CGI.pm and Redirection question
Message-Id: <36ac45d0.1106961@192.168.0.1>
Hello,
The reason is that you already printed your header.
If you want to use redirect it has to be the first thing that you send
to the browser.
Peter
On Sun, 24 Jan 1999 03:45:13 GMT, Steve Miles <nsurfer@bellsouth.net>
wrote:
>Hi,
>
>In my script, I've used the CGI.pm module and have this at the beginning
>of my script:
>use CGI qw (:standard);
>$query = new CGI;
>print header;
>
>Then, in one of the subroutines I'm using later on I want to redirect
>the user so I put this:
>print $query->redirect(-location=>'http://www.yahoo.com');
>exit;
>
>The problem is that the browser just "prints" the redirection and
>doesn't send the user on to the site. It prints:
>HTTP/1.0 "http://www.yahoo.com" Status: "http://www.yahoo.com"
>Window-target: 302 Found Set-cookie: -Status Expires:
>-Location Date: Sun, 24 Jan 1999 03:37:40 GMT -URI
>http://www.groundbreak.com/cgi-bin/mycgi/replicator/replicator.cgi?action:
>-nph 0 Content-type: LOCATION
>
>Sorry for all the mess, but does anyone have a solution to the problem?
>I think I have to change the header from text/html somehow, but I'm not
>sure how.
>
>Thanks in Advance,
>Steve Miles
>www.groundbreak.com
------------------------------
Date: Tue, 26 Jan 1999 08:18:22 +0000
From: David Pratt <David_J_Pratt@sbphrd.com>
Subject: Re: Counting characters with tr/// (in perl)
Message-Id: <36AD7A4E.F1435264@sbphrd.com>
Thanks, that works nicely!
Regards
Dave
> eval "\$count = \$search =~ tr/$find//";
>
------------------------------
Date: Mon, 25 Jan 1999 23:25:58 -0500
From: Eugene Sotirescu <eugene@snailgem.org>
Subject: Re: edit @INC?/DBI install--Can't locale Config.pm
Message-Id: <36AD43D6.14D65C22@snailgem.org>
Mark Hamlin wrote:
>
> Today,
>
> Installed Perl 5 on Solaris using pkgadd. I tested with a very simple
> script and with some functionality which wasn't working before, ie
> perldoc. All seemed fine.
>
> Second task of the day is installind DBI with oracle DBD
>
> On attempting to install DBI (before DBD) I got an error after the:
> perl Makefile.PL
>
> # perl Makefile.PL
> Can't locate Config.pm in @INC at
> /usr/local/lib/perl5/ExtUtils/MakeMaker.pm line 13.
> BEGIN faled--compilation aborted at
> /usr/local/lib/perl5/ExtUtils/MakeMaker.pm line 13.
> BEGIN failed--compilation aborted at Makefile.PL line 14.
>
> I do have the Config.pm file, which on my machine is located at :
> /usr/local/lib/perl5/sun4-solaris/5.00401/Config.pm
>
> My @INC path as displayed vi: perl -e 'print "@INC'" is:
> /usr/local/lib/perl5/sun4-solaris/5.004 /usr/local/lib/perl5
> /usr/local/lib/perl5/site_perl/sun4-solaris
> /usr/local/lib/perl5/site_perl
It looks like you don't have Config.pm in the @INC paths:
/usr/local/lib/perl5/sun4-solaris/5.00401/Config.pm
^^
/usr/local/lib/perl5/sun4-solaris/5.004
--
Eugene
"I have an Apache Web Server that uses CGI forms written in COBOL."
Post in clpm
------------------------------
Date: Mon, 25 Jan 1999 23:53:18 -0500
From: Eugene Sotirescu <eugene@snailgem.org>
Subject: Re: File Upload.
Message-Id: <36AD4A3E.1DB8E752@snailgem.org>
Sam Curren wrote:
>
> Sure.
> Check out http://www.terminalp.com/scripts/file_upload.shtml and look at
> his example. It's a little complicated, but I used his script (with
> extensive modification) to create a totally custom solution for our
> website.
>
> He comments his code well, and has some good technique.
I took a look at the script and at the risk of sounding like a prig I
would say: let the script do your job, but don't use it as a programming
model:
1.No use strict
2.No concern for security (no taint checking; and it's writing to a 777
dir!)
3.No program structure (not one sub in over 300 lines of code).
--
Eugene
"I have an Apache Web Server that uses CGI forms written in COBOL."
Post in clpm
------------------------------
Date: Tue, 26 Jan 1999 03:48:24 GMT
From: john.morse@symbios.com (John Morse)
Subject: How do I expand a variable within `'s
Message-Id: <36ad36a7.3136990@news.ks.symbios.com>
What I'm trying to do is expand a command line argument within
back-tics. Below is not my actual code but an example of what I'm
trying to do. With supplying only one command line argument, then
expand it within back-tics, as an argument to a command.
if($#ARGV < 0) {
printf ("Usage: %s <argh>\n",$0);
exit;
}
`echo @ARGV`;
Well, as you all know, this doesn't work.
Any input is greatly appreciated.
Thanks in advance.
------------------------------
Date: Tue, 26 Jan 1999 00:39:22 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: How do I expand a variable within `'s
Message-Id: <comdog-ya02408000R2601990039220001@news.panix.com>
In article <36ad36a7.3136990@news.ks.symbios.com>, john.morse@symbios.com (John Morse) posted:
> What I'm trying to do is expand a command line argument within
> back-tics. Below is not my actual code but an example of what I'm
> trying to do. With supplying only one command line argument, then
> expand it within back-tics, as an argument to a command.
> if($#ARGV < 0) {
> printf ("Usage: %s <argh>\n",$0);
> exit;
> }
>
> `echo @ARGV`;
>
>
> Well, as you all know, this doesn't work.
it doesn't? it works for me. backticks are double-quotish thingys.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: Mon, 25 Jan 1999 22:20:19 -0500
From: "Robert Gwynne" <gwynne@utkux.utk.edu>
Subject: Re: how do I insert this in my HTML code?
Message-Id: <78jcaq$gob$1@gaia.ns.utk.edu>
Use CGI.pm and read its documentation on the Web. Then if you ask about
CGI.pm, it can be construed as a Perl question.
Bob Gwynne
Abigail <abigail@fnx.com> wrote in message
news:78iln0$r75$1@client2.news.psi.net...
>Emulov (emulovNOSPAM@sin.khk.be) wrote on MCMLXXII September MCMXCIII in
><URL:news:78f0vq$f7g$1@nickel.uunet.be>:
>[]
>[]
>[] Let's say I have a simple CGI script that just displays a line of
>[] text, or a counter or something. I want this line to be displayed on a
>[] .htm page. Which code do I put in my HTML code to achieve this?
>
>Well, that's not a Perl question, is it? There are several answers
>to this question, none of them appropriate to this group.
>
>
>
>Abigail
>--
>perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>C
D=>(
>0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>
0=>0
>=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}f
or(;
>!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
------------------------------
Date: Tue, 26 Jan 1999 09:33:24 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: How do I split this string?
Message-Id: <36af8774.1098170@news.skynet.be>
Ken Williams wrote:
>inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
>
>The above is from ifconfig. I need to pull the IP's out. Specifically the
>first. How do I split with a starting character of : and an ending character
>of space?
>
>For example:
>
>($IP, $BC, $MASK) = split (/: ??? /);
"split" is not the right tool, methinks.
$_ = "inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0\n";
($ip,$bcast,$mask) = /:(\d+\.\d+\.\d+\.\d+)/g;
Bart.
------------------------------
Date: 26 Jan 1999 03:51:29 GMT
From: Dan Bikle <dbikle@rahul.net>
Subject: Re: How I direct STDIN to shell command?
Message-Id: <78je41$6tt$1@samba.rahul.net>
Hi,
For those completely unencumbered by documentation
Here is a simple demo....
#! /usr/local/bin/perl -w
# demo of stdin redirect into shell command via pipe
open (PIPE, "| /usr/bin/dc") || die "could not open PIPE $!";
print PIPE <<EOF;
1
1
+
p
q
EOF
print "\n";
I wrote yesterday:
>
> Hi,
>
> suppose I have a shell command, /usr/bin/dc for example,
> which allows a user to feed it chars via STDIN.
>
> All UNIX shells allow me to construct a script which
> directs STDIN from the shell script rather than the keyboard.
>
> Here is a demo:
>
> #! /bin/sh
>
> /usr/bin/dc << EOF
> 1
> 1
> +
> p
> q
> EOF
>
> My question is ...
>
> How do I write a perl script which directs STDIN from the
> perl script to a shell command?
>
> A similar question: How would you port the above shell syntax
> to perl syntax??
>
> -Dan
> ---------------------------------------------------------------------
> Daniel B. Bikle/Independent Oracle Consultant
> bikle@bikle.com | 650/941-6276 | P.O. BOX AG LOS ALTOS CA 94023
> http://www.bikle.com
> ---------------------------------------------------------------------
------------------------------
Date: Mon, 25 Jan 1999 22:29:10 -0500
From: "Robert Gwynne" <gwynne@utkux.utk.edu>
Subject: Re: How to calculate time difference?
Message-Id: <78jcrf$gtv$1@gaia.ns.utk.edu>
You can install modules in your own space and the sysadm won't even
know--unless he's nosy. See the Perl FAQ 8 "How do I install a CPAN module.
Bob Gwynne
>> I hope i don't need any "module" because
>> my system adm won't feel happy about installing any 'optional'
>> stuffs....
------------------------------
Date: Mon, 25 Jan 1999 22:04:36 -0500
From: "Robert Gwynne" <gwynne@utkux.utk.edu>
Subject: Re: Perl Books for Beginners
Message-Id: <78jbdb$g3t$1@gaia.ns.utk.edu>
Stay away from * for Dummies books. Get a copy of Perl 5 Interactive Course
by Jon Orwant. It takes you step by step through most of what you'll ever
need to know.
Bob Gwynne
PEReynolds <pereynolds@aol.com> wrote in message
news:19990125193132.27572.00002528@ng-ce1.aol.com...
>For absolute beginners, I'd like to recommend 2 books.
>1. Perl 5 for Dummies
>This book is good for absolute beginners because it explains the
introductory
>material very well. It also has charts and lists of terms collected
together
>in one place that make this book worth the price.
>
>2. Perl for Win32
>Even though it is written for primarily Win32 systems, it explains various
>basic topics such as opening files and text processing very well. I bought
the
>book and installed Perl 5 on an NT 4.0 system at work because the Y2k
program I
>had on hand to search for Y2k-related data in source files did not work
well.
>Using Perl and this book as a guide I wrote an application from scratch
that
>did a much better job in meeting my needs.
>
>
------------------------------
Date: Tue, 26 Jan 1999 09:33:19 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Perl Criticism [summary]
Message-Id: <36ad7f7d.1324571@news.skynet.be>
aqumsieh@my-dejanews.com wrote:
>> Dont suppose anyone has a summary to this thread :-)
>
>Search dejanews at www.dejanews.com
That's not a "summary". That's the whole damn thing (around over 400
posts by now).
Bart.
------------------------------
Date: 26 Jan 1999 09:43:29 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Perl Criticism
Message-Id: <slrn7ar3i0.jdl.sholden@pgrad.cs.usyd.edu.au>
On Mon, 25 Jan 1999 17:43:25 GMT, topmind@technologist.com wrote:
>In article <slrn7anuqc.r09.sholden@pgrad.cs.usyd.edu.au>,
> sholden@cs.usyd.edu.au wrote:
>> On Mon, 25 Jan 1999 04:19:57 GMT, topmind@technologist.com wrote:
>> >In article <slrn7aij5v.9ar.sholden@pgrad.cs.usyd.edu.au>,
>> > sholden@cs.usyd.edu.au wrote:
>> >> On Sat, 23 Jan 1999 02:11:27 GMT, topmind@technologist.com wrote:
>> >> >> It's possible to write unmaintainable code in any language.
>> >> >
>> >> >If I hear this flippen' MYTH stated one more time, I am going to
>> >> >have Norton classify Perl as a virus.
>> >>
<snip some of the crap by me and topmind>
>> So again I ask point me to a language in which it is impossible for me to
>> write unmaintainable code. Back up what you say for once.
>
>
>
>You are making a gray issue into a black-and-white issue.
>I will not fall for that fallacy. All langauges ARE abusable,
>but NOT EQUALLY. Some encourage or allow more *or* different
>"levels" of abuse than others.
I never said that all languages are equally abusable.
You said that there exists some language in which it is impossible to
write unmaintainable code.
Here's a point if you want people to actually listen to anything you might
have to say then don't lie. Don't exagerate. Don't lie.
Based on the posts I've read by you I can see why you find code unmaintainable,
you probably write code like the following...
$bill *= 1.1; #subtract 20 from $bill
If you would actually be a little honest and not resort to lies to try and
prove your points then people might actually pay atention.
It no longer worries me that you called me dishonest, since you have lied so
many times that I can expect everyone else will expect that you lied then
too.
Since you refuse to answer any of my direct question, I thankfully will
now say good-bye.
Have a wonderful day, just don't come and get a programming drop in Australia.
--
Sam
"... the whole documentation is not unreasonably transportable in a
student's briefcase." - John Lions describing UNIX 6th Edition
"This has since been fixed in recent versions." - Kernighan & Pike
------------------------------
Date: Mon, 25 Jan 1999 16:20:09 -0800
From: Kole Dunn <kole@semp.net>
Subject: Perl update causes problems with scripts
Message-Id: <36AD0A36.265AC5E7@semp.net>
Just updated Perl on our new FreeBSD server to 5.00_502 and now all
scripts that have open(IN, '<file.txt') or die " file won't open";
won't work. I used the || instead of or and solved that problem,
although now I get an error from using "chomp" and now getting some
various other syntax errors. Anyone know the reason for this? Does the
latest version of Perl have lots of incompatibily issues? Looked in the
FAQs and could not find an answer.
Thanks
KD
------------------------------
Date: Tue, 26 Jan 1999 09:24:26 GMT
From: mwoog@pobox.ch (Marc-A. Woog)
Subject: Re: Printing back gif-file (counter)
Message-Id: <36ad8986.361262@news.datacomm.ch>
On Mon, 25 Jan 1999 23:01:03 +0100, Staffan Liljas <staffan@ngb.se>
wrote in <36ACE99F.67BD986F@ngb.se>:
Hi Staffan Liljas,
>Marc-A. Woog wrote:
>> I hope I didn't miss anything in the FAQ but I couldn't find anything
>> on this one:
>
>This is not a perl question.
>
>> counter.cgi:
>> [...]
>> open (GIFFILE, "$gif") || bail ("Couldn't open gif: $!");
>> binmode GIFFILE;
>> while (<GIFFILE>) { print $_; }
>> close(GIFFILE);
>> [...]
>
>Did you remember to output the correct header, ie saying
>print "Content-Type: image/gif\n\n";
>before starting to print the image?
>
>If not -- that's where you are wrong. But if it is, this is not a perl
>question.
You were absolutely right. It works just fine...I thought I was doing
something wrong in Perl ;)
Thanks!
Marc
------------------------------
Date: Mon, 25 Jan 1999 12:59:46 -0800
From: Kole Dunn <kole@semp.net>
Subject: Problems using "or" and "chomp"
Message-Id: <36ACDB3D.7D03C837@semp.net>
Hello
Just updated Perl on our new FreeBSD server to 5.00502 and now all
scripts that have open(IN, '<file.txt') or die " file won't open";
wont work. I used the || instead of or and solved that problem,
although now I get an error from using "chomp". Anyone know the reason
for this?
You can email me directly.
Thanks
KD
------------------------------
Date: Mon, 25 Jan 1999 23:06:27 -0500
From: David Coppit <dwc3q@cs.virginia.edu>
Subject: Q: PREFIX doesn't work in Windows?
Message-Id: <Pine.WNT.4.05.9901252300400.-1091523-100000@juggernaut>
So if someone doesn't have permissions to install perl modules in the
system directories, they have to do something like this:
perl Makefile.PL INSTALLDIRS=perl PREFIX=/some/install/directory \
INSTALLMAN1DIR=/some/install/directory/man/man1
make
make install
For my distribution, this seems to work well under Unix-like OSes, but
under DOS/Windows the generated makefile has all the install directories
hard-coded, instead of relying on $(PREFIX).
Is there some way to persuade the MakeMaker to use the PREFIX? I'm using
Perl 5.004_02, and MakeMaker 5.42.
TIA,
David
________________________________________________________________________
David Coppit - Graduate Student coppit@cs.virginia.edu
The University of Virginia http://www.cs.virginia.edu/~dwc3q
"For I am a Bear of Very Little Brain,
and long words Bother me" - Winnie the Pooh
------------------------------
Date: Mon, 25 Jan 1999 21:26:57 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Remove all non a-z characters?
Message-Id: <MPG.1116f1f9df7da9609899c6@nntp.hpl.hp.com>
In article <OYam8eNS#GA.189@news1.texas.rr.com> on Mon, 25 Jan 1999
20:58:21 -0600, Mike Stok <mike@stok.co.uk> says...
> In article <36ad06ba.0@news.cgocable.net>,
> Ken Williams <tekkin@hotmail.com> wrote:
> >
> >I have a string that can contain anything "t4(e3*s@22t".
> >
> >How do pull out only the characters a-z. So the above example would end up
> >with a string called "test", because all the garbage is scrapped.
>
> One thing to try might be tr, in the debugger
>
> DB<1> $s = 't4(e3*s@22t'
>
> DB<2> $s =~ tr/a-z//cd
>
> DB<3> X s
> $s = 'test'
>
> The perlfunc manual page describes what tr does and what the flags mean.
> This is an alternative to using s, depending on your data one way may be
> better than the other.
I was going to post a complaint about people always looking for regex
solutions for single-character problems. But your post showed up while
I was running this benchmark, so I'll hang my post onto yours. My
experience is that tr is faster than s and I haven't seen any
exceptions.
#!/usr/local/bin/perl -w
use Benchmark;
$y = 't4(e3*s@22t';
timethese(1 << (shift || 0), {
Cntrl => sub { my $string = $y },
Tr => sub { (my $string = $y) =~ tr/a-z//cd },
Regex => sub { (my $string = $y) =~ s/[^a-z]//g },
});
Benchmark: timing 262144 iterations of Cntrl, Regex, Tr...
Cntrl: 2 wallclock secs ( 1.65 usr + 0.00 sys = 1.65 CPU)
Regex: 8 wallclock secs ( 8.62 usr + 0.00 sys = 8.62 CPU)
Tr: 3 wallclock secs ( 2.86 usr + 0.00 sys = 2.86 CPU)
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 26 Jan 1999 05:02:09 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: Request for negative value list indexes
Message-Id: <l%br2.369$Qi1.17882@news.rdc1.on.wave.home.com>
In article <36ACCA19.483DCAC2@perf.zko.dec.com>,
Ben Smith <bsmith@perf.zko.dec.com> wrote:
! Perl Porters and Larry Wall,
!
! Wouldn't it be nice to be able to reference a list element from the end
! as well as
! from the begining.. $array[-1] would be equivalent to $array[$#array]
! and
! $array[-2] would be equivalent to $array[$#array-1].
[danger:ajohnson:~]$ perl -lwe 'print $ARGV[-1]' foo bar blah
blah
spooky huh?
regards
andrew
------------------------------
Date: Tue, 26 Jan 1999 09:33:21 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: sorting dates
Message-Id: <36ad853a.529422@news.skynet.be>
Dennis Kowalski wrote:
>Eric Smith wrote:
>> I have a csv which contains a date field and I would like my
>> script to sort the lines by the date field.
>> csv ->
>> 29/09/98,this,that,theother
>> 23/09/98,this,that,theother
>> 23/04/98,this,that,theother
>My 1st suggestion is to store the date in yy/mm/dd format.
>Which by the way is not y2k compliant.
So *my* first suggestion is to store it in the yyyy/mm/dd format. Then
you can simply and safely sort the lines alphabeticallly.
Bart.
------------------------------
Date: Mon, 25 Jan 1999 22:10:25 -0500
From: "Colbert Philippe" <colbert@nh.ultranet.com>
Subject: TEST
Message-Id: <78jatg$qi2$1@strato.ultra.net>
TEST
------------------------------
Date: Mon, 25 Jan 1999 22:17:46 -0500
From: "Colbert Philippe" <colbert@nh.ultranet.com>
Subject: TEST
Message-Id: <78jbba$b4s$1@ligarius.ultra.net>
Ignore message
------------------------------
Date: Mon, 25 Jan 1999 22:46:20 -0500
From: Bruce Hodo <bruceh@interaccess.com>
Subject: Using a variable as a variable name
Message-Id: <36AD3A8C.1AAA1FD3@interaccess.com>
I am having a slight problem with references. Here's what I'm trying to
do:
I have a perl script running with strict, and using CGI.pm. In a FOR
loop I want to
-set a variable $var = "string1'.$i.'string2';
-append to another variable $output .= $cgi ->hidden( $var , ${var} )
-end of loop
What I want in the second parm of hidden is the VALUE of
string2.$i.string2, not the name, so when I print $output, the contents
of string2.$i.string2 are printed. What am I doing wrong?
--
Bruce Hodo - Webmaster, GetAwayNetwork, Inc.
==Providing unique vacation information on the World Wide Web==
For Villas, Resorts, Hotels, Air/Hotel Packages, Charter Airfares
And Now Offering Travel Auctions!
=============== Visit us at http://getawaynet.com ===============
------------------------------
Date: Mon, 25 Jan 1999 22:44:39 -0800
From: Piyush Jain <mitswa@ix.netcom.com>
Subject: Using MS Access
Message-Id: <36AD6457.81DE6620@ix.netcom.com>
Hello everyone,
Is there a way to connect to an MS Access database using Perl? I need to
use this in a script to read from the Access database. Right now the
cgi-bin directory is on a Unix box and from this a connection needs to
be opened to Windows NT where the Access database resides.
Any pointer and help will be appreciated.
Thanks in advance,
piyush
------------------------------
Date: Mon, 25 Jan 1999 11:12:50 -1000
From: Michael Ching <m_ching@hotmail.com>
Subject: Re: Using MS Access
Message-Id: <36ACDE52.B8355F42@hotmail.com>
Set up ODBC server and add Access db DSN. Access via DBI::ODBC or
Win32::ODBC
Piyush Jain wrote:
>
> Hello everyone,
>
> Is there a way to connect to an MS Access database using Perl? I need to
> use this in a script to read from the Access database. Right now the
> cgi-bin directory is on a Unix box and from this a connection needs to
> be opened to Windows NT where the Access database resides.
>
> Any pointer and help will be appreciated.
>
> Thanks in advance,
>
> piyush
------------------------------
Date: Mon, 25 Jan 1999 11:19:01 -1000
From: Michael Ching <m_ching@hotmail.com>
Subject: Re: Using MS Access
Message-Id: <36ACDFC5.415F2E0A@hotmail.com>
for unix try these, though I haven't been there myself.
www.ensodex.com
www.openlinksw.com.
Michael Ching wrote:
>
> Set up ODBC server and add Access db DSN. Access via DBI::ODBC or
> Win32::ODBC
>
> Piyush Jain wrote:
> >
> > Hello everyone,
> >
> > Is there a way to connect to an MS Access database using Perl? I need to
> > use this in a script to read from the Access database. Right now the
> > cgi-bin directory is on a Unix box and from this a connection needs to
> > be opened to Windows NT where the Access database resides.
> >
> > Any pointer and help will be appreciated.
> >
> > Thanks in advance,
> >
> > piyush
------------------------------
Date: Mon, 25 Jan 1999 21:15:22 -0800
From: Maria Webster <mwebster@inetarena.com>
Subject: Win32 Process Script: Help!
Message-Id: <36AD4F68.7CA822F4@inetarena.com>
Hey, Mongers...
New to perl and even newer to perl for win32, but since I've expressed
an interest, my co-workers have given me a project. i need to automate a
file copy from a local dir to a shared network dir on an as-needed basis
with a script that will read changed attributes on files and only copy
over the ones that have been modified. I thought I might try the
Cookbook to see if something already exists, but I haven't even finished
the llama and gecko books yet. Any suggestions? If something already
exists, please point me in the right direction, but I'm actually looking
to learn how to do it instead of just "cut-and-paste"-ing a solution.
Please kick me an email, as I can only check posts once a day (though if
etiquette calls for just a return post, so be it.).
mwebster@inetarena.com
k_oslord@yahoo.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 4749
**************************************