[8633] in Perl-Users-Digest
Perl-Users Digest, Issue: 2250 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 4 17:07:24 1998
Date: Sat, 4 Apr 98 14:00:28 -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 Sat, 4 Apr 1998 Volume: 8 Number: 2250
Today's topics:
Blocking Reads andrew@ugh.net.au
Re: CGI: Sending an image (Amy Williams)
Re: Cross platform 'distributed' perl? (Jonathan Stowe)
Re: Dummy question (Jonathan Stowe)
file locking in perl <smubit1@gl.umbc.edu>
Re: File::Find Module on NT (Jonathan Stowe)
Getting the PATH Correct to Run Perl Programs in a Wind <GartenGroup@worldnet.att.net>
Hangman <star@sonic.net>
Re: Help mailing in Perl (Jonathan Stowe)
Re: HELP, my PERL program isn't running... (Jonathan Stowe)
Re: Is there a "Newsgroup" for Newbies to Perl? (Jeffrey Drumm)
Re: Is there a "Newsgroup" for Newbies to Perl? (Chris Vogel)
Re: Is there a "Newsgroup" for Newbies to Perl? <eugene@vertical.net>
Re: Is there a "Newsgroup" for Newbies to Perl? smitty77@pacbell.net
Re: Newbie needs NT Help (Jonathan Stowe)
Re: Odd or even function (Jonathan Stowe)
perl and CGI <gransoe@get1+1net.dk>
Re: Perl BNF/Perl parser (Todd Lehman)
Re: perl/shopping cart <birgitt@order.booktraders.com>
Re: reading file permissions (Jeffrey Drumm)
Re: reading file permissions (Jonathan Stowe)
Re: Redirect on particular Browser Functions scripts? (Jonathan Stowe)
Re: Running a CGISite! <eugene@vertical.net>
Re: Running a CGISite! djhoward@uiuc.edu
Re: structs <bruce2@home.com>
TV Recommender hudson@viconet.com
Re: Urgent: Perl Win32 vs Unix Perl (Jonathan Stowe)
Re: use e-mail in perl script in NT (Jonathan Stowe)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 5 Apr 1998 04:25:21 +1000
From: andrew@ugh.net.au
Subject: Blocking Reads
Message-Id: <Pine.BSF.3.96.980405041658.20637H-100000@house.key.net.au>
Hi,
I am trying to write function to perform a blocking read. I couldn't seem
to find one about but if anyone knows where one is I'll just use that :-)
Anyway my code dosn't seem to work...
(1) has_error always returns true but I cant see why. Is there anyway to
find what the error is? I tested for eof and it wasnt that.
(2) can_read dosnt block, it always claims there is more data to be read
even when there isnt (and the read reads 0 bytes).
I have been fiddling with the code to try to try and get it to work so
more errors may have crept in.
Any help would be greatly appreciated.
Thanks,
Andrew
BTW I am using perl 5.004_04
use IO::Select;
use IO::File;
use strict;
$main::handle = new IO::File 'test.data';
if (!(defined($main::handle))) {
die $!;
}
&bread($main::handle,4);
$main::handle->close;
sub bread (\$\$) {
my($handle,$bytes) = @_;
my($bytesRead,$buffer,@selectedHandles) = (0);
my($selectObject) = new IO::Select($handle);
if ($selectObject->has_error(0)) {
return undef;
}
while (1) {
# Block till I can read
@selectedHandles = $selectObject->can_read;
$bytesRead += $handle->read($buffer, ($bytes - $bytesRead),
$bytesRead);
if ($bytesRead == $bytes) {
return $buffer;
}
}
}
------------------------------
Date: Sat, 04 Apr 1998 15:37:12 GMT
From: epic@aros.net (Amy Williams)
Subject: Re: CGI: Sending an image
Message-Id: <352652b9.1266493@news.aros.net>
On Fri, 3 Apr 1998 19:48:06 +0200, pvr@xs4all.nl (Pascal van Rossum)
wrote:
>I am trying to run a cgi script by calling it as an IMG SRC,
>this is because I cannot run it by using a SSI.
>
>However, Netscape 3.x users see the javascript document.write
>that I use to write the IMG SRC tag to the screen.
Maybe you should try doing it without the Javascript writing the <IMG>
tag. If you do that then
print "Location: <URL to 1x1 transparent gif>\n\n"
should work just fine. I've done it many times. The javascript must
be conflicting with the script call somehow.
--
Amy Williams | Amy Williams Web Page Design
epic@aros.net | and CGI Scripting
http://www.aros.net/~epic/ | http://www.aros.net/~epic/html.html
------------------------------
Date: Sat, 04 Apr 1998 10:56:45 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Cross platform 'distributed' perl?
Message-Id: <3525d517.23826025@news.btinternet.com>
On 2 Apr 1998 18:43:06 -0600, les@MCS.COM (Leslie Mikesell) wrote:
>Has anyone done a generic remote interface where a program on one
>host can hand a more or less arbitrary chunk of perl code to
>a server on another host and get back results from an 'eval'?
<snip>
Whilst it is not necessarily what you want the Novell Intranetware
implementation of perl does a similar thing. They call it RCGI
(Remote CGI). This has been described (and probably by me at some
stage) as an awful security hole.
Alternatively it would not be too difficult to create a server in perl
that listened on a socket and then eval'd anything that it received ,
passing back its results to the client - of course this return would
only be a stream of data that would need to be interpreted by the
client process rather than a perl data item per se (although the
client could itself eval this data). I would suggest that this also
would contain a[n] (small|enormous) element of security risk on a
public network.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Sat, 04 Apr 1998 10:56:36 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Dummy question
Message-Id: <35259fc0.10259330@news.btinternet.com>
On Sat, 4 Apr 1998 03:21:01 GMT, genepool@netcom.com (Jim Michael)
wrote:
>Perhaps redirect the error messages to a file so you can read them with
>your morning coffee:
>
>
Unfortunately the command interpreter that Win95 ships with is
hopelessly shagged up with respect to output redirection (and most
other thing as well but I'll leave that aside for now). You might
consider getting the Cygnus port of the GNU shell bash which behaves
as much like a unix shell as is possible in a microsoft environment.
With a shell like this you can separately redirect STDERR and STDOUT
something like this:
perl mybadscript.pl myarg1 myargetc 2> mybreakfeastreading.txt
So you dont get any good output (if any) mixed up with your error
messages.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Sat, 4 Apr 1998 14:44:22 -0500
From: Stephen Mubita <smubit1@gl.umbc.edu>
Subject: file locking in perl
Message-Id: <Pine.SGI.3.96.980404143821.4125C-100000@jig.gl.umbc.edu>
I would like a mandatory lock on a file (the passwd file), that allows
reading but not writing.
After successfully opening the file for appending I tried
flock PASSWD_FILE, $LOCK_EX;
it seemed to succeed, but I could write to the same file outside the
program.
I also tried
Use Fcntl;
$retval = fcntl(PASSWD_FILE, F_SETLK, F_RDLCK) or $retval = -1;
but $ret_val is always -1 afterwards, and I can still write to the file.
I looked in the FAQ, but it said to use flock.
Does anyone have any suggestions ?
Stephen Mubita smubit1@umbc.edu
======================================================================
'God opposes the proud, but gives grace to the humble.'
James 3 : 6b
----------------------------------------------------------------------
| UCS is not responsible for any opinions contained here |
====================******************************====================
------------------------------
Date: Sat, 04 Apr 1998 10:56:47 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: File::Find Module on NT
Message-Id: <3525dc10.25611307@news.btinternet.com>
On Thu, 02 Apr 1998 18:02:17 -0600, sadri@macsch.com wrote:
>Hi Folks, I am using File::Find Module which I copied from the perl site to
>traverse the directory and check for files more than 5 days old and delete
>empty directories. Now, the code works great as long as I use a regular
>directory path such as : c:\temp\test. However, I am runing to a problem when
>I use network path names such as: \\machiname\c$\temp\test.
>
<etc>
You dont need to use \ and thus escape it in perl.
//server/resource/rest_of_path works for me.
You might look at the module Win32::NetResource for some guidance
here.
Actually I was thinking of using File::Find in a similar manner in
something I was going to start on Monday so when I get it going I'll
get back to you.
Alternatively you get a Linux system with Samba together, mount the NT
Share on a Linux directory and way-to-go lassie it works every time.
But that of course has nothing to do with perl.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: 4 Apr 1998 21:50:43 GMT
From: "Sam Garten" <GartenGroup@worldnet.att.net>
Subject: Getting the PATH Correct to Run Perl Programs in a Windows 95 Environment...
Message-Id: <6g69vj$3q3@bgtnsc02.worldnet.att.net>
4/4/98
Friends - finally downloaded a copy of Perl that I can run in a Windows 95
environment...
Having problems specifying the correct path to run my Perl
programs created in
Notepad... How do you specify the correct PATH that identifies
my source code (program)
and also the Perl interpreter so the job will run???
I've been in computing for over 20 years and never had such a
difficult time. (I started with
the IBM 1410, then the series of mainframes starting with the
IBM 360 series. Learning
Basic Assembler lang and JCL was never as difficult as
specifying this darn path correctly...)
Please someone help me. It seems the majority of Perl coder
are operating in a Unix
environment is this true???
Thanks..
Sam Garten Cary, NC
------------------------------
Date: Sat, 04 Apr 1998 11:44:57 -0800
From: ~arthur <star@sonic.net>
Subject: Hangman
Message-Id: <35268DB5.1FDA@sonic.net>
Good day--
I am trying to find (or write) a hangman program. Not a cgi - just a
perl hangman program. Can anyone help me. I am bringing it to a juvenile
detention hall where there is no access to the web but they have
computers in school.
Much obliged!
~Arthur Jacobs
star@sonic.net
------------------------------
Date: Sat, 04 Apr 1998 10:56:43 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Help mailing in Perl
Message-Id: <3525af47.14146373@news.btinternet.com>
On 3 Apr 1998 09:14:03 GMT, "Pat Bloomfield" <patb@mround.bt.co.uk>
wrote:
<snip>
>I'm currently using mail as:
>result = ( open( MAIL, "/bin/echo $msg | /usr/ucb/mail -s $subject
>$dst_addr |" ) ) ? 1 : 0;
>
>However, mail doesn't have a facility to allow the from source address to
>be set, at least I couldn't find it. So we're trying a similar thing using
>sendmail, it works from a prompt:
>
>unix%/usr/5bin/echo $msg | /usr/lib/sendmail -f $src_addr $dst_addr
>
>but doesn't work from within Perl:
>
You almost certainly want to be using the most excellent Mail::*
modules available from CPAN they will allow you to set a Reply-To
address. se perlfaq9 for an example of their use.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Sat, 04 Apr 1998 10:56:38 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: HELP, my PERL program isn't running...
Message-Id: <3525ab83.13221271@news.btinternet.com>
On Fri, 3 Apr 1998 14:53:47 -0800, "Mike Glenn" <mglenn@zbzoom.net>
wrote:
[followup set]
>This is a multi-part message in MIME format.
>
>------=_NextPart_000_0070_01BD5F10.4E5BDAC0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: quoted-printable
>
Uh Oh.
>The second will only work if first.pl is in your cgi-bin directory with =
>the proper permissions. As to the first line you refered to and the way =
<snipped good but off topic information> .
>
>Also you will most likely get flamed by a bunch of (*** adjectives =
<snipped inflamatory rant>
Thats not really very polite is it.
>
>------=_NextPart_000_0070_01BD5F10.4E5BDAC0
>Content-Type: text/html;
> charset="iso-8859-1"
>Content-Transfer-Encoding: quoted-printable
>
><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
Is this actually correct ? I thought the FACE attribute was not yet
sanctioned. (see below). Of course I may have got the wrong end of
some stick here.
><HTML>
><HEAD>
>
<snipped whole thing repeated with HTML>
><DIV><FONT size=3D2><FONT color=3D#000000 face=3DArial=20
>size=3D2></FONT></FONT> <FONT color=3D#000000 =
>face=3D"Comic Sans MS"=20
Unfortunately your no doubt ironically intended use of the "Comic Sans
MS" font would not only be lost on the majority of newsgroup readers
who do not have MIME support but also to anyone who did have MIME but
was not on a platform that used Truetype fonts etc etc <mumble mumble>
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Sat, 04 Apr 1998 19:08:29 GMT
From: drummj@mail.mmc.org (Jeffrey Drumm)
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <352675c4.228734450@news.mmc.org>
On 4 Apr 1998 11:54:26 -0500, mjd@op.net (Mark-Jason Dominus) wrote:
>In article <352426cb.77422537@news.mmc.org>,
>Jeffrey Drumm <drummj@mail.mmc.org> wrote:
>>On 2 Apr 1998 08:37:16 -0800, smitty77@pacbell.net wrote:
>>all the gurus will have fled to the
>>moderated group currently under discussion. I'll follow them, because I
>>want to learn. The newbies won't, because moderation won't let them.
>
>It was never the intent of the moderated group to exclude new users,
>or questions from new users.
>
>It's only the intent to exclude questions like `how do I remove a
>file' which are trivially answered by looking in the documentation, or
>questions which are FAQs, or questions which are essentially unrelated
>to Perl.
>
>The moderated group is not about setting up a hierarchy of who's
>allowed to speak and who isn't. Nor is it about making a private club
>for experts only.
True, moderation won't exclude them, but its intent is to proscribe the
behaviors that have made c.l.p.m. so unpleasant lately. As such, it _will_
make their lives harder, at least from the perspective of being able to get
unearned answers. That will certainly have a deleterious effect on the
newbie population in c.l.p.moderated, and that was the thrust of my
statement.
I realize there are 'good newbies' and 'bad newbies'. It was the latter
group that was the focus of my statements . . .
--
Jeffrey R. Drumm, Systems Integration Specialist
Maine Medical Center Information Services
420 Cumberland Ave, Portland, ME 04101
drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented." -me
------------------------------
Date: Sat, 04 Apr 1998 13:29:00 +0100
From: C.VOGEL@LINK-GOE.de (Chris Vogel)
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <6rCnkwd2tSB@-sweet.link-goe.de>
Goettingen, Stardate 0952.68
Hi there,
genepool (Jim Michael) wrote in genepoolEqtH5H.150@netcom.com on
04.04.98 following lines, starting with '*'
* Did you really miss the point?
Please understand that we are exactly on the same side ;-).
* In a university setting you are expected to do your own research.
Right. The only thing I say is that there are some people who love to
work on their own and some others who need to be in a group to discuss
their experiences and the questions related to the research object.
The needs for the people who love to work on their own are pretty good
filled: They can work through books, search the net and finally - when
stuck on a problem - ask a question here.
But those people who love to learn and research in a team/group, have
practically no central place to look for others to work with and to
exchange with these people.
My idea was to put up some mailinglists with a limited number of users
per list. Each list is a group of people talking about their
experiences while learning perl. If some problem on a list is
discussed and researched (in the FAQ and on the net) without a outcome
the question might be forwarded to clpm - to the professor ;-).
Chris.
--
Mein Name ist Don Juan und ich bin der groesste Sysop aller Zeiten.
Ich habe schon ueber 150 BenutzerInnen gluecklich gemacht...
------------------------------
Date: Sat, 04 Apr 1998 15:21:16 -0500
From: Eugene Sotirescu <eugene@vertical.net>
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <35269639.38DCB4DA@vertical.net>
Having read most of the posts in this endless thread
and
having received quite a few RTFMs myself when I started posting here and
having been shamed into reading the docs closely
and
having transcended newbiness into the Great Grey Intermediate
and
having developed a debilitating fondness for Perl (my company is
switching to ASP)
and
having lurked daily on this newsgroup and sometimes posted replies
and
having pondered the cultural strife that occassionlly spikes in this
newsgroup and is now channeled in this thread
I have this to say:
1.There is no replacement for study.
2.Read the FAQ: it is good.
2a.Things like 'perldoc perlsec' and then '/taint ' are also good.
3.Be PATIENT.
4.Make your own FAQ (browse the group, read discussions with topics that
interest you, find replies, paste them into a document you keep on your
HD; see 1.).
5.Use leads to abuse: always. Newbies abuse the group, oldies abuse the
newbies. Ignore this. Be a user. When a TC flames you, ignore it and
look for the useful part of the reply. (Oldies, see 3.)
6.There is no replacement for study: you will not know what you haven't
studied (though you might be able to use it).
7.Be patient: Perl will make it up to you.
Eugene
------------------------------
Date: 4 Apr 1998 12:46:10 -0800
From: smitty77@pacbell.net
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <6g666i$jcn@co-op.newsguy.com>
In article <3525DF82.D5BB6DD4@coos.dartmouth.edu>, Ronald says...
>
>smitty77@pacbell.net wrote:
>>
>> For the average novice, who may be asking for the first time or simply might
>>need and expect more than "go look it up in the FAQ", I offer this. If someone
>>came up to me at work and asked a question which I knew could easily be answered
>>in a book that was sitting on a shelf, I wouldn't tell that person "your answer
>> is in that book over there" and then go back to what I was doing. I would
>>probably go get the book, find the place in the book where the information was
>> and point it out to them, perhaps even going so far as to explain the answer
>> over and above what the book said. That way, I've not only told them that a
>> book existed that might help them, but I showed them where the book was and
>>showed them where in the book the answer was. Common courtesy. I don't think
>>that's too much to ask. Especially in here, since you can simply not respond at
>> all if you don't want to be bothered with these nuisance posts.
>
>On the other hand:
>
>1) At work, you don't get 20 to 30 people coming up to you every single day to
>ask the same questions over and over again.
No one is coming up to YOU specifically.
>2) You can spend 15-30 minutes looking up the answer for your coworker, then
>explaining it to him or her. That doesn't carry over to Usenet.
Why not? No one is twisting your arm to spend any time at all answering any
questions. If you choose to spend the time to answer, then answer. If you
choose not to, then don't. Simple. If you know an answer is in the FAQ, you
might as well tell the person where the FAQ is and which section the answer is
in. How long will that take you?
>3) The posts are not bothersome because we respond to them. They're
>bothersome because they were posted. Not responding to them does not make
>them any less of a nuisance.
I don't understand that at all. How can something be a nuisance if you ignore
it? So I assume you're all for another newsgroup for these nuisances to go tom,
right?
Dave
>--
> _ / ' _ / - aka - rjk@coos.dartmouth.edu
>( /)//)//)(//)/( Ronald J. Kimball chipmunk@m-net.arbornet.org
> / http://www.ziplink.net/~rjk/
> "It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sat, 04 Apr 1998 10:56:33 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Newbie needs NT Help
Message-Id: <35259b9c.9281501@news.btinternet.com>
On Sat, 04 Apr 1998 04:03:50 GMT, Edward Lowery
<telowery@bellsouth.net> wrote:
>I've written Perl script for Unix and I need to run it from NT. I've
>downloaded the
>ActiveState Perl32 program and installed it, but can't get my webbrowser
>to do anything.
Dont you just hate those petulant webbrowsen?
>Any ideas? I'm doing this on WIN 95. I'm also trying this on IIS.
This is almost certainly nothing to do with perl itself. I would
assume that you need to find out how to get your server to run your
script - this is addressed in the IIS documentation. If you have
index server installed you could search for "associate".
A more appropriate group for this sort of question is
comp.infosystems.www.servers.ms-windows but i would also venture that
this is a FAQ in that group and may or may not be met with a
favourable response depending on the history there.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Sat, 04 Apr 1998 10:56:49 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Odd or even function
Message-Id: <3525e001.26619840@news.btinternet.com>
On Thu, 2 Apr 1998 14:23:14 -0800, "Aaron Harsh" <ajh@rtk.com> wrote:
<snip>
>
>Maybe someone could add a section to the FAQ to discourage graphic
>designers, power users, Information Systems types, or anyone else that's
>only interested in solutions, from learning Perl :-)
>
Hey, if these people were trying to use perl where I work the help
desk system could end up looking like this newsgroup does some days
(except perhaps the answers might be a little less civil) ;-}
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Sat, 4 Apr 1998 21:55:17 +0200
From: "=?iso-8859-1?Q?Per_Grans=F8e?=" <gransoe@get1+1net.dk>
Subject: perl and CGI
Message-Id: <6g638n$5rn$1@dalen.get2net.dk>
Hi everybody
I need some info on how to pipe data from a html-page via forms to a =
perl script.
Enviroment variables and standard input and so on...
Can somebody for example send me a sample of a script and a html-code =
simply showing how to add two numbers (from <INPUT>-tags) and print the =
result on a new page.
Please post your answers by email as well posting to: gransoe@get2net . =
dk
Hope to hear from you sooooon,
Per.
------------------------------
Date: Sat, 04 Apr 1998 18:49:20 GMT
From: lehman@visi.com (Todd Lehman)
Subject: Re: Perl BNF/Perl parser
Message-Id: <QgvV.222$Nr1.236663@ptah.visi.com>
Lasse =?ISO-8859-1?Q?Hiller=F8e?= Petersen <lassehp@imv.aau.dk> writes:
> [...]
> I think it is an interesting property of Perl that it only has one
> implementation, which is authoritative. At one point in time, I think
> Eiffel may have been similar, but with several companies producing Eiffel
> compilers, the ISE compiler is no longer special. Of course, Eiffel relies
> heavily on formal definitions of the language. A more interesting Perl
> project than writing a BNF for it would be to write a formal semantic
> definition, I suppose! :-)
>
> I have though about the advantages and disadvantages from having only a
> single implementation, and I think it is actually a good thing. In the
> past the world has seen various C implementations for example, that were
> incompatible in many ways (and GCC is still a superset of both ANSI C and
> C++, right?) so having a language that is the same everywhere is
> wonderful. It will probably never become an international standard under
> ISO (how would the specification be written, except as a transscript of
> the source code?) but then that matters little. Having an ANSI and ISO
> standard for C hasn't helped much in preventing problems, if I'm not
> mistaken.
> [...]
I think it's wonderful that Perl hasn't been poisoned by Bill Labs. I think
I'll go slit my throat if MS ever releases something called Microsoft Perl,
although if they were to release something in which the core language was
not modified and they gave away something analagous to MFC, I could probably
live with that.
Is it known why MS hasn't done this yet? Do they not consider Perl a real
programming language? A good Visual Perl with IDE would certainly sell lots
of copies, and even more if it didn't suck. Or does their corporate ego not
let them sell software they'd have to include major portions of source for?
--Todd
------------------------------
Date: Sat, 04 Apr 1998 16:09:39 -0500
From: Birgitt Funk <birgitt@order.booktraders.com>
Subject: Re: perl/shopping cart
Message-Id: <3526A193.1C5AD98E@order.booktraders.com>
tiles@pyramidtile.com wrote:
>
> Does any body know of a person or persons that give training for Perl/web and
> shopping cart instructions over the phone or email?
> I would like to learn how to set up my own shopping cart on my web site.
> I know how to make web pages and just learned to telnet to my shell server.
> But would like to learn how to customize my web pages so that browsers could
> order my selection of tools.
>
> I just don't wan't to travel to places and spend ton's of money to lean how to
> set up a shopping cart.
> Is there an economical way of doing this?
> Thanks
> Bill
Look at http://www.minivend.com, a free shopping cart system under GNU
Public License,
written in perl. It comes with mailing list, FAQs, DOCs and a lot of
ISPs frequenting
the mailing list in search of customers. If you are persistent, you can
go pretty far
on your own.
Birgitt Funk
------------------------------
Date: Sat, 04 Apr 1998 19:08:30 GMT
From: drummj@mail.mmc.org (Jeffrey Drumm)
Subject: Re: reading file permissions
Message-Id: <35277f7b.231221526@news.mmc.org>
On Sat, 04 Apr 1998 12:31:30 GMT, Sneaker's Nest <sneaker@mediaone.net>
wrote:
>[Mailed & Posted...]
>
>David Shirley wrote:
>>
>> Newbie question here:
>>
>> How does one go about reading the existing permissions on a file? I can
>> figure out how to change them but I'm looking for a simple way to determine
>> what they currently are for owner, group and world.
>
>my $file_sec = (split(/\ /, (`ls -l /etc/shadow`)))[0];
>
In what ways does this improve on the built in stat function? Inquiring
minds, etc . . .
--
Jeffrey R. Drumm, Systems Integration Specialist
Maine Medical Center Information Services
420 Cumberland Ave, Portland, ME 04101
drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented." -me
------------------------------
Date: Sat, 04 Apr 1998 10:56:31 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: reading file permissions
Message-Id: <35259471.7615735@news.btinternet.com>
On Fri, 03 Apr 1998 23:02:04 -0800, david@dpeinc.com (David Shirley)
wrote:
>Newbie question here:
>
Cheater - you didnt put "Newbie" in your subject line ;-}
>How does one go about reading the existing permissions on a file? I can
>figure out how to change them but I'm looking for a simple way to determine
>what they currently are for owner, group and world.
>
As you lured me in that like that what the hell:
The function you are looking for is stat - you can read about it in
the perlfunc manpage. Once you have the value for the files mode you
can check whether individual bits are set with something like:
if ( 0400 && $mode)
{
print "readable by owner\n";
}
You could alternatively use sprintf to get the string representation
of the octal value if you wanted to check for a particular set of
permissions. How you might do that is left is as an exercise.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Sat, 04 Apr 1998 10:56:51 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Redirect on particular Browser Functions scripts?
Message-Id: <352602b2.35104270@news.btinternet.com>
On Fri, 03 Apr 1998 15:37:01 GMT, rcwilk@dreamgate.com_Remove_to_mail
wrote:
>Hi,
>
> I'm looking for the latest (last six months) in redirection scripts.
>
> I'd especially like one that took the versions of the browsers into
>account and grouped them by ability rather than type
> I'm fine with IE 4 and Netscape 4 going to the same place,
>but not Netscape 4 and netsacpe 2.
>
I would browse on over to www.anybrowser.org where they have a
reasonably comprehensive survey of browser capabilities. Once you
have a list of the user agent identifiers the rest is, as they say
around here (geographically I mean), a peess of peess.
The document perlfaq9 has a brief answer related to this.
If you have any further questions about redirection you might want to
go to comp.infosystems.www.authoring.cgi to see if they can point you
to a more appropriate FAQ document.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Sat, 04 Apr 1998 14:47:37 -0500
From: Eugene Sotirescu <eugene@vertical.net>
Subject: Re: Running a CGISite!
Message-Id: <35268E57.B257C0FC@vertical.net>
Oh, c'mon Tom . . .
Did people live in caves before Perl 5?
Has cgi-lib.pl fallen off the face of the earth?
Bloated metaphor and other possiblities aside, CGI.pm is great: it is
probably one of the best documented modules, and once I started using it I
wouldn't go back to anything else.
Eugene
Tom Phoenix wrote:
> On Sat, 4 Apr 1998, TheTool wrote:
>
> > How difficult is it to retrieve information from a
> > FORM in an HTML file without Using CGI.PM?
>
> This is like asking, "How difficult is it to build a house without using
> tools?" But, more importantly, why would you want to avoid using CGI.pm?
>
> --
> Tom Phoenix Perl Training and Hacking Esperanto
> Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 4 Apr 1998 20:45:20 GMT
From: djhoward@uiuc.edu
Subject: Re: Running a CGISite!
Message-Id: <6g6650$4uq$2@vixen.cso.uiuc.edu>
Tom Phoenix <rootbeer@teleport.com> wrote:
> On Sat, 4 Apr 1998, TheTool wrote:
>> How difficult is it to retrieve information from a
>> FORM in an HTML file without Using CGI.PM?
> This is like asking, "How difficult is it to build a house without using
> tools?" But, more importantly, why would you want to avoid using CGI.pm?
Coa your web server's running on a '486?
CGI.pm is dog-ass slow, and does a whole hell of a heck of a lot more than
_I_ generally need.
Suggestion: copy the option-parsing routines from O'Reilley's mouse book.
That's what I do. Instead of CGI.pm I just include a little
perl4-compatable subroutine ...
--
// dannyman yori aiokomete || Our Honored Symbol deserves
\\/ http://www.dannyland.org/~dannyman/ || an Honorable Retirement (UIUC)
------------------------------
Date: Sat, 04 Apr 1998 12:11:57 -0600
From: Bruce McCrea <bruce2@home.com>
Subject: Re: structs
Message-Id: <352677ED.1B116BFF@home.com>
Brian wrote:
> How does one represent structs in perl?
> I heard there's some way to do it.
>
> -Brian
Structs the easy way,
use Class::Struct;
# This module export a function into the main namespace called 'struct'
which lets you
#define the structures. When a structure is defined this way it creates
an object with # methods to access and assign values to the elements in
the struct. Elements can be
# scalars, arrays, hashes, or objects.
struct( Address => { line1 => '$', line2 => '$', city => '$', state =>
'$', zip => '$' });
struct ( Person => { name => '$', address => 'Address', phone => '$' });
$joe = new Person;
$joe->name('Joe');
$joe->address->line1('123 Main St');
#Now the structures are assigned, they may be printed.
print ('Name: ', $joe->name; , "\n");
Lots, of Luck
Bruce
------------------------------
Date: Sat, 04 Apr 1998 14:12:30 -0600
From: hudson@viconet.com
Subject: TV Recommender
Message-Id: <6g647d$h6f$1@nnrp1.dejanews.com>
Try me site: http://njcmr.njit.edu/elizabeth/welcome.html. It a system
written in PERL that attempts to generate personalized TV recommendation
using collaborative filtering. Thanks everyone who used it in a past.There
are new features now: you can add programs of your choice, display your
profile, etc. If you have any suggestions, please let me know. Thanks,
Elizabeth
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Sat, 04 Apr 1998 10:56:29 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Urgent: Perl Win32 vs Unix Perl
Message-Id: <352580b0.4852733@news.btinternet.com>
On Sat, 04 Apr 1998 08:30:04 GMT, probe@hotmail.com (J. Probert)
wrote:
>Hello all,
>
>I have a situation in which I need to make a decision urgently, and
>any guidance will be much appreciated.
>
You might find that USENET is not necessarily the forum for getting a
response to anything *urgent*.
>I am setting up a commercial website using Frontpage extensions, and
>Perl for the cgi's. Everything is set up and running beautifully on my
>personal Win95 pc, with Perl for Win32 and Isapi installed. My version
>is
>version 5.003_07, build 313.
>
<etc>
Your ISP's concerns may have some substance as regard using ISAPI perl
because if a script should happen to tickle some fatal bug (although I
have no knowledge of whether any infact exist) in the ISAPI dll it
will (because it runs as part of the IIS process) bring down the whole
HTTP server. You might be better off getting the 5.004.02 standard
distribution anyhow.
There is no compatibility issue per se between Frontpage extensions
and perl CGI as far as I know.
I could digress into various stuff about FrontPage and security and
running the FP extensions with Unix servers but this would take us
well wide of topic for comp.lang.perl.misc - stuff that is probably
better addressed in a comp.infosystems.www.* group.
>http://www.sabtin.co.za
>
>Justin Probert [South Africa]
Out of interest why is South Africa's TLD "za" ? (Probably a FAQ for
another NG - but in my recollection this is the first time I have seen
it here.)
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Sat, 04 Apr 1998 10:56:41 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: use e-mail in perl script in NT
Message-Id: <3525abf5.13334746@news.btinternet.com>
On 3 Apr 98 12:07:13 MDT, slnlz@cc.usu.edu wrote:
>I am trying to use e-mail in perl script in NT environment. I know it is very
>easy in Unix, but how about in NT? Can anyone give me a hand?
>
Check out the Mail::* modules on CPAN. They work on WinNT (with
perhaps a little fiddling in places to deal with unsupported features
;-(). See perlfaq9 for more on this.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
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 2250
**************************************