[9547] in Perl-Users-Digest
Perl-Users Digest, Issue: 3140 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 13 13:10:11 1998
Date: Mon, 13 Jul 98 10:01:31 -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 Mon, 13 Jul 1998 Volume: 8 Number: 3140
Today's topics:
Re: "@foo=<*>" missing files on FAT32 partitions? (Larry Rosler)
Re: Arrays merzky@physik.hu-berlin.de
compare MS Word files <wangli@nortel.ca>
File permissions in CGI tim221175@my-dejanews.com
Re: Getting a web page before a process finishes.. (Steve Swantz)
Re: Getting Yesterday's Date (Sitaram Chamarty)
Re: Getting Yesterday's Date (Chris Adams)
Re: Getting Yesterday's Date <tchrist@mox.perl.com>
Re: HELP: Internet Database Design questions... <eppie@interport.net>
Re: HELP: Internet Database Design questions... 2f3@my-dejanews.com
Re: HELP: Internet Database Design questions... <ou90141@deere.com>
HTML in Perl (Lawrence Elliott)
Re: HTML in Perl <johnc@interactive.ibm.com>
New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
Parsing Perl <dfan@harmonixmusic.com>
Re: Parsing Perl <tchrist@mox.perl.com>
Perl Database Problem mike@2f3.com
PERL Tutorial <JLEHMANN@dsccc.com>
Re: Perl+MS SQL 2f3@my-dejanews.com
Permissions in Perl tim221175@my-dejanews.com
Re: Permissions in Perl <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: Permissions in Perl (Eric Harley)
prueba de news <sala4@nevado.cui.edu.co>
Re: Returning a list from a XS <buzz@bear.com>
Re: s: simple-database (Larry Rosler)
Re: s: simple-database <quednauf@nortel.co.uk>
Re: s: simple-database <Adam.K@idnet.de>
Re: s: simple-database <Adam.K@idnet.de>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 13 Jul 1998 08:01:30 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: "@foo=<*>" missing files on FAT32 partitions?
Message-Id: <MPG.1013c12aec33e4ca989736@nntp.hpl.hp.com>
In article <35a9de67.0@news.munich.netsurf.de> on Mon, 13 Jul 1998
12:17:52 +0200, The Beals <yoshiko.beal@munich.netsurf.de> says...
> aka: Bug in Perl for Win32?
>
> I'm seeing that the following code snippet........
>
> @files = <*>;
> foreach $file (@files) {
> print $file."\n";
> }
>
> ..........misses the first file in the list when run on a FAT32 drive under
> Win98. When run on an NTFS drive over a network using Win98, or on a FAT16
> drive, it gets all file names correctly.
...
> Is anybody else having the same problem? Does anyone have a solution?
Without Win98 I can't test for this problem. However, I can recommend
that you learn and use the functions opendir(), readdir() and closedir()
instead of <*>. Your problem should go away, and your code should run
faster. (You may want to sort the output of readdir and eliminate the
directory entries '.' and '..' -- see sort() and grep().)
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 13 Jul 1998 16:34:58 GMT
From: merzky@physik.hu-berlin.de
Subject: Re: Arrays
Message-Id: <6odcvi$jim$1@nnrp1.dejanews.com>
In article <slrn6qjdcp.825.arch@abts.net>,
arch@abts.net wrote:
> Quoting The Wildman - in comp.lang.perl.misc you wrote:
>
> > I'm having a little trouble with arrays. Okay, a LOT. I don't understand how
> > they work in perl at all. I'm trying to do something like this:
> > for ($i = 0;$i < MAX;$i++) {
> > $array[$i] = $i;
> > }
> >
> > But of course it isn't working. You can see what my coding background is,
> > too, I suppose. :D
>
> Weird that it isn't working for you.
I guess he just declared something like
my ($array);
before, or used it in scalar context...
Andre.
> I just did
> perl -we 'for ($i = 0; $i < 5; $i++) {$array[$i] = $i} print "@array\n"'
> and it output
> 0 1 2 3 4
> I even left out the semicolons. ;-)
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 13 Jul 1998 15:29:20 GMT
From: "Liming Wang" <wangli@nortel.ca>
Subject: compare MS Word files
Message-Id: <01bdae72$7064c940$5c0beb2f@colon>
Hi, folks,
I would like to compare two MS Word files in a Perl script. Is anyone
aware of a robust mechanism for doing this ?
Say, file1.doc and file2.doc are identical in contents, but some words in
file1.doc are italic while the corresponding words in file2.doc are bold,
I would want to treat them as different.
Any advices, suggestions are appreciated. TIA.
------------------------------
Date: Mon, 13 Jul 1998 15:45:07 GMT
From: tim221175@my-dejanews.com
Subject: File permissions in CGI
Message-Id: <6oda23$feu$1@nnrp1.dejanews.com>
Hi
I am trying to write a CGI script that will be able to read emails from
/var/spool/mail/'user'. The permissions fore 'user' is set by adduser and the
passwd comand - 'mail'. And I have changed the owner and group of my script to
'mail' :
-rwxr-xr-x 1 mail mail 2460 Jul 13 08:16 cgi-bin/reademail.pl
and this is what the permissions are for my email:
-rw-rw---- 1 tim mail 0 Jul 13 03:06 tim
Is there any way that I can, in the script, logon as a user and then check my
email. I would like for everybody in the office to be able to check their
email through this script.
Thanks
Tim
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 13 Jul 1998 11:17:06 EDT
From: max_eper@hotmail.com (Steve Swantz)
Subject: Re: Getting a web page before a process finishes..
Message-Id: <max_eper-1307981017190001@ts005d15.min-mn.concentric.net>
In article <comdog-ya02408000R1107982220270001@news.panix.com>,
comdog@computerdog.com (brian d foy) wrote:
>In article <max_eper-1107980254380001@ts001d17.min-mn.concentric.net>,
max_eper@hotmail.com (Steve Swantz) posted:
>
>>I'm using a web form to mail a message to a list of subscribers. Right
>>now, I'm trying fork(). One process writes the page, then sends one
>>e-mail, while the other process takes on the big mailing. The problem -
>>the page will not appear until both processes are done, even though an
>>e-mail sent following the printing of the HTML arrives pronto. IOW, mail
>>sent after the page is printed arrives long before the page appears.
>
>why nopt just send the page then use the same proces to handle the
>rest?
Brian
That's what I tried first, but even if the page is printed first, it won't
show up on the browser until the mailing is done. I thought forking might
fix it, but it didn't.
------------------------------
Date: 13 Jul 98 12:39:39 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: Getting Yesterday's Date
Message-Id: <slrn6qcta1.2gf.sitaram@ltusitaram.diac.com>
On 10 Jul 1998 16:05:44 GMT, Tom Christiansen <tchrist@mox.perl.com> wrote:
> [courtesy cc of this posting sent to cited author via email]
>
>In comp.lang.perl.misc,
> sitaram@diac.com (Sitaram Chamarty) writes:
>:perldoc -f time is prolly what Tom meant...
>
>Certainly not. I don't use that program.
What started the question wasyou saying:
>>Leap seconds are ignored. time() is 29 seconds wrong, be definition.
^^^^^^^^^^^^^
s/be/by/; #typo assumed
So tell me. On my Linux (2.0.27) nothing that comes up in "man -k
time" says this in so many words. Only "perdoc -f time" does. So
what exactly - for our edification - did you mean when you said
"by definition" above?
------------------------------
Date: 13 Jul 1998 16:27:20 GMT
From: cadams@ro.com (Chris Adams)
Subject: Re: Getting Yesterday's Date
Message-Id: <6odch8$u7$1@news.ro.com>
According to Tom Christiansen <tchrist@mox.perl.com>:
>In comp.lang.perl.misc,
> cadams@ro.com (Chris Adams) writes:
>:According to Tom Christiansen <tchrist@mox.perl.com>:
>:> It turns out that POSIX
>:>requires that time() not include leap seconds
>:
>:Out of curiousity, where is this said? Is it still true in the Unix98
>:spec? I just looked at the Unix98 spec and it says:
>:
>: APPLICATION USAGE
>:
>: The range [0,61] for tm_sec allows for the occasional leap second
>: or double leap second.
>
>From reading various manpages, it is remarkable how many programmers
>think this can happen, but I believe it is a myth that a double leap
>second can exist. I can find no reference supporting it, and several
>disputing it. In particular:
[much snippage about single leap seconds]
>If you can show me something from an astronomer or something
>like NIST, then I'll believe you. Manpages written by confused
>programmers.
I don't doubt that the double leap second was made up by some person,
but I was more interested in your statement that "POSIX requires that
time() not include leap seconds." I'd never heard that and wondering
where that was documented. I don't doubt that it is true, since
probably a whole lot of programs assume that time() % 86400 is the
number of seconds since midnight (and other such assumptions that would
break), but I was curious where you got that.
--
Chris Adams - cadams@ro.com
System Administrator - Renaissance Internet Services
I don't speak for anybody but myself - that's enough trouble.
------------------------------
Date: 13 Jul 1998 16:54:24 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Getting Yesterday's Date
Message-Id: <6ode40$m1n$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
cadams@ro.com (Chris Adams) writes:
:but I was more interested in your statement that "POSIX requires that
:time() not include leap seconds."
I gave the reference in the original cite.
--tom
--
If I had to choose between System V and 4.2, I'd resign. --Peter Honeyman
------------------------------
Date: Mon, 13 Jul 1998 10:51:28 -0400
From: Catherine Skidmore <eppie@interport.net>
Subject: Re: HELP: Internet Database Design questions...
Message-Id: <35AA1EF0.172F@interport.net>
- wrote:
>
> Catherine Skidmore <eppie@interport.net> Said this:
>
> >Avi Goldenberg wrote:
> >
> >> 1) What are the current technologies needed to achieve the minimum of
> >> data storage, retrieval, and manipulation? (I prefer to stay NT as
> >> opposed to UNIX)
> >
> >ooh. Access and ASP. or Access and Cold Fusion.
>
> Oh my GOD. No.
care to defend that?
> >> 2) What do I need to look for in a hosting service to allow me to
> >> achieve #1?
> >
> >an NT Box running IIS.
> >
>
> Argh. New to computing? Must be.
wrong again.
-catherine
--
Catherine Skidmore
http://www.suck-my-big.org
"You can kiss my ass and go straight to hell bitch." - danbel
------------------------------
Date: Mon, 13 Jul 1998 15:39:37 GMT
From: 2f3@my-dejanews.com
Subject: Re: HELP: Internet Database Design questions...
Message-Id: <6od9np$f23$1@nnrp1.dejanews.com>
John,
I've got a different query:
I'm having problems getting Perl to write to a plain text file (comma
delimited database) and am not sure why. I think it may be the permissions,
but they seem okay. Can you think of anything else I should check?
Cheers,
Mike
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 13 Jul 1998 10:54:53 -0500
From: Babu Zaneer <ou90141@deere.com>
Subject: Re: HELP: Internet Database Design questions...
Message-Id: <35AA2DCD.A8DBC41@deere.com>
FYI.
ASP contains (or was containing) dangerous bugs like showing up the entire asp
file. This will reveal even the password for the database ( if you are
supporting DB operations!).
This bug was happenning if you put a dot (.) after the .asp extension. MS
corrected it . Then it was happening when ::$DATA was appended to the URL. Seems
that MS corrected this too ( What next?).
Ofcourse for faster development asp is a better solution.
jose wrote:
> I was wondering when someone would answer this Unix person..
>
> I for one have seen NT w/IIS and ASP running fine, it's a solution that
> works fine, because it's a MS solution to a common problem, designing a web
> site that produces dynamic content and not something that changes once in a
> while.
>
> So the web is floating with Unix boxes and that doesn't mean we have forget
> about the others. For the UNIX person "-", you might want to look at some
> other technologies floating around the web..
>
> Access and ASP, do work.
>
> Craig Bloom wrote in message <35A7F6BA.CD772C46@bones.org>...
> >Geez... the guy just wants to add a little database functionality, and it
> >doesn't even sound mission-critical. These Unix snobs really irk me
> >sometimes. Why overcomplicate the matter for someone who is just getting
> >started? I agree... NT, IIS, ASP and Access for quick development and fast
> >results. And it is a nice introduction to database manipulation for those
> >who haven't put their foot in the water yet. Later move it to MSSQL Server
> >if you need it to be more robust. The transition should be fairly
> painless.
> >
> >OR you can waste many hours learning your way around the unix operating
> >system, teaching yourself perl and stuffing data into (real efficient, yeah
> >right) flat file databases. Boy, tough choice.
> >
> >OK, now you can tell us again how much smarter you are because you use
> unix.
> >
> >
> >
> >No-name guy wrote:
> >
> >> Catherine Skidmore <eppie@interport.net> Said this:
> >>
> >> >Avi Goldenberg wrote:
> >> >
> >> >> 1) What are the current technologies needed to achieve the minimum of
> >> >> data storage, retrieval, and manipulation? (I prefer to stay NT as
> >> >> opposed to UNIX)
> >> >
> >> >ooh. Access and ASP. or Access and Cold Fusion.
> >>
> >> Oh my GOD. No.
> >>
> >> >
> >> >> 2) What do I need to look for in a hosting service to allow me to
> >> >> achieve #1?
> >> >
> >> >an NT Box running IIS.
> >> >
> >>
> >> Argh. New to computing? Must be.
> >
> >
> >
------------------------------
Date: Mon, 13 Jul 1998 15:08:34 GMT
From: laurie.gw6uba@btinternet.com (Lawrence Elliott)
Subject: HTML in Perl
Message-Id: <35ad22cc.24526614@news.btinternet.com>
I am a new user of Perl CGI programming and would appreciate some
guidance.
I have written several Perl CGI programs which work OK. Within the
Perl program I have used HTML Tags which again works fine apart from
the fact that I can't get the BODY BACKGROUND command to work. Is this
normal? I would also like to know if there are any other HTML tags
that wont work from inside a Perl CGI program. I have looked through
several FAQ,s but haven't found the answer.
I am testing my programs in Win95 with NN4 and IE4 and the Sambar
server.
Your help would be much appreciated.
Regards
Lawrence Elliott
Bridgend
South Wales UK
E-mail laurie.gw6uba@btinternet.com
Web http://www.btinternet.com/~red.dragon
A member of Visual Basic User Group
http://www.vbug.co.uk
------------------------------
Date: Mon, 13 Jul 1998 11:44:12 +0000
From: John Call <johnc@interactive.ibm.com>
Subject: Re: HTML in Perl
Message-Id: <35A9F300.9E1C76B8@interactive.ibm.com>
> I can't get the BODY BACKGROUND command to work.
Perl does not keep any tag from working. If your background isn't showing
up then your HTML is incorrect. Look at your page source after it is
rendered and see if you can spot the mistake, happens to me all the time.
For your CGI questions you will want to check
comp.infosystems.www.authoring.cgi. They will be much more knowledgeable
about CGI there than we will be here. We're just another perl hacker
group.
--
John Call
IBM Interactive Media
------------------------------
Date: 13 Jul 1998 16:10:12 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <6odbh4$bve$4@info.uah.edu>
Following is a summary of articles from new posters spanning a 7 day
period, beginning at 06 Jul 1998 15:55:51 GMT and ending at
13 Jul 1998 06:48:17 GMT.
Notes
=====
- A line in the body of a post is considered to be original if it
does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
- All text after the last cut line (/^-- $/) in the body is
considered to be the author's signature.
- The scanner prefers the Reply-To: header over the From: header
in determining the "real" e-mail address and name.
- Original Content Rating (OCR) is the ratio of the original content
volume to the total body volume.
- Find the News-Scan distribution on the CPAN!
<URL:http://www.perl.com/CPAN/modules/by-module/News/>
- Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
- Copyright (c) 1998 Greg Bacon. All Rights Reserved.
Verbatim copying and redistribution is permitted without royalty;
alteration is not permitted. Redistribution and/or use for any
commercial purpose is prohibited.
Totals
======
Posters: 266 (45.5% of all posters)
Articles: 382 (22.8% of all articles)
Volume generated: 625.6 kb (21.7% of total volume)
- headers: 269.9 kb (5,209 lines)
- bodies: 338.9 kb (10,346 lines)
- original: 264.2 kb (8,426 lines)
- signatures: 16.4 kb (379 lines)
Original Content Rating: 0.780
Averages
========
Posts per poster: 1.4
median: 1.0 post
mode: 1 post - 201 posters
s: 1.2 posts
Message size: 1677.0 bytes
- header: 723.5 bytes (13.6 lines)
- body: 908.4 bytes (27.1 lines)
- original: 708.2 bytes (22.1 lines)
- signature: 44.1 bytes (1.0 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
10 29.1 ( 7.3/ 17.0/ 11.7) the_wildman_98@hotmail.com
7 11.8 ( 5.0/ 6.8/ 3.9) otis@my-dejanews.com
7 5.5 ( 3.9/ 1.5/ 1.5) "Guillermo Garcis" <ggarces@arrakis.es>
6 8.2 ( 3.6/ 4.6/ 4.5) dwiesel@my-dejanews.com
5 9.3 ( 5.4/ 3.9/ 2.5) Oliver Bandel <oliver@first.in-berlin.de>
5 6.2 ( 3.5/ 2.7/ 1.9) Mark Evan Jones <xmarkjones@mindless.com>
5 6.5 ( 3.2/ 3.3/ 3.0) jevon@my-dejanews.com
5 8.3 ( 3.2/ 5.1/ 3.7) mad_ahmad@my-dejanews.com
5 9.9 ( 3.7/ 6.2/ 4.2) Andrew Perrin <aperrin@mcmahon.qal.berkeley.edu>
4 6.7 ( 3.2/ 3.4/ 2.5) "Joe Junkin" <jjunkin@datacrawler.com>
These posters accounted for 3.5% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
29.1 ( 7.3/ 17.0/ 11.7) 10 the_wildman_98@hotmail.com
11.8 ( 5.0/ 6.8/ 3.9) 7 otis@my-dejanews.com
9.9 ( 3.7/ 6.2/ 4.2) 5 Andrew Perrin <aperrin@mcmahon.qal.berkeley.edu>
9.3 ( 5.4/ 3.9/ 2.5) 5 Oliver Bandel <oliver@first.in-berlin.de>
8.3 ( 3.2/ 5.1/ 3.7) 5 mad_ahmad@my-dejanews.com
8.2 ( 3.6/ 4.6/ 4.5) 6 dwiesel@my-dejanews.com
7.6 ( 0.7/ 6.9/ 6.8) 1 Dieter Faulbaum <faulbaum@alder.bessy.de>
7.3 ( 3.3/ 4.1/ 1.9) 3 "Stephan Roder (infoware GmbH)" <roder@odars.de>
6.7 ( 2.5/ 4.0/ 3.2) 2 uz@musoftware.com
6.7 ( 3.2/ 3.4/ 2.5) 4 "Joe Junkin" <jjunkin@datacrawler.com>
These posters accounted for 3.6% of the total volume.
Top 10 Posters by OCR (minimum of three posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
1.000 ( 1.2 / 1.2) 3 "Edward Villalovoz" <edwardv@jps.net>
1.000 ( 4.4 / 4.4) 3 "Larry P. Rosen" <lrosen@alum.mit.edu>
1.000 ( 0.5 / 0.5) 4 andreas nagl <anagl@netway.at>
0.986 ( 4.5 / 4.6) 6 dwiesel@my-dejanews.com
0.953 ( 1.5 / 1.5) 7 "Guillermo Garcis" <ggarces@arrakis.es>
0.917 ( 3.3 / 3.6) 3 Rik Blok <blok@physics.ubc.ca>
0.895 ( 3.0 / 3.3) 5 jevon@my-dejanews.com
0.895 ( 1.2 / 1.4) 4 Jorge Kinoshita <jkinoshi@pcs.usp.br>
0.836 ( 1.6 / 1.9) 3 geiger@cs.ucdavis.edu (Phillip George Geiger)
0.790 ( 2.4 / 3.0) 3 "Jim Babbington" <jwb79@mail.idt.net>
Bottom 10 Posters by OCR (minimum of three posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.733 ( 3.7 / 5.1) 5 mad_ahmad@my-dejanews.com
0.730 ( 2.5 / 3.4) 4 "Joe Junkin" <jjunkin@datacrawler.com>
0.720 ( 1.9 / 2.7) 5 Mark Evan Jones <xmarkjones@mindless.com>
0.687 ( 11.7 / 17.0) 10 the_wildman_98@hotmail.com
0.676 ( 4.2 / 6.2) 5 Andrew Perrin <aperrin@mcmahon.qal.berkeley.edu>
0.637 ( 2.5 / 3.9) 5 Oliver Bandel <oliver@first.in-berlin.de>
0.576 ( 3.9 / 6.8) 7 otis@my-dejanews.com
0.484 ( 1.0 / 2.1) 3 jmsmith@iminet.com
0.464 ( 1.9 / 4.1) 3 "Stephan Roder (infoware GmbH)" <roder@odars.de>
0.451 ( 1.2 / 2.6) 3 Pat Gunn <pgunn01@ibm.net>
20 posters (7%) had at least three posts.
Top 10 Crossposters
===================
Articles Address
-------- -------
45 Oliver Bandel <oliver@first.in-berlin.de>
27 "Stephan Roder (infoware GmbH)" <roder@odars.de>
18 Chris Huebsch <chu@informatik.tu-chemnitz.de>
18 uz@musoftware.com
9 frederik@remote.org (Frederik Ramm)
9 Ulf Wendel <ulf.wendel@airbrush-zeitung.de>
9 marcus platz <marcus.platz@netcologne.de>
9 mailer-daemon@bof.de (Patrick Schaaf)
9 "Ingo Wolf" <zorro@aix550.informatik.uni-leipzig.de>
9 Mariano Kamp <mkamp@jlogic.com>
------------------------------
Date: 13 Jul 1998 12:06:58 -0400
From: Dan Schmidt <dfan@harmonixmusic.com>
Subject: Parsing Perl
Message-Id: <wkd8b9ka59.fsf_-_@turangalila.harmonixmusic.com>
Tom Christiansen <tchrist@mox.perl.com> writes:
| The day a beautifier can even PARSE all my code will be a miracle.
| I can't possibly expect it to ever do 10% as good a job as I -- or
| any other programmer with aesethetics -- could at make code look
| right. Note that the examples I gave above are *not* amongst the
| things I wouldn't expect it to be able do.
Okay, perhaps this is a stupid question, but I've had it for a while.
It appears that the only program that is sufficiently sophisticated to
parse Perl code is perl itself.
Is it possible to run perl in such a way to do its compilation to
bytecode (and not run the resulting code) and emit some sort of
representation that could be used by a pretty-printer?
By "is it possible" I mean both "is it possible now" (to which I
assume the answer is no) and "how hard would it be to do." Not that
I'm volunteering, I'm just curious.
I apologize if I have used incorrect terminology, or my question is
ill-conceived.
[Please don't send me courtesy mail copies, thanks.]
--
Dan Schmidt -> dfan@harmonixmusic.com, dfan@alum.mit.edu
Honest Bob & the http://www2.thecia.net/users/dfan/
Factory-to-Dealer Incentives -> http://www2.thecia.net/users/dfan/hbob/
Gamelan Galak Tika -> http://web.mit.edu/galak-tika/www/
------------------------------
Date: 13 Jul 1998 16:19:25 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Parsing Perl
Message-Id: <6odc2d$k9d$1@csnews.cs.colorado.edu>
[courtesy cc of this posting denied to cited author per request]
In comp.lang.perl.misc, Dan Schmidt <dfan@harmonixmusic.com> writes:
:Is it possible to run perl in such a way to do its compilation to
:bytecode (and not run the resulting code) and emit some sort of
:representation that could be used by a pretty-printer?
I have this notion that one could do it with some
of Malcolm's intermediary stages.
--tom
--
Unix is like a toll road on which you have to stop every 50 feet to
pay another nickel. But hey! You only feel 5 cents poorer each time.
--Larry Wall in <1992Aug13.192357.15731@netlabs.com>
------------------------------
Date: Mon, 13 Jul 1998 15:55:33 GMT
From: mike@2f3.com
Subject: Perl Database Problem
Message-Id: <6odall$gda$1@nnrp1.dejanews.com>
I'm using Perl5 and an HTML form. The form is supposed to use Perl to
append to a delimited text file that I'm using as a database. It
seems to work fine, returning the correct HTML, but the text file has
nothing written to it. I think it may be the permissions (although I
set them to full control for everyone) but I was wondering if anyone had
any ideas as to why it doesn't work.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 13 Jul 1998 09:38:18 -0500
From: JLEHMANN <JLEHMANN@dsccc.com>
Subject: PERL Tutorial
Message-Id: <35AA1BDA.B2A25E8B@dsccc.com>
Are there any good PERL tutorials on the net? I've read a good portion
of The Java Tutorial, which I think is excellent, and it would be great
if the same thing existed for PERL.
Thanks,
John
------------------------------
Date: Mon, 13 Jul 1998 15:39:36 GMT
From: 2f3@my-dejanews.com
Subject: Re: Perl+MS SQL
Message-Id: <6od9no$f22$1@nnrp1.dejanews.com>
Senya,
Please let me know what the answer is. I'm having problems getting Perl to
write to a plain text file (delimited database) and am not sure why. I think
it may be the permissions, but they seem okay.
Regards,
Mike
In article <6o5om4$ovc$1@news.mplik.ru>,
"Senya Galperin" <gals@dialup.mplik.ru> wrote:
> Hi!
> Please, help: is there any module that gives opportunity to work with
> Microsoft SQL Server (I need to write a program that connects Internet user
> and database)
>
> Thanx!
>
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 13 Jul 1998 15:32:09 GMT
From: tim221175@my-dejanews.com
Subject: Permissions in Perl
Message-Id: <6od99p$eaj$1@nnrp1.dejanews.com>
I am trying to write a Perl script that will allow people to set up their
own email adresses and then check their email from a web browser - hotmail
style. I have problems with the permissions of the mail boxes. The mailboxes
are created by 'mail' and eventhough I have set the owner and group of my
script to 'mail' I can not open the user files since I am not using the
username and passworrd of the particular user. How can this be done using
perl or bash shell?
Many thanx
Tim
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 13 Jul 1998 17:50:50 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Permissions in Perl
Message-Id: <7xogut21id.fsf@fidelio.vcpc.univie.ac.at>
Re: Permissions in Perl, tim221175
<tim221175@my-dejanews.com> said:
tim221175> I am trying to write a Perl script that will
tim221175> allow people to set up their own email adresses
tim221175> and then check their email from a web browser -
tim221175> hotmail style. I have problems with the
Hmmm, be wery wery wery qui^H^H^Hcareful about security.
Read "perldoc perlsec" thoroughly!
tim221175> permissions of the mail boxes. The mailboxes are
tim221175> created by 'mail' and eventhough I have set the
tim221175> owner and group of my script to 'mail' I can not
tim221175> open the user files since I am not using the
tim221175> username and passworrd of the particular
tim221175> user. How can this be done using perl or bash
tim221175> shell?
I think this is to do with your web server's configuration,
i.e. the uid that CGI programs use, it isn't a perl/shell
problem.
[
Personally I wouldn't want to do this except just maybe in a
very very controlled, restricted, captive intranet type
network. Mail reading programs supporting proper
authentication are available, why try to reinvent something
like that in a typically anonymous environment?
]
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | http://www.vcpc.univie.ac.at/
"You see? You see? Your stupid minds! Stupid! Stupid!" ~ Eros, Plan9 fOS.
------------------------------
Date: Mon, 13 Jul 1998 08:57:24 -0700
From: eharley@pacbell.net (Eric Harley)
Subject: Re: Permissions in Perl
Message-Id: <eharley-1307980857250001@ppp-207-214-149-3.snrf01.pacbell.net>
> I am trying to write a Perl script that will allow people to set up their
> own email adresses and then check their email from a web browser - hotmail
> style. I have problems with the permissions of the mail boxes. The mailboxes
> are created by 'mail' and eventhough I have set the owner and group of my
> script to 'mail' I can not open the user files since I am not using the
> username and passworrd of the particular user. How can this be done using
> perl or bash shell?
What are the permissions on the Perl executable? What are the permissions
on the mailbox? Are they group readable and writable?
Make sure that the perl executable is in the same group as the mailbox
group. Remember that a user can be in many different groups so don't
change the group on the perl executable. Just add the user that the perl
executable is associated with to the /etc/group file.
Just Another Perl Hacker
------------------------------
Date: Mon, 13 Jul 1998 10:23:39 -0500
From: "Usuario Sala4" <sala4@nevado.cui.edu.co>
Subject: prueba de news
Message-Id: <6oc5rk$7v1@ibague.cetcol.net.co>
------------------------------
Date: Mon, 13 Jul 1998 16:41:42 GMT
From: Buzz Moschetti <buzz@bear.com>
Subject: Re: Returning a list from a XS
Message-Id: <35AA38C7.7CC6@bear.com>
Charles DeRykus wrote:
>
> In article <35A654A0.9D6AE58@csmonitor.com>,
> James Turner <james@csmonitor.com> wrote:
> >I'm trying to return a list of values from an XS, but even after reading
> >perlguts, I'm having trouble getting it to work right.
> >
> >Here's the pertinent sub:
> >AV *
> >avs_version()
> > PREINIT:
> > AV *arr;
> > CODE:
> > arr = newAV();
> > av_push(arr, newSVpv("This is a test", 0));
> > av_push(arr, newSVpv("This is a another test", 0));
> > RETVAL = (AV *) arr;
> > OUTPUT:
> > RETVAL
> >
> >Here's the test function:
> >@version = avs_version();
> >print "$version[0][0]\n";
> >print "$version[0][1]\n";
Don't underestimate the value of returning a real list, not an arrayref:
void
avs_version()
PPCODE:
{
XPUSHs(sv_2mortal(newSVpv("This is a test", 0)));
XPUSHs(sv_2mortal(newSVpv("This is a another test", 0)));
}
Are there any guidelines covering lists vs. arrayrefs? I tend to
favor lists because they work "effortlessly" with the builtin perl
functions we have all come to know and love.
------------------------------
Date: Mon, 13 Jul 1998 07:53:49 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: s: simple-database
Message-Id: <MPG.1013bf5952246305989735@nntp.hpl.hp.com>
In article <35AA0942.E15CF81D@nortel.co.uk> on Mon, 13 Jul 1998 14:18:58
+0100, F.Quednau <quednauf@nortel.co.uk> says...
> Adam Kopacz wrote:
> >
> > i have a little problem with your script.
> > it works for "test" and "te st" but not for strings like:
> > "test [123];(7)" anf i need this because browsers are often using
> > something :( => "Mozilla/4.05 [en] (X11; I; Linux 2.0.34 i586)"
> > i think the porblem is here:
> >
> > > /$word/io && last BLOCK; #word exists->get out
>
> Sorry, I forgot the frikkin' metacharacters like [] and similar.
> Modify that line to this:
>
> /\Q$word\E/io && last BLOCK; #word exists->get out
Actually, you forgot about a lot more, like discovering that the word
'test' appears in the list if the word 'contestant' exists. If you fix
that by adding the anchors ^ and $ you end up with a cumbersome and
slow way of testing for literal string equality (dropping the undesired
case insensitivity).
Regexes have their place, but the operator you want here is 'eq'.
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 13 Jul 1998 16:26:17 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: s: simple-database
Message-Id: <35AA2719.A8AE67A2@nortel.co.uk>
Larry Rosler wrote:
>
I wrote:
> > Sorry, I forgot the frikkin' metacharacters like [] and similar.
> > Modify that line to this:
> >
> > /\Q$word\E/io && last BLOCK; #word exists->get out
>
> Actually, you forgot about a lot more, like discovering that the word
> 'test' appears in the list if the word 'contestant' exists.
Hmmm, yes...'tis probably not too bad if the script is used for keeping
track
of different browsers. If you use eq, then you would have to use split
to get rid of the number...let's see...
while (<FILE>) {
chomp;
last BLOCK if @{[split /\t/]}[1] eq $word;
$recall = tell(FILE);
}
>
> Regexes have their place, but the operator you want here is 'eq'.
>
But I like 'em :)
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Mon, 13 Jul 1998 17:47:10 +0200
From: Adam Kopacz <Adam.K@idnet.de>
Subject: Re: s: simple-database
Message-Id: <u5ado6.rs1.ln@news.kLo.de>
Larry Rosler <lr@hpl.hp.com> wrote:
Hi Larry,
> In article <35AA0942.E15CF81D@nortel.co.uk> on Mon, 13 Jul 1998 14:18:58
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
i never recieved this article :((
>> Sorry, I forgot the frikkin' metacharacters like [] and similar.
>> Modify that line to this:
>> /\Q$word\E/io && last BLOCK; #word exists->get out
this works. thanx again :)
> 'test' appears in the list if the word 'contestant' exists. If you fix
> that by adding the anchors ^ and $ you end up with a cumbersome and
were should i add the ^$ ? at the moment i use:
/\Q$word\E/ && last BLOCK;
case-sensitive is not need i think.
> Regexes have their place, but the operator you want here is 'eq'.
eq? how i use this ?
the perl5 manual pages aren't the best :(
--
Adam Kopacz - http://www.idnet.de/~AdamK - ICQ# 257499
------------------------------
Date: Mon, 13 Jul 1998 18:37:13 +0200
From: Adam Kopacz <Adam.K@idnet.de>
Subject: Re: s: simple-database
Message-Id: <p3ddo6.762.ln@news.kLo.de>
F.Quednau <quednauf@nortel.co.uk> wrote:
Hi F.Quednau,
> while (<FILE>) {
> chomp;
> last BLOCK if @{[split /\t/]}[1] eq $word;
> $recall = tell(FILE);
> }
thanx again :)
works and now no browser like "Mozilla" only will be added to my first
"Mozilla/xyz" string :)
--
Adam Kopacz - http://www.idnet.de/~AdamK - ICQ# 257499
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 3140
**************************************