[11416] in Perl-Users-Digest
Perl-Users Digest, Issue: 5015 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 1 12:07:38 1999
Date: Mon, 1 Mar 99 09:01:15 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 1 Mar 1999 Volume: 8 Number: 5015
Today's topics:
Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Pos <andrewf@beausys.demon.co.uk>
Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Pos <jdf@pobox.com>
Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Pos <uri@home.sysarch.com>
Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Pos <andrewf@beausys.demon.co.uk>
Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! <elaine@cts.wustl.edu>
Re: @#/s#! Regular Expressions! :o( <jdf@pobox.com>
Re: @#/s#! Regular Expressions! :o( (Bart Lateur)
Anyone have code examples.... <wfunk@dev.tivoli.com>
Array Initialization and directory list searching <chuckb@mailhub.icx.net>
Re: Array Initialization and directory list searching (Ronald J Kimball)
Re: Array Initialization and directory list searching (Randal L. Schwartz)
Re: Array Initialization and directory list searching <chuckb@mailhub.icx.net>
Re: Array Initialization and directory list searching <chuckb@mailhub.icx.net>
Re: Array Initialization and directory list searching <gellyfish@btinternet.com>
Re: Array question. <aqumsieh@matrox.com>
Re: ascii values in Perl lufan@hotmail.com
Re: Can I do this w/ Perl? (Abigail)
Re: Can I do this w/ Perl? (Ken )
Re: Can I do this w/ Perl? (Ken )
Re: Can I do this w/ Perl? (Ken )
Re: Can I do this w/ Perl? (Ken )
CFSCRIPTS.COM - ColdFusion Resource Site! <nektarios@home.com>
Re: cgi files with iis http server <gellyfish@btinternet.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 1 Mar 1999 16:17:29 +0000
From: Andrew Fry <andrewf@beausys.demon.co.uk>
Subject: Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
Message-Id: <advpSHAZ2r22Ewjx@beausys.demon.co.uk>
In article <x7iuclfd91.fsf@home.sysarch.com>, Uri Guttman
<uri@home.sysarch.com> writes
>>>>>> "AF" == Andrew Fry <andrewf@beausys.demon.co.uk> writes:
>
> AF> In article <x71zjagzjj.fsf@home.sysarch.com>, Uri Guttman
> AF> <uri@home.sysarch.com> writes
>
> AF> Where, precisely, does it say that it was never meant for quick
> AF> replies ? Or is that just your personal view ? And who are you to
> AF> dictate what it is for, and the terms and conditions under which
> AF> people might use it ?
>
>how long have you been using usenet? 2 weeks? do you understand than
>usenet is NOT a realtime medium? that some people may not get or read your
>post for DAYS! if you call that a quick response medium than you have
>some major time/space dysfunction.
1. Probably longer than you.
2. I didnt say it was a real-time medium, so dont twist my words.
3. Dont be so bloody patronizing.
I have a degree in Computer Science, head my own company and have
worked in communications/networking for 20 years. I dont need advice
from an asshole like you.
>
> >> ATTENTION all perl newbies, instead of posting to this group, send you
> >> questions by email to andrew fry, he will answer them all, accurately
> >> quickly and over and over and over and over and over and over and over
> >> and over and ...
>
> AF> Well, there just isnt any point in replying to stupid comments like
> AF> this.
>
>no, it isn't stupid, it is sarcastic. it is designed to blow holes in
>your pseudo-logic. you just state above that
>
> AF> And who are you to dictate what it is for, and the terms and
> AF> conditions under which people might use it ?
>
>so we don't want to answer newbies questions all the time. that fits
>your choice of anarchy as anyone can do whatever they want, including
>answering rtfm. if they want to play they can and we don't set the
>rules. but do you ever notice that NO one answers all those newbie
>questions? not yourself nor some kind samaritan with all the time in the
>world. so your pleadings are faling on deaf and missing ears. hence my
>comments about you taking up the mantle to answer them all. again to
>educate you on usenet, it is a cooperative medium and you have not
>contributed much (if anything) yet other than your wimpy diatribes about
>the group attitude. boo hoo!! we are all sorry and will change our ways!
>thank you for showing us the light. we wil be kind and waste our time
>with each and every newbie out there. we will not maintain the FAQ, nor
>post it regularly nor discuss anything but how to strip spaces from
>strings.
>
>thank you for your help in removing the scrooge from our backs.
>
>uri
Uri, you missed my point entirely, mate.
And cut down on the abusive e-mails.
---
Andrew Fry
"Time flies like an arrow. Fruit flies like a banana". (Groucho Marx).
------------------------------
Date: 01 Mar 1999 11:26:35 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: Andrew Fry <andrewf@beausys.demon.co.uk>
Subject: Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
Message-Id: <m37lt1kwg4.fsf@joshua.panix.com>
Andrew Fry <andrewf@beausys.demon.co.uk> writes:
> As a relative newcomer to this newgroup, there seems to me to be
> an attitude that this newsgroup is primarily reserved for used
> by the experience Perl users, to discuss "interesting" issues,
You keep saying that. I have you refuted you (under another subject
line). You provide no textual basis for your claims. You refuse to
submit corrections or suggestions to the FAQ maintainer. You whinge.
You ignore the dozens of helpful answers posted each day in response
to people who have done some vanishing fraction of what you claim to
be an unreasonable amount of work.
> For myself, I get completely p----d off by people continually
> telling me what I should read. If I want to post a dumb question,
> that's my perogative. You dont have to answer it.
You trample the public garden and flout it. You get killfiled. You
get less help.
*plonk*
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: 01 Mar 1999 11:45:25 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
Message-Id: <x7678lf9ay.fsf@home.sysarch.com>
[a stealth copy was mailed without notice since this jerk is stealth
emailing me. and he calls himself an experienced usenet user]
>>>>> "AF" == Andrew Fry <andrewf@beausys.demon.co.uk> writes:
AF> In message <x7iuclfd91.fsf@home.sysarch.com>, Uri Guttman
AF> <uri@home.sysarch.com> writes
AF> No, probably longer than you. I didnt say that it was a real-time
AF> medium, so dont twist what I said or did not say.
AF> And again, dont be so bloody patronising! You need to seek counselling,
AF> methinks.
AF> I have worked in communications for some 20 years, have a degree in
AF> Computer Science and head a company. I dont need advice from assholes
AF> like you.
well, i beat you by a few years, little boy. and am patronizing you on
purpose since you don't ever seem to help others but only complain about
how we help. let's see you answer some actual questions. newbies helping
newbies is like the blind leading the blind. we have corrected many
newbies answers which were so wrong as to be unbelievable. untested,
poor inefficient perl code. recommendations for matt's scripts and other
misguided attempts at helping. there have been flame wars to start a
newbie group or web page but of course, only the newbies would want it
or go there so who would answer the questions? so i patronize you for
expecting more than can be delivered and then complaining about
it. either put up some answers yourself and earn the privileges or shut up
about how we do it. we don't own the group but we do put in the work.
and which assholes do you get your advice from? they obviously have an
apt student who understands how to answer faqs all day. i can tell you
what to do and charge you more. that is a good deal.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Sun, 28 Feb 1999 15:12:29 +0000
From: Andrew Fry <andrewf@beausys.demon.co.uk>
Subject: Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
Message-Id: <cjOINLAdzV22EwhA@beausys.demon.co.uk>
This can be condensed as follows...
"This newsgroup is reserved for use by us Perl experts to discuss
*INTERESTING* Perl issues. Dont waste our time by posting uninteresting
questions. If you really *MUST* post a question to which you need a
quick reply, make sure that you that you first read the FAQ, man pages,
articles on the WWW and main Perl books in their entirety, and then
sign an affidavit to confirm they you have read all these."
I have to say that I find this really quite patronising.
By the time a newbiew has done all that is suggested here, Perl
will have gone out of fashion!
BTW, I realize the value and importance of a person doing a little
research and investigation of his own, and the importance of knowing
what documentation exists and referring to it. Dont get me wrong.
The key point here is that you have no right whatsoever to tell people
how to use this newgroup...
In article <perl-resource-list-1-919911600@frii.com>, gnat@frii.com
writes
>Every post to the comp.lang.perl.misc newsgroup consumes the time and
>effort of readers all over the world who pay for their Internet access
>just as you do. That's OK, because mutual support is what USENET is
>all about. But it only works if posters check out other resources
>first!
>
>Please make an effort to find the answer to your question on your own
>before posting. The resources below will help you.
>
>BEFORE you post to this newsgroup, look at the following checklist:
>
>1. The latest stable release of Perl is 5.005_02. The latest
>maintenance release of the 5.004 track is 5.004_04. New features
>which may or may not work yet are in the 5.005_XX release where XX is
>higher than 50. You can download them from
> http://www.perl.com/CPAN/src/
>(look in ftp://ftp.perl.com/perl/ for a list of FTP-based mirrors)
>
>2. comp.lang.perl.misc is for questions on the Perl language. Try
>comp.infosystems.www.authoring.cgi for questions on the CGI part of
>CGI scripts. The two leading blocks of reusable code for CGI purposes
>are CGI.pm, at
> http://www.genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.html
>and cgi-lib.pl, at
> http://cgi-lib.stanford.edu/cgi-lib/
>You might also want to check out libwww-perl at
> http://www.linpro.no/lwp/
>If you are having problems with a CGI script, look through
> http://language.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html
>
>3. Are you using the following?
> #!/usr/bin/perl -w
> use diagnostics;
> use strict;
>"-w" turns on all sorts of warnings about probable errors (see the
>perldiag manpage), "use diagnostics" causes the "-w" warnings to be
>explained in greater detail (with the explanations from the perldiag
>manpage), and "use strict" generates compile and run-time errors for
>certain unsafe variable, reference and subroutine constructs (see the
>strict manpage)
>
>4. Are you checking the return values from the functions built in to
>perl? Most of the file and system functions set $! and have return
>values that you can test thus:
> open(PASSWD, "</etc/passwd") or
> die "error opening /etc/passwd: $!\n";
>$! will contain an error message that will give you more information
>on where your program is going wrong. The perlfunc man page will give
>you more information on the return values from functions.
>
>5. Have you read the Perl FAQ? Many questions on sockets programming,
>an important and common problem with Solaris, text manipulation and
>the jargon of perl are answered in the FAQ. As well as being posted
>regularly to comp.lang.perl.misc, the FAQ is on the web at:
> http://language.perl.com/faq/
>
>6. Have you read the man pages? Here are some subjects and the man
>pages to look in:
> Objects perltoot, perlref, perlmod, perlobj, perltie
> Data Structures perlref, perllol, perldsc
> Modules perlmod, perlsub
> Regexps perlre, perlfunc, perlop
> http://www.perl.com/CPAN/doc/FMTEYEWTK/index.html
> (not a man-page but still useful)
> Moving to perl5 perltrap, perl
> Linking w/C perlxstut, perlxs, perlcall, perlguts, perlembed
>The man page for "perltoc" provides a crude table of contents for the
>perl man page set.
>
>7. Have you looked at http://www.perl.com ? This is a great
>online reference, with documentation, pointers to modules in the
>Comprehensive Perl Archive Network (CPAN), articles on the inner
>workings of many bits of Perl, and more.
>
>7.5. Have you checked to see if a Perl module satisfies your needs?
>Many reusable modules are available for immediate download and use.
>See http://www.perl.com/CPAN/modules/00modlist.long.html for details.
>
>8. Have you tried archives of Usenet? http://www.dejanews.com/
>maintains an archive of postings to Usenet dating from March, 1995.
>Be sure to include "Perl" in your search.
>
>9. The latest version of the "Camel Book" ("Programming Perl"),
>updated for version 5.003, is available from your bookstore or from
>http://www.ora.com/
>
>10. Remember, USENET newsgroups are based on the idea of mutual aid.
>USENET only works if we put as much into it as we get out of it. Good
>luck with your Perl work.
>
>-Nathan Torkington, Perl mini-FAQ maintainer
>--
---
Andrew Fry
"Time flies like an arrow. Fruit flies like a banana". (Groucho Marx).
------------------------------
Date: Mon, 01 Mar 1999 11:36:34 -0500
From: Elaine Ashton <elaine@cts.wustl.edu>
Subject: Re: *** FAQ: ANSWERS TO YOUR QUESTIONS!
Message-Id: <36DAC212.E9D39562@cts.wustl.edu>
Andrew Fry wrote:
<snip>
> ...before posting a question is both patronising and unhelpful
> (when done too frequently).
Define 'too frequently'.
> As a relative newcomer to this newgroup, there seems to me to be
> an attitude that this newsgroup is primarily reserved for used
> by the experience Perl users, to discuss "interesting" issues,
> and that newbies have no right to post questions UNLESS AND UNTIL
> they have read all the suggested readings.
Well, hang out on the group for a while...you will see the point of
annoyance fairly quickly. Same shit, different day. Programmers are lazy
by trade but there is a limit. I loathe the days that I have 500 new
news messages to read and most of the time, unless I know who they are
or the thread sounds interesting, I don't even read them.
> I encounter the RTFM response in this newsgroup much more
> often than any other newsgroup I have used.
> Many newbies find these comments unhelpful and offputting,
> especially when accompanied by sarcastic remarks.
Noone said we were Martha Stewart darling. Suck it up and deal, rtfm,
and if you are still at a loss then give it a college try before
posting. Noone here but us old curmudgeons. :)
> Now, most newbies are reasonably intelligent ... we know
> that documentation exists and we understand the importance
> of using documentation ... but we dont always know our way
> around it, and it may not answer what we want.
Knowing documentation exists isn't a measure of intelligence, merely
astute observation. Reading it and asking the question intelligently is
what is so rare it would seem. Getting to the question, getting to the
_right_ question, is the hardest part.
> For myself, I get completely p----d off by people continually
> telling me what I should read. If I want to post a dumb question,
> that's my perogative. You dont have to answer it.
huhh huhh...he said p----d! ;) Lighten up son, life is too short.
e.
------------------------------
Date: 01 Mar 1999 11:31:02 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: jed@grafx.co.uk (Neil Jedrzejewski)
Subject: Re: @#/s#! Regular Expressions! :o(
Message-Id: <m34so5kw8p.fsf@joshua.panix.com>
jed@grafx.co.uk (Neil Jedrzejewski) writes:
> Although there are a lot of variations to the layout of e-mail
> addresses in the line basically they are either seperated by a space,
> comma or semi-colon or a combination.
In a regular expression, you spell "a space, comma, semi-colon, or a
combination" like so
[ ,;]+
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: Mon, 01 Mar 1999 16:52:29 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: @#/s#! Regular Expressions! :o(
Message-Id: <36dac4a4.1214776@news.skynet.be>
Neil Jedrzejewski wrote:
>I need (I guess) a few lines of code that probably uses a regular
>expression that will look at the line, see all the e-mail addresses
>and put them into an array.
I think that first, you should go to CPAN (www.cpan.org or
www.perl.com/CPAN) and download the mailtools archive. There's one
particular module that could be very helpfull: Mail::Address. That is a
mail address parser (not a regex) that can reliably extract a list of
email addresses from a string.
Bart.
------------------------------
Date: Sun, 28 Feb 1999 18:56:22 -0600
From: "Wade T. Funk" <wfunk@dev.tivoli.com>
Subject: Anyone have code examples....
Message-Id: <36D9E5B6.FAC48AB6@dev.tivoli.com>
for Perl scripts that use pipes to communicate to and from a
script that is invoked in the background of the script I am
writing? I have no trouble writing to the script, but I can't
seem to get the return data. The script I am writing(CGI)
invokes a larger script that is a while loop which executes
commands until 'quit' is given as a command. I want to be
able to send a command to this backgrounded script, and
print the reply to a web page (CGI) after each command,
not after the entire script is finished.
Thanks,
Wade
------------------------------
Date: Sat, 27 Feb 1999 14:43:00 -0500
From: Chuck Brashear <chuckb@mailhub.icx.net>
Subject: Array Initialization and directory list searching
Message-Id: <36D84AC4.9B8C64D7@mailhub.icx.net>
How would you get a unix directory list of files ending in for example
"xyz" and
put the results into a new array? I've tried the following but only the
first element in the array receives a value. I'm trying to fill the
@xyz_array.
Also, if there is and easier way, I'd be glad to hear about it.
Thanks in advance!
$i=0;
while( $name = readdir(CUR_DIR)){
if( $name =~ /xyz\b/ ){
$xyz_array[$i] = $name;
++$i;
}
}
------------------------------
Date: Sat, 27 Feb 1999 17:00:00 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Array Initialization and directory list searching
Message-Id: <1dnw8wt.ow5z241stuc5cN@bay1-409.quincy.ziplink.net>
Chuck Brashear <chuckb@mailhub.icx.net> wrote:
> $i=0;
> while( $name = readdir(CUR_DIR)){
>
> if( $name =~ /xyz\b/ ){
> $xyz_array[$i] = $name;
> ++$i;
> }
>
> }
This looks like it should work, as long as you don't have a file named
'0' (zero). Other than that, I don't know why it wasn't working for
you.
There is, however, a more Perlish way to do it:
while (defined($name = readdir(CUR_DIR)) {
if ( $name =~ /xyz$/ ) {
push @xyz_array, $name;
}
}
HTH!
--
_ / ' _ / - aka - rjk@linguist.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
perl -le 'print "Just another \u$^X hacker"'
------------------------------
Date: 27 Feb 1999 14:37:52 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Array Initialization and directory list searching
Message-Id: <m1zp5ztqv3.fsf@halfdome.holdit.com>
>>>>> "Ronald" == Ronald J Kimball <rjk@linguist.dartmouth.edu> writes:
Ronald> There is, however, a more Perlish way to do it:
Ronald> while (defined($name = readdir(CUR_DIR)) {
Ronald> if ( $name =~ /xyz$/ ) {
Ronald> push @xyz_array, $name;
Ronald> }
Ronald> }
Of course, an even more Perlish way looks like:
@xyz_array = grep /xyz$/, readdir CUR_DIR;
Or, if you need to merely add the names to @xyz_array:
push @xyz_array, grep /xyz$, readdir CUR_DUR;
print grep /^/, "Just another Perl hacker,"
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Sat, 27 Feb 1999 18:16:52 -0500
From: Chuck Brashear <chuckb@mailhub.icx.net>
Subject: Re: Array Initialization and directory list searching
Message-Id: <36D87CE3.8E3A54AD@mailhub.icx.net>
Ron,
Thanks for the reply, especially the alternate way to perform the
task!
I've just started looking at perl, and I hadn't extended the length of the
array.
I didn't know if perl did this automatically until I found the $# special
variable.
Ronald J Kimball wrote:
> Chuck Brashear <chuckb@mailhub.icx.net> wrote:
>
> > $i=0;
> > while( $name = readdir(CUR_DIR)){
> >
> > if( $name =~ /xyz\b/ ){
> > $xyz_array[$i] = $name;
> > ++$i;
> > }
> >
> > }
>
> This looks like it should work, as long as you don't have a file named
> '0' (zero). Other than that, I don't know why it wasn't working for
> you.
>
> There is, however, a more Perlish way to do it:
>
> while (defined($name = readdir(CUR_DIR)) {
> if ( $name =~ /xyz$/ ) {
> push @xyz_array, $name;
> }
> }
>
> HTH!
>
> --
> _ / ' _ / - aka - rjk@linguist.dartmouth.edu
> ( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
> / http://www.ziplink.net/~rjk/
> perl -le 'print "Just another \u$^X hacker"'
------------------------------
Date: Sat, 27 Feb 1999 19:06:22 -0500
From: Chuck Brashear <chuckb@mailhub.icx.net>
Subject: Re: Array Initialization and directory list searching
Message-Id: <36D8887E.4F9B761A@mailhub.icx.net>
Randal, thanks for some more great ideas!
"Randal L. Schwartz" wrote:
> >>>>> "Ronald" == Ronald J Kimball <rjk@linguist.dartmouth.edu> writes:
>
> Ronald> There is, however, a more Perlish way to do it:
>
> Ronald> while (defined($name = readdir(CUR_DIR)) {
> Ronald> if ( $name =~ /xyz$/ ) {
> Ronald> push @xyz_array, $name;
> Ronald> }
> Ronald> }
>
> Of course, an even more Perlish way looks like:
>
> @xyz_array = grep /xyz$/, readdir CUR_DIR;
>
> Or, if you need to merely add the names to @xyz_array:
>
> push @xyz_array, grep /xyz$, readdir CUR_DUR;
>
> print grep /^/, "Just another Perl hacker,"
>
> --
> Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
> Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
> Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
> Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
> Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 28 Feb 1999 00:29:58 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Array Initialization and directory list searching
Message-Id: <7ba2m6$3nv$1@gellyfish.btinternet.com>
On Sat, 27 Feb 1999 14:43:00 -0500 Chuck Brashear wrote:
> How would you get a unix directory list of files ending in for example
> "xyz" and
> put the results into a new array? I've tried the following but only the
> first element in the array receives a value. I'm trying to fill the
> @xyz_array.
> Also, if there is and easier way, I'd be glad to hear about it.
>
> Thanks in advance!
>
> $i=0;
> while( $name = readdir(CUR_DIR)){
>
> if( $name =~ /xyz\b/ ){
> $xyz_array[$i] = $name;
> ++$i;
> }
>
> }
>
I'm not sure whether that would have worked at all but I would suggest:
opendir(CUR_DIR,'whatever') || die "Cant open directory - $!\n";
@xyz_array = grep /xyz\b/,readdir(CUR_DIR);
# etc ...
/J\
--
Jonathan Stowe <jns@btinternet.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, 27 Feb 1999 17:19:27 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Array question.
Message-Id: <x3ylnhjpk0g.fsf@tigre.matrox.com>
bart.lateur@skynet.be (Bart Lateur) writes:
>
> Ian Blake wrote:
>
> >I hope it's not too simple, and that I am posting to the proper group. I
> >just want to clear all elements from an array.
> Use either of:
>
> @arrayname = ();
>
> undef @arrayname;
Note to Ian (and the rest of the world):
undef()ing an array is not equivalent to clearing "all elements from
an array". The first solution above leaves the array defined, but with
no elements. The second solution undefines the array, so trying to
access @ary in any means will result in a warning. Consult perlfunc
for more infor on undef().
Note to Bart:
I know that you know the difference, but it's not evident from your
reply. I thought it should be pointed out to the unwary.
Ala
------------------------------
Date: Mon, 01 Mar 1999 10:09:42 -0800
From: lufan@hotmail.com
Subject: Re: ascii values in Perl
Message-Id: <36DAD7E6.7DE4@hotmail.com>
Arnauld Van Muysewinkel wrote:
>
> psitko@my-dejanews.com wrote:
>
> > How do I refer to an ascii value for a character in Perl? I would like to be
> > able to do this in both a regular expression and just in comparing substrings.
> > Is there some sort of escape sequence to use.
> >
> > For instance I'd like to be able to see if a substring of length one is a
> > character with a particular numerical ascii value. How would I do that. I
> > haven' t had any luck with the documentation and I'm sure I'm just looking in
> > the wrong places.
>
> I don't know exactly what you want to do.
>
> * Either it is the 'ord' function that you need.
>
> ord EXPR
> Returns the ASCII value of the first character of EXPR.
>
> * You can also use 'chr' to produce a character of a particular ASCII value
>
> chr EXPR
> Returns the character represented by the decimal value EXPR.
>
> * Or you can use "\xZZ" which returns the character represented by the hexadecimal
> value ZZ
> or "\0ZZ" which returns the character represented by the octal value ZZ
>
> > Thank you,
> >
> > Paul Sitko
> >
> > -----------== Posted via Deja News, The Discussion Network ==----------
> > http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
> --
> -- Arnauld Van Muysewinkel
>
> Atos SA [ http://www.atos.be ]
how can I transfer a chinese word into the format like
%AE%E5 ????? and how to reverse the transition of
s/%(..)/pack('C',hex($1))/eg
------------------------------
Date: 1 Mar 1999 16:51:46 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Can I do this w/ Perl?
Message-Id: <7begj2$a11$1@client2.news.psi.net>
Tad McClellan (tadmc@metronet.com) wrote on MMVII September MCMXCIII in
<URL:news:i1abb7.0mh.ln@magna.metronet.com>:
-- Ken (cant_take@thespam.com) wrote:
-- : abigail@fnx.com (Abigail) wrote:
--
-- : >Also trivial in Perl. Users aren't Perl driven, they run on hamburgers.
-- : >Again, Perl can quietly rest while you educate your users to enter events.
--
-- : A little cryptic, Abigail. Are you saying I don't need Perl to have
-- : users enter data on a web page?
--
-- : How would I do it then?
--
-- However, to _do something_ with the data that those users enter,
-- you _do_ need some sort of CGI program to handle the returned
-- form values. (but you didn't ask about what to _do_ with the
-- entered data)
You don't even need a program that uses the CGI protocol.
Abigail
------------------------------
Date: Sun, 28 Feb 1999 03:28:29 GMT
From: cant_take@thespam.com (Ken )
Subject: Re: Can I do this w/ Perl?
Message-Id: <36d8b7c7.15176124@news.tiac.net>
"Frank White" <memymy@earthlink.com> wrote:
>Why not use HTML and a form handler?
>
And a "form handler" is........?
Ken
------------------------------
Date: Sun, 28 Feb 1999 03:30:19 GMT
From: cant_take@thespam.com (Ken )
Subject: Re: Can I do this w/ Perl?
Message-Id: <36d8b7fa.15226810@news.tiac.net>
dragnovich@my-dejanews.com wrote:
>Yes you can make that in perl.
>
>I Fact I made some perl programs that does things like that, I have made a
>"Mexican Soccer Championship" for my clients. I get all the results on a web
>form, and the users can check the results on the web.
>
>I separate the progrma in two programs 1) Reads results and 2) Admin Results
>Stats then just the people with the right username/password can
>add/modift/delete the games results/stats.
>
Can you give me an overview of the approach you used for such a
progam?
Ken
>
>In article <7b8ki5$jp5$2@client2.news.psi.net>,
> abigail@fnx.com wrote:
>> Ken Loomis (kloomis@it-resourcesSPAMX.com) wrote on MMVI September
>> MCMXCIII in <URL:news:36d78f01.14244715@news.tiac.net>:
>> @@ There are two applications I'd like and I'm wondering if I can do them
>> @@ with Perl, and what the degree of difficulty of each would be (low,
>> @@ medium, or high).
>> @@
>> @@ First, I'm the administrator of a soccer league. I need to collect
>> @@ scores. Can I set up a web page where the managers can logon and
>> @@ enter their own scores.
>>
>> This is trivial when it comes to Perl. In fact, there's no need to take
>> Perl out of its wrapper if you're going to create web pages.
>>
>> @@ Second, I'd like to have users enter events on a web based calendar.
>>
>> Also trivial in Perl. Users aren't Perl driven, they run on hamburgers.
>> Again, Perl can quietly rest while you educate your users to enter events.
>>
>> Abigail
>> --
>> sub f{sprintf'%c%s',$_[0],$_[1]}print f(74,f(117,f(115,f(116,f(32,f(97,
>> f(110,f(111,f(116,f(104,f(0x65,f(114,f(32,f(80,f(101,f(114,f(0x6c,f(32,
>> f(0x48,f(97,f(99,f(107,f(101,f(114,f(10,q ff)))))))))))))))))))))))))
>>
>
>------------------------
>Juan Carlos Lopez
>QDesigns President & CEO
>http://www.qdesigns.com
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sun, 28 Feb 1999 03:27:57 GMT
From: cant_take@thespam.com (Ken )
Subject: Re: Can I do this w/ Perl?
Message-Id: <36d8b761.15073408@news.tiac.net>
abigail@fnx.com (Abigail) wrote:
>Ken Loomis (kloomis@it-resourcesSPAMX.com) wrote on MMVI September
>MCMXCIII in <URL:news:36d78f01.14244715@news.tiac.net>:
>@@ There are two applications I'd like and I'm wondering if I can do them
>@@ with Perl, and what the degree of difficulty of each would be (low,
>@@ medium, or high).
>@@
>@@ First, I'm the administrator of a soccer league. I need to collect
>@@ scores. Can I set up a web page where the managers can logon and
>@@ enter their own scores.
>
>This is trivial when it comes to Perl. In fact, there's no need to take
>Perl out of its wrapper if you're going to create web pages.
>
>@@ Second, I'd like to have users enter events on a web based calendar.
>
>Also trivial in Perl. Users aren't Perl driven, they run on hamburgers.
>Again, Perl can quietly rest while you educate your users to enter events.
>
>
>
>Abigail
A little cryptic, Abigail. Are you saying I don't need Perl to have
users enter data on a web page? How would I do it then?
Ken
------------------------------
Date: Sun, 28 Feb 1999 03:33:59 GMT
From: cant_take@thespam.com (Ken )
Subject: Re: Can I do this w/ Perl?
Message-Id: <36d8b8e3.15460181@news.tiac.net>
bart.lateur@skynet.be (Bart Lateur) wrote:
>Ken Loomis wrote:
>
>>Is Perl a good language for these application and how hard would it be
>>to do them?
>
>Yes, Perl is a good choice. I would advice you to get the structure of
>your programs right on your local system, not online; debugging would be
>soooo much easier. So download Perl, from CPAN (www.cpan.org or
>www.perl.com/CPAN).
>
but my local system in WinTel and my ISP is UNIX. Won't that be a
problem?
Ken
>And look at some Perl tutorials if you want to make your own life
>easier, for example Randal Schwartz' book "Learning Perl". If you don't
>know Perl sufficiently enough, life will be hell.
I took CGI.101 which was very clearly presented.
>
>Finally, get some real world examples. This links page probably is a
>good start: http://www.oac.uci.edu/indiv/ehood/perlWWW/ . Though I've
>never seen it (damned book shops!), the Perl Cookbook is said to be
>good.
>
>I'd also advice you to look at Randal's WebTechniques articles, at
>http://www.stonehenge.com/merlyn/WebTechniques/ which describe some
>small but nifty CGI programs.
>
> Bart.
------------------------------
Date: Sun, 28 Feb 1999 03:29:57 GMT
From: Nektarios Kalogridis <nektarios@home.com>
Subject: CFSCRIPTS.COM - ColdFusion Resource Site!
Message-Id: <36D8E210.2E591997@home.com>
Hi,
A new Cold Fusion resource web site has been launched called
CFScripts.com, located at: http://www.cfscripts.com .
Some of the things you'll find at our web site include, CFML Custom
Tags, CFX Custom Tags, ColdFusion Applications, Development Tools and
Templates/Scripts. In addition, we also have a message board where
you can post any question you have about ColdFusion or participate in
discussions.
Please feel free to visit and submit any ColdFusion resource at our web
site as well.
We also provide you with the ability to fully update or delete any
resource you submit.
We sincerely hope you enjoy CFScripts.com ( http://www.cfscripts.com ).
Your feedback is greatly appreciated.
Best Regards,
Nektarios Kalogridis
http://www.cfscripts.com
info@cfscripts.com
------------------------------
Date: 28 Feb 1999 02:41:22 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: cgi files with iis http server
Message-Id: <7baaci$458$1@gellyfish.btinternet.com>
On Thu, 25 Feb 1999 14:59:50 +0200 Karen Soudry wrote:
> HI
>
> I wrote a html file that sends an ID parameter to a cgi file.
> I installed the IIS HTTP SERVER and it can't seem to run the cgi file.
> how can you configure the http server that it can read cgi files???
> I wrote the url to the cgi file in the html file but I get a message
> "HTTP/1.0 500 Server Error (The system cannot find the path specified. ) .
>
>
> HELP!!!!
>
I dont want to seem weird or exclusive or anything but this is not really
a pertinent question for this newsgroup. I think that you might find that
the nice folk at <news:comp.infosystems.www.servers.ms-windows> might be
able to offer you some advice. The error reported is almost certainly
caused by some server mis-configuration.
/J\
--
Jonathan Stowe <jns@btinternet.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: 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 5015
**************************************