[23927] in Perl-Users-Digest
Perl-Users Digest, Issue: 6128 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 13 09:05:39 2004
Date: Fri, 13 Feb 2004 06: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, 13 Feb 2004 Volume: 10 Number: 6128
Today's topics:
Re: Broken Pipe (Jon Landenburer)
Re: configure, WIN32 <kalinaubears@iinet.net.au>
Re: hidden perl (Randal L. Schwartz)
Re: if for... <bik.mido@tiscalinet.it>
Is Windows running <chris.arnottHATESSPAM@uk.lionbioscience.com>
Re: Is Windows running <noreply@gunnar.cc>
Re: Is Windows running (Sam Holden)
Re: Is Windows running <mr@sandman.net>
Re: One more running Perl as a service question <ThomasKratz@REMOVEwebCAPS.de>
Re: perl and db-module <usenet@morrow.me.uk>
Posting Guidelines for comp.lang.perl.misc ($Revision: tadmc@augustmail.com
Re: Problem opening sed pipe <tadmc@augustmail.com>
Re: Problems with version 5.8.0 on OS/2 <nospam-abuse@ilyaz.org>
Re: strange behaviour with map inside a hash <bik.mido@tiscalinet.it>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 13 Feb 2004 05:51:30 -0800
From: jon.m.landenburger@verizon.com (Jon Landenburer)
Subject: Re: Broken Pipe
Message-Id: <feee7535.0402130551.4eec3d76@posting.google.com>
Thanks.
As mentioned later the $SIG{PIPE} = _IGNORE_; would not work
and it did not work
but the trap "" 13 did
Thanks much.
I have'nt done anything with either SIG or the trapping of errs but
can see its utility
thanks again
JONL
------------------------------
Date: Fri, 13 Feb 2004 19:51:39 +1100
From: Sisyphus <kalinaubears@iinet.net.au>
Subject: Re: configure, WIN32
Message-Id: <402c9118$0$1749$5a62ac22@freenews.iinet.net.au>
Torsten Mohr wrote:
> Hi,
>
> i'd like to compile Perl on WIN32, i already did that by
> using the supplied Makefile for "nmake" and it went fine.
>
> But i'd like to pass some additional parameters to the
> compile process.
>
> Is there a way to pass some more parameters to "configure"
> on WIN32?
>
> Do i need to use MinGW then?
>
Have you ruled out Cygwin for this ? Strikes me that it's probably your
best chance of success. See 'README.cygwin' in the perl source distro.
If you're committed to native Win32, and thinking of starting with
'./configure', then look at using the Mingw compiler in an MSYS shell -
but I don't fancy your chances with this approach.
Cheers,
Rob
--
To reply by email u have to take out the u in kalinaubears.
------------------------------
Date: Fri, 13 Feb 2004 11:52:16 GMT
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: hidden perl
Message-Id: <14ceef327ee2f436de3b3fbc029c149b@news.teranews.com>
>>>>> "Jürgen" == Jürgen Exner <jurgenex@hotmail.com> writes:
Jürgen> You won't believe this coincidence, but _two_ namesakes of yours posted
Jürgen> exactly the same question to alt.perl and comp.lang.perl just a few minutes
Jürgen> ago.
Jürgen> You may want to check there for answers.
But don't check in "comp.lang.perl", because it doesn't exist.
Really.
It was removed nearly 10 years ago, in the same act that created
comp.lang.perl.misc, comp.lang.perl.moderated, comp.lang.perl.tk,
and comp.lang.perl.announce.
If your ISP carries it, please tell them they are not doing their job.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Fri, 13 Feb 2004 09:21:40 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: if for...
Message-Id: <gm1p20pv98ab6jp245fcor8hgf877kjbs4@4ax.com>
On Wed, 11 Feb 2004 22:18:30 +0000 (UTC), Ben Morrow
<usenet@morrow.me.uk> wrote:
>Michele Dondi <bik.mido@tiscalinet.it> wrote:
>> On Wed, 11 Feb 2004 16:28:39 -0500, Robert Wallace <robw@sofw.org>
>> wrote:
>>
>> >why can't I:
>> >foreach (@arr) if (m/str/) {
>>
>> for (@arr) {
>> whatever() if /str/;
>> }
>>
>> /str/ and whatever() for @arr;
>
>Nonononono. You want to test the condition outside the loop, not loop
>over every elt in the list only to do nothing.
Ben, once again I stand corrected by you! Of course if the OP wants to
test the condition outside of the loop, and after it, with a statement
modifier, he may consider using a do block. But in most cases I can't
see what he could gain by doing this in terms of readability.
However the point is that the existing Perl flow control constructs
and their syntax already provide a flexible tools to write quite
readable code. I think we all agree on this...
Michele
Michele
--
you'll see that it shouldn't be so. AND, the writting as usuall is
fantastic incompetent. To illustrate, i quote:
- Xah Lee trolling on clpmisc,
"perl bug File::Basename and Perl's nature"
------------------------------
Date: Fri, 13 Feb 2004 10:22:29 -0000
From: "Chris Arnott" <chris.arnottHATESSPAM@uk.lionbioscience.com>
Subject: Is Windows running
Message-Id: <Gz1Xb.6$8G.55@psinet-eu-nl>
Hello and thanks for any help in advance.
I've written a perl script which connects to the machines in our domain and
creates a software installed type report. The problem is some of our users
have dual boot laptops, win2k/linux, and if the user is in linux the script
fails.
So, does anyone know of a good way to determine if Windows is not the
present operating system on a running machine.
Thanks,
Chris Arnott.
------------------------------
Date: Fri, 13 Feb 2004 11:27:20 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Is Windows running
Message-Id: <c0i945$15sobp$1@ID-184292.news.uni-berlin.de>
Chris Arnott wrote:
> So, does anyone know of a good way to determine if Windows is not
> the present operating system on a running machine.
http://www.perldoc.com/perl5.8.0/pod/perlvar.html#$^O
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 13 Feb 2004 11:00:35 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: Is Windows running
Message-Id: <slrnc2pbij.hc7.sholden@flexal.cs.usyd.edu.au>
On Fri, 13 Feb 2004 10:22:29 -0000,
Chris Arnott <chris.arnottHATESSPAM@uk.lionbioscience.com> wrote:
> Hello and thanks for any help in advance.
>
> I've written a perl script which connects to the machines in our domain and
> creates a software installed type report. The problem is some of our users
> have dual boot laptops, win2k/linux, and if the user is in linux the script
> fails.
>
> So, does anyone know of a good way to determine if Windows is not the
> present operating system on a running machine.
perldoc -q operating system
Found in /usr/share/perl/5.8/pod/perlfaq8.pod
How do I find out which operating system I'm running under?
Which part of the answer to that FAQ did you not understand?
--
Sam Holden
------------------------------
Date: Fri, 13 Feb 2004 13:13:30 +0100
From: Sandman <mr@sandman.net>
Subject: Re: Is Windows running
Message-Id: <mr-F4D579.13133013022004@news.cis.dfn.de>
In article <slrnc2pbij.hc7.sholden@flexal.cs.usyd.edu.au>,
sholden@flexal.cs.usyd.edu.au (Sam Holden) wrote:
> > I've written a perl script which connects to the machines in our domain and
> > creates a software installed type report. The problem is some of our users
> > have dual boot laptops, win2k/linux, and if the user is in linux the script
> > fails.
> >
> > So, does anyone know of a good way to determine if Windows is not the
> > present operating system on a running machine.
>
> perldoc -q operating system
>
> Found in /usr/share/perl/5.8/pod/perlfaq8.pod
> How do I find out which operating system I'm running under?
>
> Which part of the answer to that FAQ did you not understand?
Sarcasm and insults aside, my interpretation of the problem was that he wanted
to run a script on machine A that connects to machine B, C and D, but only if
they are running Windows.
Presumably, he is well aware of what operating system he is using on machine A.
Chris, is there any common factor to the linux installations? I.e. do all use
the SSH deamon, so you could beforehand try to connect to port 22, and if you
get an answer, you'll know they are running Linux.
Alternatively, if the Windows machines have RDC activated, surely this can be
checked over the network?
--
Sandman[.net]
------------------------------
Date: Fri, 13 Feb 2004 13:22:27 +0100
From: Thomas Kratz <ThomasKratz@REMOVEwebCAPS.de>
Subject: Re: One more running Perl as a service question
Message-Id: <402cc27c.0@juno.wiesbaden.netsurf.de>
Herb Martin wrote:
> I think Ben is still correct that you might prefer a two program solutions
> with the
> service acting as server to the other program but....
>
> On a Windows service there is a setting "interact with desktop"; without
> this the
> service may not display anything directly to the user. Check that
> (literally and
> figuratively) and you can probably display a command window depending on
> when and where you want it to appear.
>
By the way: this is only possible if the service runs under the local
system account.
Thomas
--
open STDIN,"<&DATA";$=+=14;$%=50;while($_=(seek( #J~.> a>n~>>e~.......>r.
STDIN,$:*$=+$,+$%,0),getc)){/\./&&last;/\w| /&&( #.u.t.^..oP..r.>h>a~.e..
print,$_=$~);/~/&&++$:;/\^/&&--$:;/>/&&++$,;/</ #.>s^~h<t< ..~. ...c.^..
&&--$,;$:%=4;$,%=23;$~=$_;++$i==1?++$,:_;}__END__#....>>e>r^..>l^...>k^..
------------------------------
Date: Fri, 13 Feb 2004 11:13:46 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: perl and db-module
Message-Id: <c0ibha$ijc$1@wisteria.csv.warwick.ac.uk>
dbent@benefit-systems.com (Dan Bent) wrote:
> non existent <none@nowhere.non> wrote in message news:<pan.2004.02.03.18.51.42.348789@nowhere.non>...
> >
> > I hardly know how to spell perl but in regards to a complied from source
> > cyrus-imapd that was installed in the default /usr/local location I was
> > able to: 'export
> > PERL5LIB=/usr/local/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi'
> > thereby adding this path to perl's @INC and working around the
> > problem.
>
> I am also perl impaired.
An unfortunate state to be in, to be sure; but I believe it's curable :).
> I'm having the same problem on FreeBSD 5.1-RELEASE, and perl
> 5.8.3. I tried the solution above (at least I think I did - I
> exported the environment variable, adjusted to match my system, and
> ran cyradm. I didn't compile anything with the environment variable
> set
That shouldn't be necessary: if the compilation succeeded, it found
everything it needed anyway.
> ), but got the same result. There's a comment
> near line 229 in DynaLoader.pm:
>
> # Many dynamic extension loading problems will appear to come from
[ dynamic-extension loading-problems, but never mind... :) ]
> # this section of code: XYZ failed at line 123 of DynaLoader.pm.
> # Often these errors are actually occurring in the initialisation
> # C code of the extension XS file. Perl reports the error as being
> # in this perl code simply because this was the last perl code
> # it executed.
>
> Sorry I'm no help, but I'd like to learn the solution, myself.
Right, what was the *exact* error message you got? Usually it's
something like (example taken from a module I'm working on at the
moment)
Can't load '.../auto/Hook/CallStack/CallStack.so' for module
Hook::CallStack: .../auto/Hook/CallStack/CallStack.so: undefined
symbol: SvSetSv_nosteal at .../DynaLoader.pm line 229.
If it is like this, the name of the undefined symbol is a big clue as
to where the problem lies.
Ben
--
It will be seen that the Erwhonians are a meek and long-suffering people,
easily led by the nose, and quick to offer up common sense at the shrine of
logic, when a philosopher convinces them that their institutions are not based
on the strictest morality. [Samuel Butler, paraphrased] ben@morrow.me.uk
------------------------------
Date: Fri, 13 Feb 2004 02:22:19 -0600
From: tadmc@augustmail.com
Subject: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.5 $)
Message-Id: <deednal3U76mFLHdRVn_iw@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.5 $)
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.
The article at:
http://www.catb.org/~esr/faqs/smart-questions.html
describes how to get answers from technical people in general.
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
"top-posting", "Jeopardy" (because the answer comes before the
question), or "TOFU" (Text Over, Fullquote Under).
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, 13 Feb 2004 06:27:10 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Problem opening sed pipe
Message-Id: <slrnc2pgku.48s.tadmc@magna.augustmail.com>
freewilly3d <bill.standke@medica.com> wrote:
> open(SASPS,"ps -
> ef|sed 's/^\(.\{32\}\) /\1/; s/^ *$/*/'|grep sas| sort +0 -1 -d +7 -
> 8 -d +4 -5 -d +6 -7 -d |")
> any suggestions?
Print out the argument that you are passing to open().
Then read up on the $/ variable.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 13 Feb 2004 10:33:47 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: Problems with version 5.8.0 on OS/2
Message-Id: <c0i96b$j7q$1@agate.berkeley.edu>
[A complimentary Cc of this posting was sent to
David Smith
<ac063@lafn.org>], who wrote in article <f96d4b88.0402121354.3dcce614@posting.google.com>:
> Is anyone out there running this version of Perl on OS/2? I am trying to
> install it (obtained from Hobbes), and am encountering some problems.
>
> I have the following files
>
> perl-5.8.0-bin-aout.zip
> perl-5.8.0-bin.zip
> perl-5.8.0-core.zip
> perl-5.8.0-doc.zip
>
> and am unable to execute programs. I believe my problem is with a
> thing called @INC. According to @INC, this version of Perl was built
> with a target drive of L:. I want to change this to D:. If I
> understand correctly, the PERLLIB_PREFIX statement placed (as one
> option) in the config.sys (which I have done) should override the
> prebuilt target drive with one of my choosing. I have "set
> PERLLIB_PREFIX = L:/Perl/lib;D:\Perl\lib" in my config.sys. Entering
> "set" at a command promt verifies this. However, this doesn't work.
Automatic installer should have set this for you. With wrapping of
your post, it is hard to understand whether your set statement is
correct. PERLLIB_PREFIX is not case-sensitive, so this should not be
the problem, though. Please report your @INC and the value of
$ENV{PERLLIB_PREFIX}.
Note also that 5.8.2+ has much better handling of PERLLIB_PREFIX; keep
in mind, though, that the configuration failes for the binary
installer on CPAN is botched, and the replacement sits in a wrong
directory. ;-( Use ilyaz.org/software/tmp/plINSTAL-fixed.zip instead.
Hope this helps,
Ilya
------------------------------
Date: Fri, 13 Feb 2004 09:21:39 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: strange behaviour with map inside a hash
Message-Id: <qk0p209uequ17kep5komo1fpd3kkvqadhu@4ax.com>
On Thu, 12 Feb 2004 08:46:31 -0500, "Christian Caron"
<nospam@nospam.org> wrote:
>> my %conversion = ('%W' => [ map { whatever } @whatever ],
>> # ^ ^
>> ...
>
>That would return a hash of arrays for the first item, which is not exactly
>what I was looking for. But thanks anyway!
Uri gave you a better answer pointing out that you didn't need a map()
at all, what that I did in fact suspect. Most reasonably a map() on
the right side of a => in a hash logically fits well in a anonymous
array. Of course you can also use map() on a list containing only one
element, but then there would probably be better ways to do it...
Michele
--
you'll see that it shouldn't be so. AND, the writting as usuall is
fantastic incompetent. To illustrate, i quote:
- Xah Lee trolling on clpmisc,
"perl bug File::Basename and Perl's nature"
------------------------------
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 6128
***************************************