[12297] in Perl-Users-Digest
Perl-Users Digest, Issue: 5897 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jun 5 09:07:15 1999
Date: Sat, 5 Jun 99 06:00:21 -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, 5 Jun 1999 Volume: 8 Number: 5897
Today's topics:
Re: \n doesn't work on NT4 SP4 <gellyfish@gellyfish.com>
Re: Anyone know what is this script line meaning ?? <dgris@moiraine.dimensional.com>
Apache::AutoIndex <ericyu@infor.eu.org>
Re: Can't make a perl NT <gellyfish@gellyfish.com>
Re: Copying any files <Alar@mtk.ut.ee>
Re: Copying any files <gellyfish@gellyfish.com>
Re: Copying any files <Alar@mtk.ut.ee>
Re: Dataset update/Security question <gellyfish@gellyfish.com>
Re: Dating service script needed -matchmaker script <gellyfish@gellyfish.com>
Re: DBI vs ODBC?? <gellyfish@gellyfish.com>
Re: Doesn't matter <gellyfish@gellyfish.com>
How can I go into subdirectory? <kanokwan@netman.dk>
Re: How can I go into subdirectory? (Michel Dalle)
How to allow users to upload files on a server from the smnayeem@my-deja.com
Re: HTML in Email (Dave Cross)
Re: HTML in Email <gellyfish@gellyfish.com>
Re: know Perl to maintain Perl (was: Re: I pass an arra <tchrist@mox.perl.com>
Re: multiple windows using Perl/Tk <gellyfish@gellyfish.com>
Re: Perl "constructors" armchair@my-deja.com
Re: perl acting up on NT, problem with reading * as an <gellyfish@gellyfish.com>
Re: Perl and Scheduling Tasks <gellyfish@gellyfish.com>
Re: perl compilation problems on linux <gellyfish@gellyfish.com>
problem clearing an array of array smnayeem@my-deja.com
Re: Problem running '.exe' from 'CGI' <gellyfish@gellyfish.com>
return code problem (Robert Chung)
Re: Subscribing to this NG - how do they do that?? <gellyfish@gellyfish.com>
Re: Thanks! <gellyfish@gellyfish.com>
Re: The artistic license and perl: <dgris@moiraine.dimensional.com>
Using Perl Modules <thurley@globalnet.co.uk>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 5 Jun 1999 12:29:53 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: \n doesn't work on NT4 SP4
Message-Id: <7jb581$3rj$1@gellyfish.btinternet.com>
On Fri, 04 Jun 1999 21:03:01 GMT Amonotod wrote:
> Now if
> I can just figure out how to use open(), print FILEHANDLE,
> and close() successfully, I'll be all set. Not counting
> the fact that I don't know how to use modules.
The current ActiveState distribution will have installed the fine
Perl documentation as a bunch of HTML files that can be accessed
via a link in your Start Menu.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 05 Jun 1999 04:41:54 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: Anyone know what is this script line meaning ??
Message-Id: <m3u2snudxp.fsf@moiraine.dimensional.com>
lr@hpl.hp.com (Larry Rosler) writes:
> Unfortunately, I've discovered that occasionally the shortest code and
> the fastest benchmarks don't go together. What's a guy to do? :-(
Hmmmmm.... hack Benchmark.pm to store the results of its runs in a
little database. Write another module that descends through your
source trees parsing perl code looking for constructs in your
benchmark database and replacing them with more efficient
alternatives. Run a script using the new module out of your crontab
every 6 or 8 hours.
Of course, there are probably one or two small implementation
details that I've glossed over. :-)
dgris
--
Daniel Grisinger dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: 5 Jun 1999 10:14:09 GMT
From: "Eric Yu" <ericyu@infor.eu.org>
Subject: Apache::AutoIndex
Message-Id: <7jat9h$4la$1@news.seed.net.tw>
When I type 'perl Makefile.PL' in AutoIndex,
it shows:
Can't determine prototype for `Apache::AutoIndex::DirectoryIndex':
Can't locate Apache::AutoIndex in @INC (@INC contains: ./lib blib/
arch blib/lib /usr/local/lib/perl5/5.00502/i386-freebsd /usr/local
/lib/perl5/5.00502 /usr/local/lib/perl5/site_perl/5.005/i386-freeb
sd /usr/local/lib/perl5/site_perl/5.005 .) at /usr/local/lib/perl5
/site_perl/5.005/i386-freebsd/Apache/ExtUtils.pm line 35.
What should I do now?
Thanks!
------------------------------
Date: 5 Jun 1999 12:27:50 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Can't make a perl NT
Message-Id: <7jb546$3rg$1@gellyfish.btinternet.com>
On Thu, 03 Jun 1999 22:52:52 GMT Mike S. wrote:
> If anyone can help me get a perl loaded on NT Server 4 I would appreciate
> it.
>
You can download the Win32 Perl from:
<http://www.activestate.com/ActivePerl/>
This is a self-installing executable so it is simply a matter of downloading
the file and running it.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 5 Jun 1999 15:10:54 +0300
From: "Alar Pandis" <Alar@mtk.ut.ee>
Subject: Re: Copying any files
Message-Id: <7jb485$91c$1@kadri.ut.ee>
Hi! And thanks for comments.
I have Perl installed on Netware 4.11 server and I trying create script for
using under Netscape Fasttrack server. And I need to do some copy-things -
files is mixed, I mean text-files and binary files, also I need keep date
and time stamps etc. I can't use system copy command (I tried that before
too).
And now I not see any possibilities. I see that module File::Copy keep some
binary elements and I think this module must not care what a type is file
(this must be - i guess - module decision what kind a file is this).
But until now I can't use this module for copying any files. I know - I am
doing something wrong, but what?
Thanks in advance,
Alar.
------------------------------
Date: 5 Jun 1999 11:43:08 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Copying any files
Message-Id: <7jb2gc$3ol$1@gellyfish.btinternet.com>
On Fri, 4 Jun 1999 19:19:22 +0300 Alar Pandis wrote:
> Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
> news:<3757f71c@newsread3.dircon.co.uk>...
>> Alar Pandis <Alar@mtk.ut.ee> wrote:
>> > Hi, Jonathan!
>> > Thanks.
>> >
>> > Can You give example how can I use modules? I have file A and need copy
> this
>> > file into location B.
>> >
>>
>> perldoc File::Copy
>>
>
> I did that, but result is that by example Word-files or ZIP-files is copied
> not correctly. I got the same result if I did this via OPEN FILE and PRINT
> etc.
> What I am doing wrong? (With TXT-files is OK!, as usually.)
>
If you look at the File::Copy documentation you will see that it is
possible to supply filehandles to the copy function - you will want to
do this after having applied binmode() to them.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 5 Jun 1999 15:49:27 +0300
From: "Alar Pandis" <Alar@mtk.ut.ee>
Subject: Re: Copying any files
Message-Id: <7jb6gl$imu$1@kadri.ut.ee>
Hi and thanks!
I tried that (filehandles and binary) - no success, result is the same.
Text-files is OK! (with not the same attributes, but in corpore), but binary
files is differently.
Alar.
Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
news:7jb2gc$3ol$1@gellyfish.btinternet.com...
> On Fri, 4 Jun 1999 19:19:22 +0300 Alar Pandis wrote:
> > Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
> > news:<3757f71c@newsread3.dircon.co.uk>...
> >> Alar Pandis <Alar@mtk.ut.ee> wrote:
> >> > Hi, Jonathan!
> >> > Thanks.
> >> >
> >> > Can You give example how can I use modules? I have file A and need
copy
> > this
> >> > file into location B.
> >> >
> >>
> >> perldoc File::Copy
> >>
> >
> > I did that, but result is that by example Word-files or ZIP-files is
copied
> > not correctly. I got the same result if I did this via OPEN FILE and
PRINT
> > etc.
> > What I am doing wrong? (With TXT-files is OK!, as usually.)
> >
>
> If you look at the File::Copy documentation you will see that it is
> possible to supply filehandles to the copy function - you will want to
> do this after having applied binmode() to them.
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>
> Some of your questions answered:
> <URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
> Hastings:
<URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 5 Jun 1999 11:38:36 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Dataset update/Security question
Message-Id: <7jb27s$3oi$1@gellyfish.btinternet.com>
On Fri, 4 Jun 1999 10:28:27 -0700 Tom Phoenix wrote:
>
> Although I'll try to help you here anyway, you may get more help through a
> web-related newsgroup.
>
What have you done with the real Tom Phoenix ;-}
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 5 Jun 1999 10:08:40 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Dating service script needed -matchmaker script
Message-Id: <7jasv8$3ki$1@gellyfish.btinternet.com>
On Fri, 04 Jun 1999 23:35:48 +0200 Mateo Byler wrote:
> And just about anything you can think of that would be needed in
> something like this.
>
Hmmm.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 5 Jun 1999 10:33:25 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: DBI vs ODBC??
Message-Id: <7jaudl$3km$1@gellyfish.btinternet.com>
On Sun, 6 Jun 1999 03:52:57 +0800 Luke wrote:
> Hi,
>
> My problem now is choosing between DBI method or Win32::ODBC method.
>
> Is there any speed difference? To my knowledge, using DBI adds an extra
> layer over ODBC. Is this correct?
>
If you are using DBD::ODBC then yes it does - but ODBC has already put an
extra layer over your Database driver anyhow. A DBD module will use the
native drivers whenever possible. For instance DBD::Informix will be
linked with the Informix Client SDK libraries and is basically therefore
just an abstraction of the standard API.
> Is DBD an equiv of ODBC drivers??
>
In a way but but DBI is more direct than ODBC
> Would using DBI+DBD make it easier to port the source codes from NT to a
> Unix system as compared to ODBC? And would using it make porting DATABASEs
> be easier too?
>
Yes. Even if you end up using DBD::ODBC and then need to go to a Unix system
with say DBD::CSV then all you will need change in all probability is the
connect() string. If you use Win32::ODBC then you will almost certainly
need to rewrite parts of your code because of the different methods.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 5 Jun 1999 11:16:35 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Doesn't matter
Message-Id: <7jb0uj$3np$1@gellyfish.btinternet.com>
On Fri, 4 Jun 1999 18:59:25 +0100 Oliver Brown wrote:
>
> Oliver Brown <oliver@admiralq.free-online.net> wrote in message
> news:BqU53.613$Hy4.605@wards...
>>
>>
>>
>
>
A no body reply to a no body post - bizzare ...
What was the question again.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Thu, 03 Jun 1999 09:48:49 +0200
From: kanokwan <kanokwan@netman.dk>
Subject: How can I go into subdirectory?
Message-Id: <37563361.B549D47F@netman.dk>
Suppose I have directory /yai/lek and I want to go into its
subdirectory. Then the directory name must be digit only. How can I
do?
Thank you
------------------------------
Date: Sat, 05 Jun 1999 11:12:18 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: How can I go into subdirectory?
Message-Id: <7jb0ku$ret$1@xenon.inbe.net>
In article <37563361.B549D47F@netman.dk>, kanokwan <kanokwan@netman.dk> wrote:
>Suppose I have directory /yai/lek and I want to go into its
>subdirectory. Then the directory name must be digit only. How can I
>do?
I'm afraid this is a bit unclear. Do you have only 1 subdirectory that has a
digit as name, or could you have several subdirectories like that ?
In any case, have a look at your Perl documentation, and look up the following
functions :
- opendir, readdir, closedir
- file test operators, in particular '-d' (= is it a directory)
- chdir
- pattern matching and regular expressions, in particular '\d' (= is it a
digit)
You might try something like this : (untested)
..
chdir('/yai/lek') || die "Can't change to directory /yai/lek : $!";
..
opendir(DIR,'.') || die "Can't open current directory : $!";
@filelist = readdir(DIR);
closedir(DIR);
..
$isfound = -1;
foreach $file (@filelist) {
if (-d $file && $file =~ /^\d$/) {
chdir($file) || die "Found $file, but can't move there : $!";
$isfound = $file;
last;
}
}
..
if ($isfound > -1) {
print "Found $file and went there";
}
else {
print "Didn't find anything, so we're still in /yai/lek";
}
..
This should move you to the first subdirectory whose name is a single digit.
I leave the one-liners to the Perl experts :-)
Michel.
------------------------------
Date: Sat, 05 Jun 1999 09:04:46 GMT
From: smnayeem@my-deja.com
Subject: How to allow users to upload files on a server from their browser?
Message-Id: <7jap7d$4gq$1@nnrp1.deja.com>
I looked at the Net::Ftp module, there is a way for uploading the local
file to the remote server, but my question is, i want users of my
webpage to be able to upload files to me using the web, i am thinking of
putting a button or someting and have a perl program connected to it
that would fetch the local file and upload it to my server, but will it
be local to the client who is uploading the file or local to the
webserver that is running the script?
please let me know
thanks
smnayeem
smnayeem@agni.com
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sat, 05 Jun 1999 12:04:07 GMT
From: dave@dave.org.uk (Dave Cross)
Subject: Re: HTML in Email
Message-Id: <375911b9.845959@news.demon.co.uk>
On Fri, 04 Jun 1999 22:56:09 GMT, olmert@netvision.net.il wrote:
>Hello,
>How can I impliment HTML tags inside an email message generstaed from a
>CGI? I have a CGI based on Matt's formmail script, that sends an
>email. I would like to be able to customize the look of this email by
>using HTML tags inside the message's body. Any ideas?
HTML mail should form a separate section in a MIME compliant email and
you should include a text section as well for non-MIME enabled mail
readers.
You can create MIME messages using the MIME::Lite module which is
available from CPAN <http://www.cpan.org>,
hth,
Dave...
--
Dave Cross <dave@dave.org.uk>
<http://www.dave.org.uk>
------------------------------
Date: 5 Jun 1999 09:56:59 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: HTML in Email
Message-Id: <7jas9b$3k5$1@gellyfish.btinternet.com>
On Fri, 04 Jun 1999 22:56:09 GMT olmert@netvision.net.il wrote:
> Hello,
> How can I impliment HTML tags inside an email message generstaed from a
> CGI? I have a CGI based on Matt's formmail script, that sends an
> email. I would like to be able to customize the look of this email by
> using HTML tags inside the message's body. Any ideas?
>
In order to do this you will probably want to use the module MIME::Lite
available from CPAN. However I dont think that it will necessarily be
such an easy job to modify 'formmail' to use this - maybe you ought to
think about writing your own : I'm not bored enough to write one myself.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 5 Jun 1999 05:03:17 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: know Perl to maintain Perl (was: Re: I pass an array...)
Message-Id: <375903f5@cs.colorado.edu>
In comp.lang.perl.misc,
rjk@linguist.dartmouth.edu (Ronald J Kimball) writes:
:How much Perl does someone have to know before they're allowed to use
:it?
How much Perl is considered off-limits to a Perl virtuoso
because Visual BASIC immigrants would be confused?
How much English is considered off-limits to an English virtuoso
because Polish immigrants would be confused?
How much Liszt is considered off-limits to a piano virtuoso
because harmonica immigrants would be confused?
Here's a piece that this topic reminded me of:
Have you noticed that the use of an unusual word sometimes irritates
the reader to such a point that he will accuse the user of affectation,
than which there is no more heinous crime in the American republic?
The distinguished political and social philosopher and columnist
Mr. Russel Kirk used the word "energumen" to describe in his
Introduction to my book _Rumbles Left and Right_ whom it is a
agitate against, and one reviewer fairly exploded with annoyance.
Now the word in question means "someone possessed by an evil spirit"
and fanatically addicted to a particular idea. Can you think of a
better word to describe certain kinds of people who seek to reorder
public affairs according to their hypnotic visions? Should one refuse
to use a venerable word for which there is no obvious synonym,
simply because it is a word that does not regularly appear in the
diet of the average reader?
I raise the problem because I am often accused of an inordinate
reliance on unusual words, and desire--as would you in my shoes,
I think--to defend myself against the insinuation that I write as
I do simply to prove that I have returned recently from the bowels
of a dictionary with a fish in my mouth, establish my etymological
dauntlessness. Surely one must distinguish between those who plunder
old tomes to find words which, in someone's phrase, should never be
let out... and such others as Russel Kirk, who use words because (a)
the words signify just exactly what the user means, and because (b)
the user deems it right and proper to preserve in currency words which
in the course of history were coined as the result of a felt need.
There is a sort of phony democratic bias against the user of unusual
words. Recently I heard a young movie actress being interviewed on
a radio station. She was asked by her interrogator what it meant
to be an actress, and replied that an actor's life is "multifaceted".
"What are you trying to pull on me?" demands the radio announcer.
She ran panicked from the argument--what else, in the democratic age,
when it is deemed an effrontery on the democratic ideal to use a word
that is not used twice a week by Little Orphan Annie? "I'm sorry I
used such a fancy word--I guess I really don't know what it means--I
should have said, there are lots of aspects to being an actress."
Democracy won the day, and the show droned on.
A while ago I was on Jack Parr's television program, and he asked
me a number of questions having to do with this and that, which I
tried vainly to answer, as best I knew how. I wrote about that
experience... and described the ensuing tantrum of Mr. Paar and
his associates, who steamed on and on about my ideological vices,
expressing special outrage at my unintelligibility.
It is a curious thing, this universal assumption by a number of
prominently situated opinion- or rather mood-makes, that the American
people are either unaware of the unusual word or undisposed to hear
in and find out what it means, thus broadening not merely their
vocabulary--that isn't the important thing--but their conceptual
and descriptive powers. Those who say that the average American is
incapable of appreciating the meaning of the word "energumen" are,
in my humble judgment, nuts. The average American is, in Franklin
P. Adam's phrase, a bit above average, and his intelligence is not
tied umbilically to Jack Paar's anti-intellectual muse.
It is curious, too, that a man who is offended by the use of the word
"multifaceted" or "energumen" is perfectly capable of expressing in a
sentence of death-defying mechanical complexity. I am unfortunately
innocent in the word of science and I wish I knew what in the world
the TV hawker is talking about when he reels off something that has
to do with a "double action injector system in the valve mechanism",
but it does not occur to me to suggest that he is putting on airs;
it occurs occurs to me to rue my patently inadequate knowledge of
the mechanical a b c's.
The point about unusual words is that there are as necessary
to philosophy, economics, aesthetics, and political science as
they are necessary in the world of higher mechanics, in which so
many people displaying the natural American genius are so much
at home. It is possible, I suppose, to describe the refinements
of an Astrojet fan injection through-ventilated engine in words
understandable to me, but the exercise is not often resorted to
because the manufacturers assume a level of mechanical literacy,
even as they assume that those who do not have it ought not to set
the standards for those who do have it. So it is in other fields,
which is why, in my judgment, when Mr. Russel Kirk uses the word
"energumen", he should be allowed to use it, and the thing for book
reviewers to do when they come upon it, if they are unfamiliar with
it, is not to pout, but to open a dictionary and see if the word
is one whose meaning they wish to learn. They must guard against
going about like anti-literate energumens.
--wfb
I don't intend to read overly much on the occasionally strained metaphor
above. It just struck something of a resonant chord, read in the context
of the current topic.
--tom
--
"There are two kinds of people in the world: morning people ...
and slackers!" --Tom Christiansen, of the former variety
------------------------------
Date: 5 Jun 1999 11:24:55 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: multiple windows using Perl/Tk
Message-Id: <7jb1e7$3ns$1@gellyfish.btinternet.com>
On Fri, 04 Jun 1999 15:39:01 GMT tkd_black_belt@my-deja.com wrote:
>
> Another tangent... Is MDI possible using Perl/Tk?
>
I doubt it - the Multiple Document Interface is specific to the Windows
GUI although I suppose that you could emulate it in some way.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 05 Jun 1999 07:46:02 GMT
From: armchair@my-deja.com
Subject: Re: Perl "constructors"
Message-Id: <7jakjq$3h4$1@nnrp1.deja.com>
In article <927964754.999114@localhost>,
zenin@bawdycaste.org wrote:
> armchair@my-deja.com wrote:
> >snip<
> : Since the looping and decision constructs of Perl are the
> : same as C and
> : C++, and since C++ now has a string class, perhaps it is the dynamic
> : arrays and dynamic hashes that have you rolling on the
> : floor and laughing.
> : Well, via the Standard Template Library (STL), those data
> : structures also
> : exist in C++ as well (few, if any vendors are not shipping
> : the STL with
> : their compiler). What then puts Perl at a higher level
> : than C++? Regular
> : expressions?
>
> Non sequitur. If you add hash and string macros to assembly,
> would it be as high level as Perl and C++? I think not.
>
Wide right. Assembly does not have the same if and while/for logic as
C/C++/Perl. Assembly does not have arithmetic expressions and variable
declaration/naming and assignment like C/C++/Perl. And Assembly does not
have IO statements like print and printf and read/write like C/C++/Perl.
And Assembly does not have the portability/standardization of
C/C++/Perl. Assembly = C++. I think not.
> : my @array = <FILE>; is nice, but once you write similar routines in
C++,
> : you also have complete control over the error handling.
>
> Ditto for assembly, quite a bit more so actually.
can you do this in Assembly?:
TextArray a;
returnCode = a.LoadFromTextFile("input.txt");
a.RemoveBlankLines();
cout << a;
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 5 Jun 1999 11:14:22 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: perl acting up on NT, problem with reading * as an argument
Message-Id: <7jb0qe$3nm$1@gellyfish.btinternet.com>
On Fri, 04 Jun 1999 18:20:03 GMT dominikos@my-deja.com wrote:
> I try to run the same perl script on unix, using version 5.004_04, and
> on NT, using version 5.005_02. My script is very simple,
>
> #! /usr/sbin/perl
> #
>
> foreach $header ( @ARGV ) {
> print $header,"\n";
> }
>
> when I run it on unix as ./new.pl *.pl, it lists all the perl scripts in
> a directory. When I run it on NT, it complains that it cannot find *.pl.
>
This is because (for historical reason - see the article in Dr Dobbs
Journal #299 by Al Stevens for a good explanation ) the NT command
interpreter in common with all from the MS stable do not support the
expansion of amibiguous file specifications as do the majority of
shells in the Unix world. A Unix shell will supply a list of files
matching that specification as the arguments whereas CMD.EXE will supply
the string '*.pl'.
You can get around this by using a glob - an example:
@files = <@ARGV>;
This will be an effective no-op if @ARGV contains an expanded list of
filenames but will expand any unexpanded wildspecs (I tested it on Unix
by putting single quotes around the '*.pl' on the command line).
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 5 Jun 1999 10:04:55 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl and Scheduling Tasks
Message-Id: <7jaso7$3kf$1@gellyfish.btinternet.com>
On Fri, 04 Jun 1999 21:42:04 GMT Jalil Feghhi wrote:
> Is there any support for doing task scheduling in Perl for win32?
>
Both NT & Win98 have their own poor scheduling facilities - you might
want to consult the documentation before deciding they are no good
and want to do your own.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 5 Jun 1999 12:18:14 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: perl compilation problems on linux
Message-Id: <7jb4i6$3ra$1@gellyfish.btinternet.com>
On Fri, 04 Jun 1999 03:15:36 -0400 Lev Iserovich wrote:
> Hey all.
>
> I'm trying to compile a perl 5.005 (currently have 5.003 and the DBI
> module wants 5.004)
> It compiles finein static mode, but then I can't load the DBI modules
> dynamically which was the whole point. :)
> When I compile it dynamically, and run 'make test' it fails on many
> tests like goto_xs, lib/anydmb, and whole bunch more.
> I'm running a glibc2 system (which was upgraded all the way from
> Slackware with 1.2.x kernels way back when), so its not exactly your
> stock Redhat distro.. My kernel is 2.0.36, my gcc is 2.7.2.3, ld 2.8.1,
> any other info I can provide if interested. :)
I'd say that it is a problem with Configure - what does it give as the
default when it asks about building a dynamically linked perl :
The following dynamic loading files are available:
If it says dl_none then it has failed to discover the correct one for your
system - on my system (similar to yours) I have a line in config.sh like:
dlsrc='dl_dlopen.xs'
So I assume that you will to select the dl_dlopen choice at that point if
you are given it.
You should also have some lines in your Makefile that are similar to this:
# The following are used to build and install shared libraries for
# dynamic loading.
LDDLFLAGS = -shared -L/usr/local/lib
SHRPLDFLAGS = $(LDDLFLAGS)
CCDLFLAGS = -rdynamic
DLSUFFIX = .so
PLDLFLAGS =
LIBPERL = libperl.a
LLIBPERL= $(LIBPERL)
SHRPENV =
Again if this is substantially different it means that Configure has
somehow failed to determine the correct build environment.
If things get really bad I guess I could mail you my config.sh but that
can only be kludge - You really want to get it to build right from
the start.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 05 Jun 1999 07:16:26 GMT
From: smnayeem@my-deja.com
Subject: problem clearing an array of array
Message-Id: <7jais8$24e$1@nnrp1.deja.com>
Dear Perl experts,
I am having difficulties clearing the values of an array-ref of
array-refs. I am declaring and using an array of array references (for
convenience of passing it to and from subroutines).. what happens is
that when the subroutine that uses it (it declares it locally using my
and then uses it) it somehow remembers the previous values (i thought
all sorts of variables lose their values as soon as they get out of
their scope)... i tried everything, i tried initializing it to undef
when declaring it, also tried to pop off the values after using it, but
to no avail.
My array is something like this :
sub SayThings {
my $MyArray = []; #declare as a reference of an array
$MyArray = fillit;
for ($i = 0, $i <= $#$MyArray, $i++) {
print $MyArray->[$i][0], "\t";
print $MyArray->[$i][1], "\t";
print $MyArray->[$i][2], "\t";
print $MyArray->[$i][3], "\n";}
}
sub fillit {
my $retval = [];
#store references of arrays in it
push @$retval, ["Hello","there", "everyone"];
push @$retval, ["this", "isnt" , "working"];
push @$retval, ["very", "troublesome" , "problem"];
push @$retval, ["cant", "figure" , "out"];
return $retval;
}
what happens is that when i call sub SaySomething a second time and the
sub fillit returns some other values, somehow the old values gets
remembered and i cant seem to be able to get rid of them.
does anyone know how i can solve this problem?
thanks
smnayeem
smnayeem@agni.com
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 5 Jun 1999 12:23:57 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Problem running '.exe' from 'CGI'
Message-Id: <7jb4st$3rd$1@gellyfish.btinternet.com>
On Thu, 03 Jun 1999 21:22:59 -0500 Steve Hoadley wrote:
> Alright, I beat my head against a wall all day and now I need YOUR help.
>
> Heres the layout:
> windows NT
> microsoft Internet Information Server (IIS) 4.0
> Active state perl
>
> I've written a 'cgi-bin' perl program and put it in the right place
> (c:inetpub/wwwroot/cgi-bin), access it from a web page and it works!
> EXCEPT. It skips over all of the 'system' calls that I use
> (ie 'system "C:/winnt/.../notepad.exe";').
>
This is not a Perl issue at all - it is to do with the rights of the
user that the server runs programs as. You will probably be better off
asking this question in a group such as:
comp.infosystems.www.servers.ms-windows
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 05 Jun 1999 11:53:13 GMT
From: robertch@mindspring.com (Robert Chung)
Subject: return code problem
Message-Id: <375b0f9d.126349031@news.mindspring.com>
I run many things such as `Command1 | Command2 | Command3`. Problem
is, I need to find return codes from individual commands, ie return
code from Command1, return code from Command2, and return code from
Command3. Obviously, just taking a look at $? does not work. To make
matter worse, I do things like "eval 'somecommandX &' ; eval
'somecommandY &';". somecommandX and somecommandY will terminate at
unknown time in future, and I need to capture their individual return
codes also. Is there any absolute way to do it? Thank you very much
in advance.
------------------------------
Date: 5 Jun 1999 12:00:14 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Subscribing to this NG - how do they do that??
Message-Id: <7jb3ge$3q9$1@gellyfish.btinternet.com>
On Fri, 04 Jun 1999 09:16:58 GMT Richard Lawrence wrote:
> Not *strictly* a Perl question but vaigly relevant:
>
> I've noticed that when I subscribe to this newsgroup, I get a lovely
> email full of information, FAQ's and sites to check out.
>
> How is this done? I'd like to have something like that on a couple of
> other newsgroups but I have no idea where to start.
>
I dont know how gnats message is done - but I would read every new article
in my newfeed and extract the Reply-to: header, compare it with some
database of all those already seen: sending the mail and adding it to the
database if it isnt already there.
Now how how you get the articles from the newsfeed is probably the biggest
question - if I were going to do it here I might look for new files in
/var/spool/news/comp/lang/perl/misc others might use Net::NNTP and retrieve
new articles that way.
You might also be interested in Greg Bacon's News::Scan module available
from CPAN - this is used to produce the Statistics that get posted
here periodically (I didnt see them this week but that could be down to the
exigencies of my local feed ).
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 5 Jun 1999 11:35:48 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Thanks!
Message-Id: <7jb22k$3of$1@gellyfish.btinternet.com>
On Fri, 04 Jun 1999 21:22:07 GMT the1bob@my-deja.com wrote:
>
> I assume I can simply use (use CGI qw(:standard)) to declare my
> variables using:
>
Sensible move using CGI.pm
> my $useremail = param("USEREMAIL");
> my $subject = param("SUBJECT");
> .....etc.....
>
> ...then substitute the addresses, subjects, etc with the variable
> names.....and make the output formatted nicely.
>
Yep thats fine - you will probably want to check that they have got
something in them though or Mail::Sender will get upset ...
> What has REALLY ruined my skills
> is that I've been forced to use FrontPage to do all page creation and
> site management for the last two years. *sigh*
>
My heart bleeds for you - you should get hold of the demoroniser program
that was posted here by Tom Christiansen a short while ago and also take
a look at :
<http://www.w3.org/People/Raggett/tidy/>
Which whilst nothing to do with Perl will go a long way to making that
garbage that Frontpage emits something useable.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 05 Jun 1999 04:55:33 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: The artistic license and perl:
Message-Id: <m3lndyvrve.fsf@moiraine.dimensional.com>
abigail@delanet.com (Abigail) writes:
<snip pudge asking which license (AL or GPL) most perlers use>
> I think that in most cases it doesn't matter. There will be only a
> relatively few organizations that actually do more with perl than just
> using it. And as long as you don't modify perl, both the AL and GPL give
> you the same.
Isn't it more accurate to say that so long as you don't
_distribute_ perl the licenses will be functionally
equivalent.
dgris
--
Daniel Grisinger dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: Sat, 5 Jun 1999 10:35:02 +0100
From: "Thurley" <thurley@globalnet.co.uk>
Subject: Using Perl Modules
Message-Id: <7jar3m$5d6$1@gxsn.com>
I need to use one of these perl module things, but I have a few proplems:
I am running Windows, do I cannot (as far as I know) use these "make"
commands to compile the module. I will need to use them on a Unix web
server, so I guess I should compile them there - but how? Can I do it in
CuteFTP or something? Do I even need to compile it? Where do I put it?
As you can see, I haven't got a clue what I'm talking about.
The module in question is LWP::Simple.
Thanks,
James.
------------------------------
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 5897
**************************************