[8438] in Perl-Users-Digest
Perl-Users Digest, Issue: 2055 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 9 10:14:20 1998
Date: Mon, 9 Mar 98 07:00:50 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 9 Mar 1998 Volume: 8 Number: 2055
Today's topics:
Re: A simple question about command line variables... <johnk@victorex.com>
Re: error??? <jdporter@min.net>
file or folder? <nweibx@abs.ascom.ch>
Re: file or folder? <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
gzipped tar perl manual <johnk@victorex.com>
Help: CGI Animation (server push) doesn't work with Int <a.amemiya@asahi-jc.com>
Re: ksh2perl converter? <mchase@ix.netcom.com>
Re: More thoughts on c.l.p.m. <alexs@online.emap.com>
Re: Omnihttp (Tor Iver Wilhelmsen)
OpenGL <nik@tiuk.ti.com>
Re: OpenGL <zhang@b7-02.bv.TU-Berlin.DE.nospam>
PERL-MSQL :HOW CAN I MAKE A QUERY IN MSQL FROM A PERL S <agro@xures.ei.uvigo.es>
Re: Perl/Tk and OpenGL <zhang@b7-02.bv.TU-Berlin.DE.nospam>
Re: Problem with "goto" in Perl (Brian Wheeler)
Re: Problem with "goto" in Perl (Andrew M. Langmead)
Problem with filenames on NT <miran.sepic4@mss.tel.hr>
Re: Pw32i302...now this is just plain frustrating! <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Re: Search Scripts (Craig Keefner)
Re: Sybase <Dave.Cross@gb.swissbank.com>
Re: Sybperl documentation <Dave.Cross@gb.swissbank.com>
Re: The -w switch (was Re: better way to do this?) (Joergen W. Lang)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 09 Mar 1998 07:21:21 -0500
From: "John V. Kjellman" <johnk@victorex.com>
Subject: Re: A simple question about command line variables...
Message-Id: <3503DEC1.7D47@victorex.com>
Uri Guttman wrote:
>
> alain.deckers@man.ac.uk (A. Deckers) writes:
>
> > In <35038B07.6DB7DA7A@iname.com>,
> > Scott A. MacMillan <smacmillan@iname.com> wrote:
> > [...]
> > >In C-shell, $0 represents the scripts, $1 represents the firts variable,
> > >$2 represents the second variable, and so on. What, if any, is the Perl
> > >equivalent?
> >
> > Doesn't @ARGV work in the win32 world?
>
> probably not, fork doesn't :-)
>
> uri
>
> --
> Uri Guttman SYStems ARCHitecture and Software Engineering
> uri@sysarch.com Have Perl, Will Hack
> http://www.sysarch.com (781) 643-7504 x*2 FAX: (781) 643-2710
> Try the Best Search Engine on the Net --------> http://www.northernlight.com
$ARGV[0] holds 1st arg, $ARGV[1] holds 2nd, etc....
@ARGV holds entire list of args. Works on WIN95/WINNT just
like UNIX.
Johk Kjellman
--
Victorex, Inc. Computer reservations and management
36 Main Street, Suite C information systems for Timeshare
P.O. Box 730 Resorts & Vacation Rental Managers.
Henniker, New Hampshire 03242-0730 We also support Alpha Microsystems
(603) 428-8200, (603) 428-8090 (FAX) computers. Please use P.O. box
E-mail: johnk@victorex.com for all mail.
------------------------------
Date: Mon, 09 Mar 1998 09:40:38 -0500
From: John Porter <jdporter@min.net>
Subject: Re: error???
Message-Id: <3503FF66.458@min.net>
merlin wrote:
>
Might I gently suggest that you change your pseudonym?
The one you have chosen is considered a reserved name
in this newsgroup.
John Porter
------------------------------
Date: 9 Mar 1998 12:18:36 GMT
From: "Xaver Weibel" <nweibx@abs.ascom.ch>
Subject: file or folder?
Message-Id: <01bd4b55$7bd1eae0$d19f4f8b@berp37.abs.ascom.ch>
How can I check if it is a file ore a folder in win95. I have tryed with -d
but it doesnt function!
--
nweibx@abs.ascom.ch
------------------------------
Date: Mon, 9 Mar 1998 06:42:08 -0800
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: file or folder?
Message-Id: <6e0v01$rv8@bgtnsc02.worldnet.att.net>
I've never had a problem with this. Try this little one-liner:
perl -e "print \"My copy of Perl works just fine!\n\" if (-d \".\");"
If you don't see the message you have a busted copy of Perl and need to
reinstall. Otherwise perhaps you could post a snippet of code that
demonstrates the problem so we can take a look at it. HTH
--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl
Xaver Weibel wrote in message
<01bd4b55$7bd1eae0$d19f4f8b@berp37.abs.ascom.ch>...
>How can I check if it is a file ore a folder in win95. I have tryed with -d
>but it doesnt function!
>--
>nweibx@abs.ascom.ch
------------------------------
Date: Mon, 09 Mar 1998 08:38:21 -0500
From: "John V. Kjellman" <johnk@victorex.com>
Subject: gzipped tar perl manual
Message-Id: <3503F0CD.3C5E@victorex.com>
How does one open/unzip the gzipped tar file that contains the perl
manual in pdf format? It was downloaded from www.perl.com. I have
WIN95/WINNT 4.0 WS/SCO UNIX SysV Rel 3.2 Vers 4.0 systems available to
me. Thanks,
John Kjellman
--
Victorex, Inc. Computer reservations and management
36 Main Street, Suite C information systems for Timeshare
P.O. Box 730 Resorts & Vacation Rental Managers.
Henniker, New Hampshire 03242-0730 We also support Alpha Microsystems
(603) 428-8200, (603) 428-8090 (FAX) computers. Please use P.O. box
E-mail: johnk@victorex.com for all mail.
------------------------------
Date: Mon, 9 Mar 1998 09:41:38 -0500
From: "Atsushi Amemiya" <a.amemiya@asahi-jc.com>
Subject: Help: CGI Animation (server push) doesn't work with Internet Explorer?
Message-Id: <6e0v9h$494@netaxs.com>
Could anyone help me? CGI animation that works beautifully with Netscape
doesn't work at all with Internet Explorer. Does anyone know why? I've
attached the source code. This one works with Netscape, but it does not work
with Internet Explorer. I would like to make it work with Internet Explorer.
Thanks in advance.
Atsushi (Strange name? I'm Japanese)
#!/usr/local/bin/perl
#
# dynagraphic.cgi
#
# This application uses server push to
# change the graphic that is displayed in
# an HTML document.
#
# create array of graphics
$|=1;
$count=1;
@grapharray =
("../mojifile/one.gif","../mojifile/two.gif","../mojifile/three.gif",
"../mojifile/four.gif","../mojifile/five.gif");
# as file begins with nph-
# application needs HTTP directive
print "HTTP/1.0 200 Okay\n";
print "Content-type: multipart/x-mixed-replace;boundary=appboundary\n\n";
print "--appboundary\n";
while ($count <= 10) {
foreach $member (@grapharray) {
print "Content-type: image/gif\n\n";
open(GRAPHIC, $member);
print <GRAPHIC>;
close(GRAPHIC);
print "\n--appboundary\n";
sleep 3;
}
$count++;
}
------------------------------
Date: Sun, 8 Mar 1998 05:57:26 -0800
From: "Michael A. Chase" <mchase@ix.netcom.com>
Subject: Re: ksh2perl converter?
Message-Id: <6e0lsp$l7f@sjx-ixn5.ix.netcom.com>
I asked the same question about 6 months ago and got no positive responses.
If the ksh scripts you're converting use similar idioms, you can probably
use a Perl script to perform most of the conversion, but you'll still have
quite a bit of hand work. If you create Perl package that contains
subroutines for the most common idioms, you can probably save a lot of
retyping.
Mac :})
Michael Wang wrote in message <6dn7mn$3br$1@news.ml.com>...
>Ed Overton <saseao@unx.sas.junkmail.com> wrote:
>>Hi all,
>> I'm looking for a ksh to perl converter. I've got quite a number of
ksh
>>scripts that I'll need to convert, and I'd rather not write a converter
>>myself...
------------------------------
Date: Mon, 09 Mar 1998 13:44:05 +0000
From: Alex Schajer <alexs@online.emap.com>
Subject: Re: More thoughts on c.l.p.m.
Message-Id: <3503F225.BDDEA8DC@online.emap.com>
What might be a nide idea is a chat c.l.p.m for that purpose. People who have
easy/simple questions, like 'last element in an array' or 'sorting hash
tables' which many of the more experience perl users could answer in a second.
This will free up the c.l.p.m group for serious discussin and debate where a
record of the discussion is needed.
This could be a 'drop in session' - a chat based system, similar to a
talker/mud.
Anyone think it's a good idea?
Alex
Andy Lester wrote:
> Here's some more strange behavior I don't understand:
>
> Why do people think that simply by saying "my X doesn't work with Y", with
> not so much as an error message, that we'll be able to solve their
> problems? "I typed in the program from the book, but it doesn't work!"
>
> I was discussing the last month of hoohah here in c.l.p.m. with a friend
> of mine, and he said "It seems like the newer people see Usenet as chat."
> I think he's dead on. Look at how this causes many of the problems here:
> * People write very short messages
> * People don't realize that there's a history and reference to this
> * They don't think that we have anything to do besides talk to them.
> * (I suspect) they don't understand why they get yelled at for it all.
>
> xoox,
> Andy
>
> --
> --
> Andy Lester: <andy@petdance.com> http://tezcat.com/~andy/
> Chicago Shows List: <shows@ChicagoMusic.com> http://ChicagoMusic.com/
------------------------------
Date: Mon, 09 Mar 1998 13:22:49 GMT
From: toriw@online.no (Tor Iver Wilhelmsen)
Subject: Re: Omnihttp
Message-Id: <350dea0d.22821197@news.eunet.no>
On Sat, 07 Mar 1998 11:26:39 -0500, "Frank J. Cauley"
<cauleyfj@ix.netcom.com> uttered:
>Does anyone have any experience with this software that emulates a
>server on the PC?
OmniHTTPd needs to know two things:
1) Where the Perl interpreter resides (enter it under "Advanced" in
the config), and
2) What directories constitute sources for CGI scripts (under
"Standard CGI" in the config)
You also need to tell it to enable Perl CGI, also under "advanced".
--
"Between our dreams and actions lies this world."
- Bruce Springsteen, "Dead Man Walking"
Tor Iver Wilhelmsen toriw@online.no
------------------------------
Date: Mon, 09 Mar 1998 13:00:16 +0000
From: Nick Ing-Simmons <nik@tiuk.ti.com>
Subject: OpenGL
Message-Id: <3503E7E0.73E0@tiuk.ti.com>
Does anyone know wher I can contact author, or failing that
existing users of the OpenGL module?
I would like to work with someone to allow perl/Tk and OpenGL to
co-exist better.
--
Nick Ing-Simmons <nik@tiuk.ti.com>
Via, but not speaking for: Texas Instruments Ltd.
------------------------------
Date: 9 Mar 1998 14:37:38 GMT
From: hallo erstmal <zhang@b7-02.bv.TU-Berlin.DE.nospam>
Subject: Re: OpenGL
Message-Id: <6e0uri$c51$2@mamenchi.zrz.TU-Berlin.DE>
Nick Ing-Simmons <nik@tiuk.ti.com> wrote:
: Does anyone know wher I can contact author, or failing that
: existing users of the OpenGL module?
: I would like to work with someone to allow perl/Tk and OpenGL to
: co-exist better.
As a beginner i can not participate your project, but this is
a very good idea, ;-). perhaps you can convert a existing C OpenGL
Widget in Perl ? The current OpenGL Mudule create only a X Window.
wish you success.
Y. Z.
/* delete .nospam form my E-adress to send me mail */
------------------------------
Date: Mon, 09 Mar 1998 13:32:46 +0100
From: Josi <agro@xures.ei.uvigo.es>
Subject: PERL-MSQL :HOW CAN I MAKE A QUERY IN MSQL FROM A PERL SCRITP?
Message-Id: <3503E16E.6413@xures.ei.uvigo.es>
MY QUESTION IS:
FROM A PERL SCRIPT , HOW CAN I MAKE A QUERY TO A MSQL DATABASE ?
------------------------------
Date: 9 Mar 1998 14:29:58 GMT
From: hallo erstmal <zhang@b7-02.bv.TU-Berlin.DE.nospam>
Subject: Re: Perl/Tk and OpenGL
Message-Id: <6e0ud6$c51$1@mamenchi.zrz.TU-Berlin.DE>
Per Kistler <kistler@erdw.ethz.ch> wrote:
: Hi All
: How do I combine the tk and opengl module?
: In C++ on SGI I have a special widget: GLwDrawingArea
: What's that in perl?
There is a OpenGL module for Perl/TK, but this module does not create
a widget, only seperate X window.
Y.Z.
------------------------------
Date: 9 Mar 1998 13:55:07 GMT
From: bdwheele@indiana.edu (Brian Wheeler)
Subject: Re: Problem with "goto" in Perl
Message-Id: <6e0sbr$nkb$3@flotsam.uits.indiana.edu>
In article <6dtjvn$5ca$1@nnrp1.dejanews.com>,
schwern@starmedia.net writes:
> That which I scream at you three time while frothing at the mouth and pounding
> on your skull is true:
>
> Don't use goto! <POUND!>
> Don't use goto! <POUND!>
> DON'T USE GOTO!!! <POUND!> <POUND!> <POUND!>
>
> Everyone will laugh at you if you use goto.
> Girls won't go out with you if you use goto.
> Your dog won't be your best friend if you use goto.
> The universe, in general, will loathe you if you use goto.
>
> Never, ever, ever use goto() unless you've got a really, really, really good
> reason to do so. In every case (except extreme error recovery) it would be
> better served with a loop (while, for, foreach...), loop control (last, next,
> continue, redo...) or a subroutine.
Not "in every case". :) I have a case where I want to use
goto &subroutine; How do I do that with a loop?
In _any_ case, use of goto sometimes makes more sense and is clearer
than wrapping things in loop structures. Of course, its performance is
hideous....so it might be rejected for that reason.
Goto _not_ considered harmful...using goto _badly_ considered harmful.
Brian Wheeler
bdwheele@indiana.edu
------------------------------
Date: Mon, 9 Mar 1998 14:37:33 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Problem with "goto" in Perl
Message-Id: <EpK3AL.E8x@world.std.com>
bdwheele@indiana.edu (Brian Wheeler) writes:
> Not "in every case". :) I have a case where I want to use
>goto &subroutine; How do I do that with a loop?
Not many people lump "goto &subroutine" with the "goto" that CS
students are taught to hate. The name may be the same, but it doesn't
have any of the charateristics that are given for "goto" being
bad. (Of course, perl as a whole seems to be the type of thing that CS
students are taught as being inappropriate. Its that orthogonality
thing.)
Another example in perl is eval. The function "eval STRING" should be
avoided, but "eval BLOCK" is important and useful.
> In _any_ case, use of goto sometimes makes more sense and is clearer
>than wrapping things in loop structures. Of course, its performance is
>hideous....so it might be rejected for that reason.
> Goto _not_ considered harmful...using goto _badly_ considered harmful.
Right, but in perl "goto" has even fewer reasons than in many other
languages. Being able to "last", "next", or "continue" out of any
number of named blocks (not necessarily loops. Remember, a bare BLOCK
is equivalent to a loop that executes once.) takes care of many of the
"goto" fallbacks in other languages.
--
Andrew Langmead
------------------------------
Date: Mon, 09 Mar 1998 14:09:39 +0100
From: Miran Sepic <miran.sepic4@mss.tel.hr>
Subject: Problem with filenames on NT
Message-Id: <3503EA11.402F4528@mss.tel.hr>
Hello,
I have a following problem. I made a CGI script that reads files from
one directory, and puts the list of links to them on a web page. Perl
reads the directory, and everything is OK except one. In the directory
there are some files with characters: #, $, %. They are shown on the
list but link to them doesn't work. Microsoft IIS server says: File Not
Found. I think the reason is HTTP, but I must use filenames with such
characters. Is there an idea how I can do it?
Thanks, Miran
------------------------------
Date: Mon, 9 Mar 1998 06:27:57 -0800
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: Pw32i302...now this is just plain frustrating!
Message-Id: <6e0u5f$o2i@bgtnsc02.worldnet.att.net>
Cameron Dorey wrote in message <3503019B.A359DC3A@mail.uca.edu>...
>Are you sure that's what you did, "Start > Programs > MS-DOS Prompt"?
>That's the way it's supposed to work (and that's the way it _does_ work
>for me). Or did you "restart computer in DOS mode." That doesn't work,
>no matter what it sounds like. I don't know *what* that's good for.
It's good for games that require you to be in DOS because they want
exclusive use of all of your computer's resources, and that's about it. If
you really want to run Perl programs in DOS mode, you have to be in your
Perl directory or set the path to your Perl executable in AUTOEXEC.BAT, but
I don't recommend it.
Me, I *always* launch a command prompt box before I run a Perl script. That
way I can see error messages my script generates (or, in even more
frustrating circumstances, doesn't generate when one would be helpful :D).
--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl
------------------------------
Date: Mon, 09 Mar 1998 13:17:20 GMT
From: keefner@kinetic.com (Craig Keefner)
Subject: Re: Search Scripts
Message-Id: <3503ea07.313896829@news.visi.com>
I've put it out on one of my websites.
http://www.kiosks.org/treesed
original was URL: http://www.sara.nl/rick
Craig
On 9 Mar 1998 01:05:28 GMT, burt@ici.net (Burt Lewis) wrote:
>Sound great, where does one find treesed?
>
>Burt
>
>n article <3502b6da.86360589@news.visi.com>, keefner@visi.com says...
>>
>>On Wed, 4 Mar 1998 12:17:17 -0800, "Nitin Gupta"
>><niting@raleigh.ibm.com> wrote:
>>
>>>Are there any search scripts available which can deal with sites which have
>>>2000+ pages? The one's available work by opening each page and searching
>for
>>>the corresponding search term, this takes a long time on a large site.
>>
>>There is a script called treesed in perl which i use to handle
>>global search/replace or find or specific page search/replace
>>and one of my sites is over 2000 pages. Takes less than
>>a minute.
>>
>>Craig
>
------------------------------
Date: Mon, 9 Mar 1998 12:27:59 GMT
From: David Cross <Dave.Cross@gb.swissbank.com>
Subject: Re: Sybase
Message-Id: <y4d67lo9hgw.fsf@gb.swissbank.com>
Geert Roovers <etmgero@etm.ericsson.se> writes:
> I want to read from and write to a Sybase database on UNIX (SunOS, dunno
> what version, but 5.5.1 or later anyway). I know there are modules for
> this, and probably DBD::Sybase or Sybase::DBlib, Sybase::BCP,
> Sybase::Sybperl or Sybase:CTlib will do what I want. But who can tell me
> which one is best and easiest to understand, BEFORE I ask my sytem
> administrator to install either one of them? I want to query (I take it
> that SQL is possible in perl?) the database, create, update and delete
> records, but there's no need to create tables or anything.
The Sybperl Module contains Sybase::DBlib, Sybase::CTlib, Sybase::BCP
and Sybase::Sybperl. Sybase::Sybperl is just a compatibility layer for
old Sybperl scripts - ignore it. Sybase::BCP contains support for BCP
(hence the name) so you'll only use it if you're BCPing data in or out
of a database. Sybase::DBlib and Sybase::CTlib support two different
APIs for talking to Sybase databases. DBlib is older and is the only
API that works with Sybase dataservers pre System 10. Use CTlib if at
all possible.
DBI is a new(ish) initiative from the developers of many of the Perl
database modules. It is a more portable approach and the DBI module
is the same for all databases and a specialised DBD module is used
for the particular database that you want to talk to. The DBD::Sybase
module is currently in development and is available as a beta (or is
it still alpha?) test version.
To precis: DBD and DBI::Sybase will be the best way to go, but I'm not
sure whether it's up to production standards yet. Sybase::CTlib is
probably your best bet in the meantime.
hth,
Dave...
--
If I wasn't so busy writing status reports,
my status report might just become a progress report.
Dave.Cross@gb.swissbank.com
------------------------------
Date: Mon, 9 Mar 1998 11:58:11 GMT
From: David Cross <Dave.Cross@gb.swissbank.com>
Subject: Re: Sybperl documentation
Message-Id: <y4d7m649iuk.fsf@gb.swissbank.com>
Geert Roovers <etmgero@etm.ericsson.se> writes:
>
> Alex wrote:
> >
> > does anyone know where I can find comprehensive documentation on Sybperl
> > (Sybase Perl Libraries)?
>
> If you find it, let me know
There's a lot of documentation included with the module. If you need
any more, try Michael Peppler's home page at:
<http://www.mbay.net/~mpeppler/>
hth,
Dave...
--
If I wasn't so busy writing status reports,
my status report might just become a progress report.
Dave.Cross@gb.swissbank.com
------------------------------
Date: Mon, 9 Mar 1998 13:26:19 +0100
From: joergen.lang@schwaben.de (Joergen W. Lang)
Subject: Re: The -w switch (was Re: better way to do this?)
Message-Id: <1d5mk72.1ns21yc116zftoN@host013-206.seicom.net>
Joseph N. Hall <joseph@5sigma.com> wrote:
> Just about every compiler I've ever used has had a message like
> "Too many errors. Compilation halted." However, -w has evolved in
> the direction of dogma rather than utility. In my humble opinion.
>
> -joseph
>
Got this from perldiag.pod :
(well, ok, this comes out, even without the -w)
%s has too many errors
(F) The parser has given up trying to parse the program after 10 errors.
Further error messages would likely be uninformative.
Greetings, Joergen
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.
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 2055
**************************************