[22488] in Perl-Users-Digest
Perl-Users Digest, Issue: 4709 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Mar 14 06:05:37 2003
Date: Fri, 14 Mar 2003 03:05:05 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 14 Mar 2003 Volume: 10 Number: 4709
Today's topics:
Re: ActiveState 5.8 - Download a whole repository? (Helgi Briem)
Re: Creating a dynamic list of filehandles <goldbb2@earthlink.net>
Re: http cgi and perl <barbr-en@online.no>
Re: new Perl feature request: call into shared libs <para@tampabay.rr.com>
Re: pass multiple lines in ? (Sam Holden)
Re: pass multiple lines in ? <peakpeek@purethought.com>
Re: pass multiple lines in ? <a@c.com>
Posting Guidelines for comp.lang.perl.misc ($Revision: tadmc@augustmail.com
Re: Printing a 2d array <pengtaoli@hotmail.com>
Re: Printing a 2d array <bigj@kamelfreund.de>
Re: remove anything from string except two words (Pynex)
Re: What's wrong with the Perl docs <Juha.Laiho@iki.fi>
Re: What's wrong with the Perl docs <bernard.el-hagin@DODGE_THISlido-tech.net>
Re: What's wrong with the Perl docs (Helgi Briem)
Re: What's wrong with the Perl docs (Helgi Briem)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 14 Mar 2003 10:46:58 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: ActiveState 5.8 - Download a whole repository?
Message-Id: <3e71b2af.3020302044@news.cis.dfn.de>
On Thu, 13 Mar 2003 16:53:00 -0000, "Fred Finisterre"
<finisterre@postmaster.co.uk> wrote:
>Is there anywhere I can download an entire Perl repository. I can't get PPM
>to work through my company's web proxy - even when I use the environment
>variables to set my proxy name, userid and password in DOS.
"In DOS"? Leaving aside the fact that DOS hasn't been used
in Windows since 1995 except for the first few seconds of
installation, you should set environment variable
through the System control panel. Setting them
via a command prompt makes them transient only.
--
Regards, Helgi Briem
helgi AT decode DOT is
------------------------------
Date: Fri, 14 Mar 2003 00:34:07 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Creating a dynamic list of filehandles
Message-Id: <3E7169CF.B24DFB9@earthlink.net>
Mark Drummond wrote:
>
> Hi all. I want to create a set of filehandles, based on a list of
> "things" in another file. For example, say I have a file which
> contains the names of all the disks in a disk array, something like
> this:
>
> c0t0d0
> c0t1d0
> c1t0d0
> c1t1d0
> .
> .
> .
>
> Now let's say I have aanother (single) file with performance data on
> all these disks, like iostat output. I want to take that performance
> data and sift it into a set of files based on the disk names. So I
> want to create a set of files named "$diskname.dat" and then write
> data lines for each disk into it's own file.
open( my ($iostats), "<", $iostatfile ) or die horribly;
my %iostat_hash;
while( <$iostats> ) {
my ($diskname, @other_info) = .....;
$iostat_hash{$diskname} = \@other_info;
}
close $iostats;
open( my ($disknames), "<", $disknamefile ) or die horribly;
while( <$disknames> ) {
if( my $iostat_info = $iostat_hash{$_} ) {
open FOO, ">", "$_.dat" or die horribly;
print FOO .... @$iostat_info ....;
close FOO or die horribly;
} else {
warn "No iostat info for disk $_ !\n";
}
}
close $disknames;
__END__
--
$a=24;split//,240513;s/\B/ => /for@@=qw(ac ab bc ba cb ca
);{push(@b,$a),($a-=6)^=1 for 2..$a/6x--$|;print "$@[$a%6
]\n";((6<=($a-=6))?$a+=$_[$a%6]-$a%6:($a=pop @b))&&redo;}
------------------------------
Date: Fri, 14 Mar 2003 09:06:23 +0100
From: Kåre Olai Lindbach <barbr-en@online.no>
Subject: Re: http cgi and perl
Message-Id: <fm137vsrah03ueclo4qgv1v2ufi7vc5s5o@4ax.com>
On Thu, 13 Mar 2003 00:12:37 +0000, Mario542
<member17678@dbforums.com> wrote:
>
>I have a web page the references a perl scripts, but when I try to run
>it tries to download the perl file instead of running it. Any ideas??
Although, as stated by other, your problem lies in the HTTP/CGI-server
configuration [1], I have some issues about your script.
[1] You have a local one? Or you upload this to your homepage at your
ISP? If the latter, are you allowed to run CGI-skripts there?
>Here is the perl script.
>
>#!c:\perl\bin\perl.exe -wT
Ok, we're on an MS OS. And this is the HTTP (Web)-server also?
What server is it? Some IIS or Apache?
Pls also:
use strict;
># Get the input for POST method
> read(STDIN,$buffer,$ENV{'CONTENT_LENGTH'});
Why don't you use CGI-style, as you use CGI further under?
>#Split the name-value pairs
> ($name,$value)=split(/=/,$buffer);
>
># Substitute special character to its original character
> $value=~ tr/+/ /;
> $value=~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
All this CGI::* helps you with better than you do ... at least at you
stage.
>use DBI ;
>use CGI ;
>CGI::ReadParse ();
Whe do you here do everything again, as you tried to do further up?
Pls read about CGI in you docs. Their in your "c:\perl\html"-folder if
you have installed Activestate-Perl, at least ...
>$dbName ="DBI:ODBC:";
Where is your DNS-name? Maybe set in DBI_DNS. I prefer to set dbname
here.
>$user="";
>$passwd="";
Security issue! No user and password!
>$statement = "update settopinfo set pinset='0' where
>serialnumber='$value' " ;
Pls read about DBI. Pls use placeholder (?).
>$dbh = DBI->connect($dbName, $user, $passwd) || die "$DBI::errstr";
>$cursor = $dbh->prepare($statement) || die "$DBI::errstr";
>$cursor->execute();
If you use placeholder above, your $value goes here:
$cursor->execute($value);
>
>
>#------print the return HTML------------------
>
> #print the MIME type
> print"Content-type: text/html\n\n";
Pls allow CGI to help you here, example:
use CGI qw/:standard/;
print header;
> #print the HTML body
> print"<html>\n";
> print "<head><title></title></head>\n";
> print "<body>\n";
> print "<body bgcolor=#C0C0C0>\n";
> print "<BR>\n";
> print "<body><center><h1></h1>\n";
> print "<HR>\n";
> print "<body><center><h2>PIN</h2>\n";
> print "<HR>\n";
> print "<BR>\n";
> print "<BR>\n";
> print "<BR>\n";
> print "<h2>The : ";
> print "<h1><u> $value\n";
> print "</body></html>\n";
> print "<BR>\n";
> print "<BR>\n";
> print "<BR>\n";
> print "<BR>\n";
> print "<BR>\n";
> print "<BR>\n";
> print "<HR>\n";
> exit;
In all lines here there are great room for improvement in your Perl
skills, besides letting the CGI-module help you with a better syntax.
--
mvh/Regards
Kåre Olai Lindbach
------------------------------
Date: Fri, 14 Mar 2003 08:12:11 GMT
From: "Matt Taylor" <para@tampabay.rr.com>
Subject: Re: new Perl feature request: call into shared libs
Message-Id: <v9gca.58137$lW3.2011891@twister.tampabay.rr.com>
"Ilya Zakharevich" <nospam-abuse@ilyaz.org> wrote in message
news:b4rg9g$2pm6$1@agate.berkeley.edu...
> [A complimentary Cc of this posting was sent to
> Bryan Castillo
> <rook_5150@yahoo.com>], who wrote in article
<1bff1830.0303121636.5ae73e22@posting.google.com>:
> > > > Default convention (__cdecl) is the same. Windows system libraries
are
> > > > compiled with __stdcall convention which is different. The following
code
> > > > should suffice for any convention except a register-parameter
scheme:
> > >
> > > Actually, one could also duplicate the last min(3, num_params)
> > > arguments in EAX, EDX, ECX. This way the same code could call
> > > __regparam__(3) functions too.
>
> > Why not have the calling convention used as a parameter?
>
> What for - if one can avoid it?
The premise is not valid. That is, you can't avoid it. Even practically,
dealing only with mainstream stuff (nothing strange), you still can't avoid
it.
> > I don't see why you would try to satisfy all schemes with one
> > function.
>
> Why not - if this is easy to do? Change 3 to 6 above, and duplicate
> the last 6 arguments in 6 standard registers; then providing arguments
> to the wrapper function in a "correct" order will satisfy any "input"
> calling convention.
Last I checked GCC did not support __regparm__(6) on x86. That was GCC 2.x.
It may be supported in GCC 3.x, but I doubt it. Most industrial-strength
compilers do not support more than 3 registers for a register call scheme
for 2 reasons:
1. eax, ecx, and edx are typically not preserved
2. More than 3 often results in register spill anyway since esp never gets
used for computation except in lame hand-coded assembly. (Unreal Tournament
actually did this.)
Also, you can't simply "duplicate" parameters and expect it to work. They
exist in one place, and it's either in a register or on the stack.
> Ilya
>
> P.S. BTW, on Sparc it is: the first 6 arguments in the 6 "input"
> registers; the rest elsewhere.
Yes, Sparc is a register stack machine. It's designed for this. There is no
way to write a completely polymorphic native call that interfaces with
multiple machines. Somewhere, somehow you're going to have to write assembly
for the target machine, and you'll have to give specifics about calling
conventions for that machine.
Speaking strictly about x86, it is -still- very difficult to generically
describe all of the calling conventions that are commonly used let alone
describe weird cases. Register parameter schemes are a -big- problem because
they put some of the parameters in registers. This is ok, but it changes the
stack because these parameters no longer appear on the stack. It's not
predictable because you don't know whether a register calling convention was
used or not, and without that knowledge you can't set up the stack
correctly. You can make good guesses, but beware of guessing wrong.
-Matt
------------------------------
Date: 14 Mar 2003 05:22:43 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: pass multiple lines in ?
Message-Id: <slrnb72pp2.632.sholden@flexal.cs.usyd.edu.au>
On Thu, 13 Mar 2003 23:35:27 -0500, Eric Osman <ericosman@rcn.com> wrote:
>
[snip]
> perl reFormat.pl digestContents="123\r\n456\r\n567\r\n"
>
> But it all came in as a single line.
>
> I wanted the script to see it as though it were this:
>
> 123
> 456
> 567
>
> Is there an easy way to pass in three lines in one command line ?
It all depends on your shell. The shell I use doesn't convert \r into
a carraige return for example. Check you shell documentation.
Something like:
perl reFormat.pl digestContents="`perl -e 'print "123\r\n456\r\n567\r\n"'`"
Which uses perl to interprete the \r and \n, and `s to capture that
output and pass it on the command line. It is *very* likely (assumming you
are using a unix of some sort) that you have a 'printf' command available
in which case you could use it instead of perl:
perl reFormat.pl digestContents="`printf "123\r\n456\r\n567\r\n"`"
However, CGI.pm has some debugging features which allow you to enter
parameters for testing purposes. Using that might be better (see the CGI.pm
docs).
Also I subscribe to the be forgiving on input and exact on output principle.
Which would mean I'd split lines on /\r?\n|\r/ unless stand alone \r or \n
is valid input.
--
Sam Holden
------------------------------
Date: Fri, 14 Mar 2003 07:24:40 +0000
From: Sharon Grant <peakpeek@purethought.com>
Subject: Re: pass multiple lines in ?
Message-Id: <lh037v8vatv6m6e1ou5rublg2ql0mcgguq@4ax.com>
On Thu, 13 Mar 2003 23:35:27 -0500, in comp.lang.perl.misc, Eric Osman <ericosman@rcn.com> wrote:
>When testing my CGI script from the windows xp command line, how
>can I set an input parameter to be multiple lines ?
>
>The following stupid pet trick doesn't do the expected thing:
>
> perl reFormat.pl digestContents="123\r\n456\r\n567\r\n"
>
>My script normally expects some HTML code that uses <TEXTAREA> within
><FORM METHOD=POST>
In the CGI context a browser will send textarea line breaks
URL-encoded. CGI.pm will decode. Just use %0D%0A
perl reFormat.pl digestContents="123%0D%0A456%0D%0A567%0D%0A"
--
Sharon
------------------------------
Date: Fri, 14 Mar 2003 01:41:05 -0800
From: "Alan C." <a@c.com>
Subject: Re: pass multiple lines in ?
Message-Id: <v738bo4hhd7576@corp.supernews.com>
Eric Osman wrote:
>
> Hi,
>
> When testing my CGI script from the windows xp command line, how
> can I set an input parameter to be multiple lines ?
The Windows command line is held in @ARGV
Each space (within your command) is/becomes a record separator. Similar to
the words in these sentences, the separation by each space between each
word.
command parameter1 parameter2 parameter3 parameter4
perl myperlfile parameter2 parameter3 parameter4
$ARGV[0] $ARGV[1] $ARGV[2] $ARGV[3]
Each parameter on the command line, a parameter itself cannot have a space
as one of its characters.
Once the script is running you can set/assign a scalar to a value from @ARGV
my $param2 = $ARGV[1];
print "$param2\n"; # prints "parameter2"
Via Windows commandline, that the only way I know to pass parameter into so
it (parameter) accessible inside the script as script is running.
--
A
------------------------------
Date: Fri, 14 Mar 2003 02:22:12 -0600
From: tadmc@augustmail.com
Subject: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.4 $)
Message-Id: <F_GdnXPZRYSpDOyjXTWcoQ@august.net>
Outline
Before posting to comp.lang.perl.misc
Must
- Check the Perl Frequently Asked Questions (FAQ)
- Check the other standard Perl docs (*.pod)
Really Really Should
- Lurk for a while before posting
- Search a Usenet archive
If You Like
- Check Other Resources
Posting to comp.lang.perl.misc
Is there a better place to ask your question?
- Question should be about Perl, not about the application area
How to participate (post) in the clpmisc community
- Carefully choose the contents of your Subject header
- Use an effective followup style
- Speak Perl rather than English, when possible
- Ask perl to help you
- Do not re-type Perl code
- Provide enough information
- Do not provide too much information
- Do not post binaries, HTML, or MIME
Social faux pas to avoid
- Asking a Frequently Asked Question
- Asking a question easily answered by a cursory doc search
- Asking for emailed answers
- Beware of saying "doesn't work"
- Sending a "stealth" Cc copy
Be extra cautious when you get upset
- Count to ten before composing a followup when you are upset
- Count to ten after composing and before posting when you are upset
-----------------------------------------------------------------
Posting Guidelines for comp.lang.perl.misc ($Revision: 1.4 $)
This newsgroup, commonly called clpmisc, is a technical newsgroup
intended to be used for discussion of Perl related issues (except job
postings), whether it be comments or questions.
As you would expect, clpmisc discussions are usually very technical in
nature and there are conventions for conduct in technical newsgroups
going somewhat beyond those in non-technical newsgroups.
This article describes things that you should, and should not, do to
increase your chances of getting an answer to your Perl question. It is
available in POD, HTML and plain text formats at:
http://mail.augustmail.com/~tadmc/clpmisc.shtml
For more information about netiquette in general, see the "Netiquette
Guidelines" at:
http://andrew2.andrew.cmu.edu/rfc/rfc1855.html
A note to newsgroup "regulars":
Do not use these guidelines as a "license to flame" or other
meanness. It is possible that a poster is unaware of things
discussed here. Give them the benefit of the doubt, and just
help them learn how to post, rather than assume
A note about technical terms used here:
In this document, we use words like "must" and "should" as
they're used in technical conversation (such as you will
encounter in this newsgroup). When we say that you *must* do
something, we mean that if you don't do that something, then
it's unlikely that you will benefit much from this group.
We're not bossing you around; we're making the point without
lots of words.
Do *NOT* send email to the maintainer of these guidelines. It will be
discarded unread. The guidelines belong to the newsgroup so all
discussion should appear in the newsgroup. I am just the secretary that
writes down the consensus of the group.
Before posting to comp.lang.perl.misc
Must
This section describes things that you *must* do before posting to
clpmisc, in order to maximize your chances of getting meaningful replies
to your inquiry and to avoid getting flamed for being lazy and trying to
have others do your work.
The perl distribution includes documentation that is copied to your hard
drive when you install perl. Also installed is a program for looking
things up in that (and other) documentation named 'perldoc'.
You should either find out where the docs got installed on your system,
or use perldoc to find them for you. Type "perldoc perldoc" to learn how
to use perldoc itself. Type "perldoc perl" to start reading Perl's
standard documentation.
Check the Perl Frequently Asked Questions (FAQ)
Checking the FAQ before posting is required in Big 8 newsgroups in
general, there is nothing clpmisc-specific about this requirement.
You are expected to do this in nearly all newsgroups.
You can use the "-q" switch with perldoc to do a word search of the
questions in the Perl FAQs.
Check the other standard Perl docs (*.pod)
The perl distribution comes with much more documentation than is
available for most other newsgroups, so in clpmisc you should also
see if you can find an answer in the other (non-FAQ) standard docs
before posting.
It is *not* required, or even expected, that you actually *read* all of
Perl's standard docs, only that you spend a few minutes searching them
before posting.
Try doing a word-search in the standard docs for some words/phrases
taken from your problem statement or from your very carefully worded
"Subject:" header.
Really Really Should
This section describes things that you *really should* do before posting
to clpmisc.
Lurk for a while before posting
This is very important and expected in all newsgroups. Lurking means
to monitor a newsgroup for a period to become familiar with local
customs. Each newsgroup has specific customs and rituals. Knowing
these before you participate will help avoid embarrassing social
situations. Consider yourself to be a foreigner at first!
Search a Usenet archive
There are tens of thousands of Perl programmers. It is very likely
that your question has already been asked (and answered). See if you
can find where it has already been answered.
One such searchable archive is:
http://groups.google.com/advanced_group_search
If You Like
This section describes things that you *can* do before posting to
clpmisc.
Check Other Resources
You may want to check in books or on web sites to see if you can
find the answer to your question.
But you need to consider the source of such information: there are a
lot of very poor Perl books and web sites, and several good ones
too, of course.
Posting to comp.lang.perl.misc
There can be 200 messages in clpmisc in a single day. Nobody is going to
read every article. They must decide somehow which articles they are
going to read, and which they will skip.
Your post is in competition with 199 other posts. You need to "win"
before a person who can help you will even read your question.
These sections describe how you can help keep your article from being
one of the "skipped" ones.
Is there a better place to ask your question?
Question should be about Perl, not about the application area
It can be difficult to separate out where your problem really is,
but you should make a conscious effort to post to the most
applicable newsgroup. That is, after all, where you are the most
likely to find the people who know how to answer your question.
Being able to "partition" a problem is an essential skill for
effectively troubleshooting programming problems. If you don't get
that right, you end up looking for answers in the wrong places.
It should be understood that you may not know that the root of your
problem is not Perl-related (the two most frequent ones are CGI and
Operating System related), so off-topic postings will happen from
time to time. Be gracious when someone helps you find a better place
to ask your question by pointing you to a more applicable newsgroup.
How to participate (post) in the clpmisc community
Carefully choose the contents of your Subject header
You have 40 precious characters of Subject to win out and be one of
the posts that gets read. Don't waste them. Take care while
composing them, they are the key that opens the door to getting an
answer.
Spend them indicating what aspect of Perl others will find if they
should decide to read your article.
Do not spend them indicating "experience level" (guru, newbie...).
Do not spend them pleading (please read, urgent, help!...).
Do not spend them on non-Subjects (Perl question, one-word
Subject...)
For more information on choosing a Subject see "Choosing Good
Subject Lines":
http://www.cpan.org/authors/id/D/DM/DMR/subjects.post
Part of the beauty of newsgroup dynamics, is that you can contribute
to the community with your very first post! If your choice of
Subject leads a fellow Perler to find the thread you are starting,
then even asking a question helps us all.
Use an effective followup style
When composing a followup, quote only enough text to establish the
context for the comments that you will add. Always indicate who
wrote the quoted material. Never quote an entire article. Never
quote a .signature (unless that is what you are commenting on).
Intersperse your comments *following* each section of quoted text to
which they relate. Unappreciated followup styles are referred to as
"Jeopardy" (because the answer comes before the question), or
"TOFU".
Reversing the chronology of the dialog makes it much harder to
understand (some folks won't even read it if written in that style).
For more information on quoting style, see:
http://web.presby.edu/~nnqadmin/nnq/nquote.html
Speak Perl rather than English, when possible
Perl is much more precise than natural language. Saying it in Perl
instead will avoid misunderstanding your question or problem.
Do not say: I have variable with "foo\tbar" in it.
Instead say: I have $var = "foo\tbar", or I have $var = 'foo\tbar',
or I have $var = <DATA> (and show the data line).
Ask perl to help you
You can ask perl itself to help you find common programming mistakes
by doing two things: enable warnings (perldoc warnings) and enable
"strict"ures (perldoc strict).
You should not bother the hundreds/thousands of readers of the
newsgroup without first seeing if a machine can help you find your
problem. It is demeaning to be asked to do the work of a machine. It
will annoy the readers of your article.
You can look up any of the messages that perl might issue to find
out what the message means and how to resolve the potential mistake
(perldoc perldiag). If you would like perl to look them up for you,
you can put "use diagnostics;" near the top of your program.
Do not re-type Perl code
Use copy/paste or your editor's "import" function rather than
attempting to type in your code. If you make a typo you will get
followups about your typos instead of about the question you are
trying to get answered.
Provide enough information
If you do the things in this item, you will have an Extremely Good
chance of getting people to try and help you with your problem!
These features are a really big bonus toward your question winning
out over all of the other posts that you are competing with.
First make a short (less than 20-30 lines) and *complete* program
that illustrates the problem you are having. People should be able
to run your program by copy/pasting the code from your article. (You
will find that doing this step very often reveals your problem
directly. Leading to an answer much more quickly and reliably than
posting to Usenet.)
Describe *precisely* the input to your program. Also provide example
input data for your program. If you need to show file input, use the
__DATA__ token (perldata.pod) to provide the file contents inside of
your Perl program.
Show the output (including the verbatim text of any messages) of
your program.
Describe how you want the output to be different from what you are
getting.
If you have no idea at all of how to code up your situation, be sure
to at least describe the 2 things that you *do* know: input and
desired output.
Do not provide too much information
Do not just post your entire program for debugging. Most especially
do not post someone *else's* entire program.
Do not post binaries, HTML, or MIME
clpmisc is a text only newsgroup. If you have images or binaries
that explain your question, put them in a publically accessible
place (like a Web server) and provide a pointer to that location. If
you include code, cut and paste it directly in the message body.
Don't attach anything to the message. Don't post vcards or HTML.
Many people (and even some Usenet servers) will automatically filter
out such messages. Many people will not be able to easily read your
post. Plain text is something everyone can read.
Social faux pas to avoid
The first two below are symptoms of lots of FAQ asking here in clpmisc.
It happens so often that folks will assume that it is happening yet
again. If you have looked but not found, or found but didn't understand
the docs, say so in your article.
Asking a Frequently Asked Question
It should be understood that you may have missed the applicable FAQ
when you checked, which is not a big deal. But if the Frequently
Asked Question is worded similar to your question, folks will assume
that you did not look at all. Don't become indignant at pointers to
the FAQ, particularly if it solves your problem.
Asking a question easily answered by a cursory doc search
If folks think you have not even tried the obvious step of reading
the docs applicable to your problem, they are likely to become
annoyed.
If you are flamed for not checking when you *did* check, then just
shrug it off (and take the answer that you got).
Asking for emailed answers
Emailed answers benefit one person. Posted answers benefit the
entire community. If folks can take the time to answer your
question, then you can take the time to go get the answer in the
same place where you asked the question.
It is OK to ask for a *copy* of the answer to be emailed, but many
will ignore such requests anyway. If you munge your address, you
should never expect (or ask) to get email in response to a Usenet
post.
Ask the question here, get the answer here (maybe).
Beware of saying "doesn't work"
This is a "red flag" phrase. If you find yourself writing that,
pause and see if you can't describe what is not working without
saying "doesn't work". That is, describe how it is not what you
want.
Sending a "stealth" Cc copy
A "stealth Cc" is when you both email and post a reply without
indicating *in the body* that you are doing so.
Be extra cautious when you get upset
Count to ten before composing a followup when you are upset
This is recommended in all Usenet newsgroups. Here in clpmisc, most
flaming sub-threads are not about any feature of Perl at all! They
are most often for what was seen as a breach of netiquette. If you
have lurked for a bit, then you will know what is expected and won't
make such posts in the first place.
But if you get upset, wait a while before writing your followup. I
recommend waiting at least 30 minutes.
Count to ten after composing and before posting when you are upset
After you have written your followup, wait *another* 30 minutes
before committing yourself by posting it. You cannot take it back
once it has been said.
AUTHOR
Tad McClellan <tadmc@augustmail.com> and many others on the
comp.lang.perl.misc newsgroup.
------------------------------
Date: Fri, 14 Mar 2003 17:24:31 +0800
From: "Franklin Lee" <pengtaoli@hotmail.com>
Subject: Re: Printing a 2d array
Message-Id: <b4s74n$oon@netnews.proxy.lucent.com>
for $row(@array)
{
print ("@row\n");
}
or
for $row(@array)
{
for $value(@row)
{
print("$value\n");
}
}
------------------------------
Date: Fri, 14 Mar 2003 10:18:55 +0100
From: "Janek Schleicher" <bigj@kamelfreund.de>
Subject: Re: Printing a 2d array
Message-Id: <pan.2003.03.14.09.18.55.227220@kamelfreund.de>
Franklin Lee wrote at Fri, 14 Mar 2003 17:24:31 +0800:
> for $row(@array)
> {
> print ("@row\n");
^^^^
> }
> or
> for $row(@array)
> {
> for $value(@row)
^^^^
> {
> print("$value\n");
> }
> }
In both cases, you meant a
@$row
instead of @row !
Greetings,
Janek
------------------------------
Date: 13 Mar 2003 23:09:03 -0800
From: pynex@gmx.de (Pynex)
Subject: Re: remove anything from string except two words
Message-Id: <d57585e5.0303132309.2a1d1ca6@posting.google.com>
Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in message news:<b4q6h5$22m8lm$1@ID-184292.news.dfncis.de>...
> Pynex wrote:
> >
> > So I don't know what to do (again).
>
> I do know what you should do: You should start studying perlre, in order
> to get some basic understanding of regular expressions, and then try to
> figure out one or two details by yourself. ;-)
>
> http://www.perldoc.com/perl5.8.0/pod/perlre.html
>
> / Gunnar
O.K. You're right, of course.
but sometimes it isn't easy to find something if you don't know how to
say it.
You've seen that my postings..... i know what i want, but have
problems to say it in english. And if you don't know how to say
something, it very difficult to find information about it.
i've searched several for a solution for my problem and i'm very happy
that
there are people that helped me. and if someone helped you, isn't it
normal that you ask him again, if there are some problems more that
are similar to the first one ?
it was not my intention to anger you, so i'm sorry again !
but now i'm using your link to find it out by myself.
------------------------------
Date: Fri, 14 Mar 2003 06:37:01 GMT
From: Juha Laiho <Juha.Laiho@iki.fi>
Subject: Re: What's wrong with the Perl docs
Message-Id: <b4rt61$ej$2@ichaos.ichaos-int>
helgi@decode.is said:
(quoting someones web page)
>>References and tutorials are still mixed up
>>Not all functions have examples
Btw, am I the only one thinking there's a slight conflict between these
two? Do extensive examples belong to a reference document? (of course,
in some cases it's easier to document the functionality of something by
an example - there an example in the ref.doc might be in place)
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
------------------------------
Date: Fri, 14 Mar 2003 07:41:40 +0000 (UTC)
From: "Bernard El-Hagin" <bernard.el-hagin@DODGE_THISlido-tech.net>
Subject: Re: What's wrong with the Perl docs
Message-Id: <Xns933E57B2DB9Felhber1lidotechnet@62.89.127.66>
Abigail wrote:
[...]
> ++ * Perldoc tool should be improved
>
> Should it perform sexual favours?
/me raises hand meekly
Ummm, I'd like that one, please. :)
--
Cheers,
Bernard
--
echo 42|perl -pe '$#="Just another Perl hacker,"'
------------------------------
Date: Fri, 14 Mar 2003 10:28:40 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: What's wrong with the Perl docs
Message-Id: <3e71ada3.3019009916@news.cis.dfn.de>
On Thu, 13 Mar 2003 19:59:13 -0600, "Eric J. Roode"
<REMOVEsdnCAPS@comcast.net> wrote:
>> Your question sounds to me like "How can you drive a car if you
>> don't understand English anyway?".
More like, "How can you enjoy a Monty Python sketch if you
don't understand English?". The Silly Walks sketch works
fine, the Dead Parrot less so.
>> The professor who taughed me how to program said of Pascal: the
>> programming language isn't in English. It just have keywords that
>> happen to look like English words.
"happen to"? I think not. They don't just "happen to" look
like English words. They "are" English words, explicitly
chosen for the purpose of having a semantic meaning as
close as humanly possible to their intended function.
That's not pure happenstance.
>I wonder how hard it would be to write source code filters to map the
>keywords into a different language?
Easy for some languages, extremely hard for others.
Icelandic for example, does not map onto English
very well at all.
--
Regards, Helgi Briem
helgi AT decode DOT is
------------------------------
Date: Fri, 14 Mar 2003 10:35:01 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: What's wrong with the Perl docs
Message-Id: <3e71b023.3019650587@news.cis.dfn.de>
On Fri, 14 Mar 2003 02:17:11 GMT, Andras Malatinszky
<nobody@dev.null> wrote:
>> ++ * Some FAQ entries are too complicated, leading to 'cargo cult code'
>>
>Time out. What is 'cargo cult'? I thought it was just a godzillaism...
No, it's not. See
http://jargon.watson-net.com/jargon.asp?w=cargo+cult+programming
for details.
It that should not be named, uses the term a lot, but
in an erroneous way as it does most things.
--
Regards, Helgi Briem
helgi AT decode DOT is
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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.
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 V10 Issue 4709
***************************************