[24276] in Perl-Users-Digest
Perl-Users Digest, Issue: 6467 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 26 09:05:49 2004
Date: Mon, 26 Apr 2004 06:05:08 -0700 (PDT)
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, 26 Apr 2004 Volume: 10 Number: 6467
Today's topics:
Re: assigning variable to a pipe (mike)
backslash in hash keys (Marko Riedel)
Re: convert graphic file to x,y coordinates <mr@sandman.net>
Re: convert graphic file to x,y coordinates <nospam@bigpond.com>
Re: convert graphic file to x,y coordinates <spamtrap@dot-app.org>
Re: convert graphic file to x,y coordinates <jurgenex@hotmail.com>
Re: Difficult regular expression problem! <mr@sandman.net>
Re: Difficult regular expression problem! <noreply@gunnar.cc>
Re: Difficult regular expression problem! (Anno Siegel)
Re: Difficult regular expression problem! <noreply@gunnar.cc>
Re: Difficult regular expression problem! <noreply@gunnar.cc>
Re: Difficult regular expression problem! (Anno Siegel)
Re: Help! How to find memory leak? <tadmc@augustmail.com>
Re: Help! How to find memory leak? (Sam Holden)
Re: How can I create a PDF page with only Images (EPS & <Eric@nospam.com>
Re: How can I create a PDF page with only Images (EPS & (JRB)
Re: is there a way ..... any way <lawshouse.public@btconnect.com>
Re: is there a way ..... any way <tadmc@augustmail.com>
Re: other perl groups <cwilbur@mithril.chromatico.net>
Re: other perl groups <tassilo.parseval@rwth-aachen.de>
Re: other perl groups <noreply@gunnar.cc>
PAR, pp and script packing (Asier)
Re: regexp quick reference card <Bo_Johanson_nojunkmail@hotmail.com>
Re: slurp not working? ideas please! <geoffacox@dontspamblueyonder.co.uk>
Re: variable interpolation failed :-( (Chris Marshall)
Re: variable interpolation failed :-( <tadmc@augustmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 26 Apr 2004 05:18:43 -0700
From: s99999999s2003@yahoo.com (mike)
Subject: Re: assigning variable to a pipe
Message-Id: <dfd17ef4.0404260418.794974ca@posting.google.com>
James Willmore <jwillmore@remove.adelphia.net> wrote in message news:<pan.2004.04.24.15.07.05.347919@remove.adelphia.net>...
> On Fri, 23 Apr 2004 22:55:25 -0700, mike wrote:
> [ ... ]
>
> > PS:
> > The original code was
> > open SQL, "| sql -Uuser -Sserver -Ppassword " or die "Failed to open pipe: $!" ;
> > print SQL "select \* from this_table";
> > and the intention was to assign the output to a variable
>
> Is there some reason why you're not using the DBI module to interact with
> your database (http://search.cpan.org/~timb/DBI-1.42/DBI.pm)? I see from
> your code example that's what you *really* want to do.
>
> Just my $0.02
> HTH
>
> --
> Jim
>
> Copyright notice: all code written by the author in this post is
> released under the GPL. http://www.gnu.org/licenses/gpl.txt
> for more information.
>
> a fortune quote ...
> Arithmetic is being able to count up to twenty without taking
> off your shoes. -- Mickey Mouse
hi
i managed to solve the problem. Just need to close the handle "Writer" before
doing the reading. I did not use DBI.pm because i have trouble installing the
module. I am using Solaris and the perl version is 5.005. My C compiler is
not gcc but proprietary C package from Sun.
------------------------------
Date: 26 Apr 2004 14:52:37 +0200
From: mriedel@neuearbeit.de (Marko Riedel)
Subject: backslash in hash keys
Message-Id: <m2llkivr3e.fsf@linuxsexi.nasttg>
Hi folks,
it seems that "exists" does not work on hash keys that begin with a
backslash, but grep on the keys finds the key. (These keys occur
e.g. when working with IMAP message flags.)
Would someone explain, please?
[PROMPT]> perl -e '%h=qw/A 1 B 2/; print "yes\n" if exists($h{B});'
yes
[PROMPT]> perl -e '%h=qw/\A 1 \B 2/; print "yes\n" if exists($h{\B});'
[PROMPT]> perl -e '%h=qw/\A 1 \B 2/; print "yes\n" if grep('\B', keys %h);'
yes
perl -v
This is perl, v5.8.0 built for i586-linux-thread-multi
Copyright 1987-2002, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.
Best regards,
--
+------------------------------------------------------------+
| Marko Riedel, EDV Neue Arbeit gGmbH, mriedel@neuearbeit.de |
| http://www.geocities.com/markoriedelde/index.html |
+------------------------------------------------------------+
------------------------------
Date: Mon, 26 Apr 2004 12:27:33 +0200
From: Sandman <mr@sandman.net>
Subject: Re: convert graphic file to x,y coordinates
Message-Id: <mr-B53AA0.12273326042004@news.fu-berlin.de>
In article <56568be5.0404260151.603d47bf@posting.google.com>,
mike_solomon@lineone.net (Mike Solomon) wrote:
> I need to take a graphics file and then get the xy coordinates from it
> and insert them into a database
>
> so far the best way I have come up with is to use paint to get the
> cordinates and manually record them in a spreadsheet
>
> Is there any way I can use perl to read the graphics file and get the
> co-ordinates
>
> I am probably being optimistic but doing it manually is driving me mad
> :)
Try ImageMagick.
~> identify -verbose 1.jpg |grep Geometry
Geometry: 1600x1200
Use perl to parse the " Geometry: 1600x1200" line.
There is also a ImageMagick library for perl, but I haven't used it.
--
Sandman[.net]
------------------------------
Date: Mon, 26 Apr 2004 21:12:59 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: convert graphic file to x,y coordinates
Message-Id: <1642526.6kQhvXxZPh@GMT-hosting-and-pickle-farming>
Mike Solomon wrote:
> I need to take a graphics file and then get the xy coordinates from it
> and insert them into a database
>
> so far the best way I have come up with is to use paint to get the
> cordinates and manually record them in a spreadsheet
>
> Is there any way I can use perl to read the graphics file and get the
> co-ordinates
>
> I am probably being optimistic but doing it manually is driving me mad
> :)
Have a look at http://search.cpan.org/~lds/GD-2.12/GD.pm
Try reading in an image:
$image = GD::Image->newFromJpegData($data, [$truecolor])
$image = GD::Image->newFromPng($file, [$truecolor])
(there may be an earlier GD version that works wiht gifs)
then get the pixels
$image->getPixel(x,y)
Buy why dont you insert the whole image into the database as a binary
object?
gtomey
------------------------------
Date: Mon, 26 Apr 2004 08:42:31 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: convert graphic file to x,y coordinates
Message-Id: <VsudnUCMY8UknhDdRVn-gg@adelphia.com>
Mike Solomon wrote:
> I need to take a graphics file and then get the xy coordinates from it
> and insert them into a database
What do you mean by "xy coordinates" - the size of the image?
If so, why didn't you try searching for "image size" on CPAN? Doing so would
have shown you the Image::Size module. It can read data from a file name,
an in-memory buffer, or an open file handle, and supports most common image
formats.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Mon, 26 Apr 2004 12:51:10 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: convert graphic file to x,y coordinates
Message-Id: <2B7jc.42527$G_.20143@nwrddc02.gnilink.net>
Mike Solomon wrote:
> I need to take a graphics file and then get the xy coordinates from it
> and insert them into a database
What kind of graphics file are you talking about? Vector graphic? Bitmap?
BMP? JPEG? GIF? PNG? Or any other of the hundreds of lesser known formats?
For some of them you should be able to find a parser on CPAN.
If it is a vector graphic format then it should be easy to get to the xy
coordinates of whatever objects you are after in your graphic (you didn't
tell us, either).
However, if you are after the xy-coordinates of objects in bitmap graphics,
then the last time I checked that was still a very active research area and
requires quite complex picture analysis and a lot of good guesses by the
program. I doubt that there is anything on CPAN (although you never know)
and actually Perl might not be the best tool for this kind of highly
numerical analysis.
jue
------------------------------
Date: Mon, 26 Apr 2004 12:16:12 +0200
From: Sandman <mr@sandman.net>
Subject: Re: Difficult regular expression problem!
Message-Id: <mr-26F3A9.12161226042004@news.fu-berlin.de>
In article <a9c0aa9e.0404260126.7ba87761@posting.google.com>,
fritz-bayer@web.de (Fritz Bayer) wrote:
> Hello,
>
> I have the problem that the regular expression (word1|word2|word3)? is
> not being recalled when later being referenced using $1.
>
> Here a very simple example:
>
> $context = "This is a very simple sentence. Always, the second up to
> the last word of this sentence should be captured!"
>
> $content =~ s/(simple|easy|plain|simplitic)?.*Always(.*)captured!/
> print($1 . "\n")/iesg;
>
> Now, I would expect this to be printing out "simple" followed by ",
> the second up to the last word of this sentence should be " to the
> console.
First, you're doing the substitute on $content, while the string is in
$context. Secondly, why do a substitute at all? Why not just match the words
you're looking for?
#!/usr/bin/perl
use strict;
use warnings;
my $string = "This is a very simple sentence. Always, the second up to the last
word of this sentence should be captured!";
if ($string =~m/^.*?(simple|easy|plain|simplistic).*?Always(.*)captured!$/i){
print "$1$2\n";
}
__END__
Output: simple, the second up to the last word of this sentence should be
But the above matches this particular string, not the rules the string claims
should be parsed (i.e not the second up til the last) you may want to try
something like this:
#!/usr/bin/perl
use strict;
use warnings;
my $string = "This is a very simple sentence. Always, the second up to the last
word of this sentence should be captured!";
if ($string =~m/^.*?(simple|easy).*?\. [^\s]*?\s(.*?)\s[^\s]*?$/i){
print "$1 $2\n";
}
__END__
Output: simple the second up to the last word of this sentence should be
(note that variations of 'simple' was removed to fit into linelength
--
Sandman[.net]
------------------------------
Date: Mon, 26 Apr 2004 12:24:39 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Difficult regular expression problem!
Message-Id: <c6io62$c4icl$1@ID-184292.news.uni-berlin.de>
Fritz Bayer wrote:
> I have the problem that the regular expression (word1|word2|word3)?
> is not being recalled when later being referenced using $1.
>
> Here a very simple example:
>
> $context = "This is a very simple sentence. Always, the second up
> to the last word of this sentence should be captured!"
>
> $content =~ s/(simple|easy|plain|simplitic)?.*Always(.*)captured!/
> print($1 . "\n")/iesg;
If capturing things is what you want to do, why are you using the s///
operator?
> Now, I would expect this to be printing out "simple" followed by ",
> the second up to the last word of this sentence should be " to the
> console.
Why would it print $2 if you don't tell it to do so?
> However, this does not happen. I used $& to look at what gets
> matched and it seems nothing at all.
I would disagree. The regex matches, and $2 has content.
> If I take the question mark out - then the expresson matches, but
> the problem is, that I also want the the following variation of the
> above sentence to match:
>
> "$context = "This is a very STUPID sentence. Always, the second up
> to the last word of this sentence should be captured!"
Okay. Using ? in combination with .* seems not to be a good idea.
Maybe you should use two regexes, testing the presence of "simple"
etc. separately:
my ($word) = $content =~ /(simple|easy|plain|simplitic).*Always/;
print "Found ", ($word ? "'$word'" : 'nothing'),
" before 'Always'.\n";
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 26 Apr 2004 11:09:53 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Difficult regular expression problem!
Message-Id: <c6iqm1$hmg$1@mamenchi.zrz.TU-Berlin.DE>
Fritz Bayer <fritz-bayer@web.de> wrote in comp.lang.perl.misc:
> Hello,
>
> I have the problem that the regular expression (word1|word2|word3)? is
> not being recalled when later being referenced using $1.
>
> Here a very simple example:
>
> $context = "This is a very simple sentence. Always, the second up to
^
That should be "$content", as has been noted.
> the last word of this sentence should be captured!"
>
> $content =~ s/(simple|easy|plain|simplitic)?.*Always(.*)captured!/
> print($1 . "\n")/iesg;
>
> Now, I would expect this to be printing out "simple" followed by ",
> the second up to the last word of this sentence should be " to the
> console.
First off, you seem to think that "print" returns the string printed.
It doesn't. See "perldoc -f print". Further, there is no way for the
text from the second capture to show up in the replacement. It is
captured in $2, which is nowhere mentioned. Third, why are you using
/g on the substitution? It's not going to do anything.
> However, this does not happen. I used $& to look at what gets matched
> and it seems nothing at all.
Then simplify the problem. Why are you still working with a series of
alternatives for the first match? "simple" would suffice for a test.
Why are you testing with a two-line string (and need /s in consequence)?
Make is a single line and leave off /s.
> If I take the question mark out - then the expresson matches, but the
> problem is, that I also want the the following variation of the above
> sentence to match:
The question mark allows the *following* ".*" to match the whole sentence.
After that, "Always" won't match any more, so the whole match fails.
Make ".*" non-greedy by placing a "?" after it, and it matches again.
> "$context = "This is a very STUPID sentence. Always, the second up to
> the last word of this sentence should be captured!"
>
> The reason is, that I want to capture any expressoin which matches the
> regular expression:
>
> Always(.*)variations!
>
> Now, if this regular expression is precedded by one of the words in
> the list, then I would like to know about it and capture/print it out.
>
> Do you know the a regular expression to achieve this?
Apparently you are trying to write a substitution (not just a regex),
that does this along the way. If that doesn't succeed, simplify the
problem. Study the regex part by itself until it matches what you want.
Then base a substitution on that result. You won't need /e in the
final solution, far less "print".
Anno
------------------------------
Date: Mon, 26 Apr 2004 13:27:42 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Difficult regular expression problem!
Message-Id: <c6irsd$cdsts$1@ID-184292.news.uni-berlin.de>
Anno Siegel wrote:
> Fritz Bayer wrote:
>> If I take the question mark out - then the expresson matches, but
>> the problem is, that I also want the the following variation of
>> the above sentence to match:
>
> The question mark allows the *following* ".*" to match the whole
> sentence.
Yes, if you are talking about the first sentence.
> After that, "Always" won't match any more, so the whole match
> fails. Make ".*" non-greedy by placing a "?" after it, and it
> matches again.
Not true. "Always" always matches. Making the first ".*" non-greedy
makes no difference, since there is only one "Always".
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Mon, 26 Apr 2004 13:33:41 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Difficult regular expression problem!
Message-Id: <c6is7h$cg7ta$1@ID-184292.news.uni-berlin.de>
Gunnar Hjalmarsson wrote:
> Making the first ".*" non-greedy makes no difference, since there
> is only one "Always".
I believe you could add: Changing greediness *never* makes a regex
match that didn't match before you changed greediness - and vice
versa. Greediness may make a difference with respect to *what* is
being matched.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 26 Apr 2004 11:45:26 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Difficult regular expression problem!
Message-Id: <c6isom$hmg$2@mamenchi.zrz.TU-Berlin.DE>
Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in comp.lang.perl.misc:
> Anno Siegel wrote:
> > Fritz Bayer wrote:
> >> If I take the question mark out - then the expresson matches, but
> >> the problem is, that I also want the the following variation of
> >> the above sentence to match:
> >
> > The question mark allows the *following* ".*" to match the whole
> > sentence.
>
> Yes, if you are talking about the first sentence.
>
> > After that, "Always" won't match any more, so the whole match
> > fails. Make ".*" non-greedy by placing a "?" after it, and it
> > matches again.
>
> Not true. "Always" always matches. Making the first ".*" non-greedy
> makes no difference, since there is only one "Always".
You are right. Trying to explain an effect that doesn't exist leads
to spurious explanations.
Anno
------------------------------
Date: Mon, 26 Apr 2004 07:34:57 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Help! How to find memory leak?
Message-Id: <slrnc8q0fh.ovs.tadmc@magna.augustmail.com>
Sam Holden <sholden@flexal.cs.usyd.edu.au> wrote:
> the OP didn't
> use the word "leak" anyway, so I can't see how it matters.
I don't read the Subject header either.
:-)
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 26 Apr 2004 12:46:06 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: Help! How to find memory leak?
Message-Id: <slrnc8q14e.l2u.sholden@flexal.cs.usyd.edu.au>
On Mon, 26 Apr 2004 07:34:57 -0500, Tad McClellan <tadmc@augustmail.com> wrote:
> Sam Holden <sholden@flexal.cs.usyd.edu.au> wrote:
>
>
>> the OP didn't
>> use the word "leak" anyway, so I can't see how it matters.
>
>
> I don't read the Subject header either.
>
>:-)
The subject header doesn't count as part of the post.
That's my story, and I'm sticking to it.
--
Sam Holden
------------------------------
Date: Mon, 26 Apr 2004 11:57:48 +0100
From: Eric <Eric@nospam.com>
Subject: Re: How can I create a PDF page with only Images (EPS & TIFF)
Message-Id: <OW5jc.23824$4N3.15419@newsfe1-win>
Aqua wrote:
> Hello Group,
>
> I have lot of EPS and TIFF images that needs to be manually verified.
> So I wanted to create a PDF with those images.
The simple way is to make a document with all the images included and then
run out the PS and use GS to make the PDF.
The document that you use depends on your skill. Either use Quark or
Pagemaker with some scripting to include the images into your document.
Or you could use LaTeX: create a galley using perl and then runout.
Or you could write manual PostScript using Perl. This would require some
work, but then it would be quite portable.
Eric.
------------------------------
Date: 26 Apr 2004 04:00:51 -0700
From: jrboulay@free.fr (JRB)
Subject: Re: How can I create a PDF page with only Images (EPS & TIFF)
Message-Id: <18f7b572.0404260300.4df06e09@posting.google.com>
You can try the free Photoshop Album (Starter edition) :
http://www.adobe.com/support/downloads/detail.jsp?ftpID=2176
------------------------------
Date: Mon, 26 Apr 2004 13:29:11 +0100
From: Henry Law <lawshouse.public@btconnect.com>
Subject: Re: is there a way ..... any way
Message-Id: <hmvp80p7hapk2qeu3bgnt33rlt2hk5hhtq@4ax.com>
On Sun, 25 Apr 2004 20:42:51 -0500, Tad McClellan
<tadmc@augustmail.com> wrote:
>Perhaps you have been looking at reference docs when what you
>need it a tutorial?
>
>If you have programmed in any other language, I recommend "Learning Perl".
>
>If not, I recommend "Elements of Programming with Perl".
This is a vital point, Andries. Over the years I've acquired a fair
familiarity with a number of programming languages, and have mostly
taught myself from reference manuals, tutorial books and reading other
people's code (a vital resource). I had found that, in general, a
reference manual was enough to get me going: my basic knowledge of the
things that *should* be possible, plus a reference manual to show me
how those things were done in language "x", would be enough to get me
going, after which reading good code provided the refinement. (OK,
OK, that didn't work for APL, but that's another story!)
When I turned to Perl about a year ago, though, I found that this way
of learning was absolutely not enough. It's no criticism (in fact it
may be a compliment) but the reference manuals won't teach you how to
program properly in Perl, at least not in a sensible time frame. You
*need* the tutorial books that Tad and others have suggested. Try to
do what I did and borrow them, because you may not need them for ever:
but you do need them now! There are some good resources on the net
too. Get Googling and mail me privately if you can't find 'em; I have
some bookmarks.
Keep on keeping on; we'll get there, you and me.
Henry Law <>< Manchester, England
------------------------------
Date: Mon, 26 Apr 2004 07:32:05 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: is there a way ..... any way
Message-Id: <slrnc8q0a5.ovs.tadmc@magna.augustmail.com>
Randal L. Schwartz <merlyn@stonehenge.com> wrote:
>>>>>> "Walter" == Walter Roberson <roberson@ibd.nrc-cnrc.gc.ca> writes:
>
>Walter> As I understand, one part of the reason that people can seem so harsh
>Walter> is that clpm is not really considered to be a newsgroup about how to
>Walter> program in perl, or about how to install perl, and especially not a
>Walter> newsgroup about how to program in general (happening to use perl as the
>Walter> language): clpm is, I understand, considered to be a newsgroup about
>Walter> the perl language itself. For example, one can ask about a particular
>Walter> obscure feature of perl, or talk about the future of perl, but to be
>Walter> "in", you are expected to be talking abstractly. Asking about basic
>Walter> features and how to fix simple programs is, unfortunately, often
>Walter> responded to with what many would think of as hostility.
>
> I think you're missing some of the history of this group.
>
> The biggest problem that CLPM has faced historically is the rise of
> Perl as the CGI language of choice, being a bright shiny object for
> tens of thousands of web-squatter-wannabes. The problem is that all
> the Perl resources got slammed pretty heavily in the late 90s, and
> we're still feeling the sting of that.
What makes this Perl newsgroup different other programming language
newsgroups is that Perl sets the bar much lower than say Java or C++.
Here we have both Power Programmers and Non-programmers who
write programs. It's a culture clash between the widely different
backgrounds.
When a non-programmer can't get their Java/C++ "hello world" program
to run, they give up and go elsewhere, and the corresponding newsgroup
doesn't get postings from the Twilight Zone.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 26 Apr 2004 10:44:22 GMT
From: Charlton Wilbur <cwilbur@mithril.chromatico.net>
Subject: Re: other perl groups
Message-Id: <87ekqbni3f.fsf@mithril.chromatico.net>
>>>>> "pfancy" == pfancy <pfancy@bscn.com> writes:
pfancy> Are the any other perl groups who will actually help out
pfancy> people who are NEW to perl.
This one will. Of course, the help you get will most likely be the
help you *need* rather than the help you *want*. No group is going to
be as helpful to a beginner as sitting down for six to eight weeks and
working your way through a good book. No group is going to be as
helpful to a beginner as sitting down for an hour or two a week with a
good teacher. And no group *at all* is going to help you with "write
a program that does this for me, for free."
If you want this group to be helpful, here's what you do.
* Spend at least twenty minutes looking for the answer to your
question in _Learning Perl_, _Elements of Programming with Perl_,
_Programming Perl_, and _The Perl Cookbook_ -- or preferably all
four. If there's an answer there and you ask the question here, all
that will happen here is that you'll be told to RTFM, possibly with
a pointer to the appropriate FM to read. This happens because if
there's already a good explanation of the problem and its solution
somewhere, then it's better to point the querent at that than to
answer it all over again, which takes substantially more time and
effort -- and the help you're getting here is FREE, donated by
VOLUNTEERS.
* Read at least the questions in the Perl FAQ. If your question or
something very similar is there, read the answer. If there's an
answer there and you ask the question here, all that will happen
here is that you'll be told to RTFF, possibly with a pointer to the
appropriate entry to read. This happens for much the same reason:
the FAQ entries are there because many people asked the same
question, and so instead of investing their effort in writing a
hundred different responses, the FAQ authors and maintainers
invested their effort into writing one very good response and
checking it extensively for accuracy.
* If you find the answer somewhere else and don't understand it, by
all means say so, and try to ask specifically about what you don't
understand. This lets people know that (a) you're willing to invest
your own effort and do research on your own, which means you're not
one of the "write my program for me for free!" sorts of posters; and
(b) you'll get responses that aren't just 'RTFM!' because it's clear
that you already have and are asking about something you don't
understand.
* If you've asked a question before and gotten advice, make sure you
are following that advice when you ask your next question. You can
see this trend with Robin: when he first started asking his
questions, people were horrified at the bugs in his code, and
offered advice. Now, several weeks later, he's posting code with
the same bad habits and the same bugs, and the reaction has changed
from horrified but helpful to "shut up and go away, troll who is
unwilling to learn."
* Remember that the people here are volunteers. Many of us are quite
willing to tutor people in Perl, just not for free and not over
Usenet. If you need extensive help and prefer to be walked through
things by a tutor instead of teaching yourself based on a good book,
then you're not going to be very satisfied with the experience
here. Find a local Perl teacher, and pay him or her $30 an hour to
teach you; or take a programming class at your local community
college. Everyone will be happier that way.
Charlton
--
cwilbur at chromatico dot net
cwilbur at mac dot com
------------------------------
Date: Mon, 26 Apr 2004 14:08:00 +0200
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: other perl groups
Message-Id: <c6iu33$ceq7c$1@ID-231055.news.uni-berlin.de>
Also sprach Charlton Wilbur:
> If you want this group to be helpful, here's what you do.
>
> * Spend at least twenty minutes looking for the answer to your
> question in _Learning Perl_, _Elements of Programming with Perl_,
> _Programming Perl_, and _The Perl Cookbook_ -- or preferably all
> four. If there's an answer there and you ask the question here, all
> that will happen here is that you'll be told to RTFM, possibly with
> a pointer to the appropriate FM to read.
What you list are four books. None of them is a manual and hence RTFM
can't apply to any of them.
People need to have a preliminary scan through the perldocs and the
FAQs. That's all there is to do before posting.
Tassilo
--
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
------------------------------
Date: Mon, 26 Apr 2004 14:29:22 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: other perl groups
Message-Id: <c6ivft$cbs1d$1@ID-184292.news.uni-berlin.de>
Tassilo v. Parseval wrote:
> People need to have a preliminary scan through the perldocs and the
> FAQs. That's all there is to do before posting.
I agree. But don't forget that quite a few posters seem to not have a
clue of the language. Asking them to "scan through the perldocs and
the FAQs" is not very meaningful.
What I'm trying to say is that in order to 'qualify' for asking for
help with a specific Perl programming issue, people should first have
gained a minimum level of Perl knowledge. Not sure what that would be
- maybe perlintro?
So yes, people should have RTFM first. But to be able to do so, they
need to know *something*. Accordingly, knowing *something* should also
be a requirement.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 26 Apr 2004 04:47:46 -0700
From: kasier@hispavista.com (Asier)
Subject: PAR, pp and script packing
Message-Id: <8ae0c44.0404260347.6f6d2bed@posting.google.com>
Hi:
i have developed an applicattion in perl.
The problem i have, is that when i pack it normally with pp, and try
to use it in another different box( packed in redhat 9, fails in
mandrake 9), it gives me an error (icsh_len). I suppose that this
happends due to XS modules, becouse of the other modules i am using in
my script ... So i found in par's documentation that i could pack with
--multiarch option, and that implies -p (Create PAR archives only; do
not package to a standalone binary.).
But it is in this point where my mind gets confused. What can i do, if
i want to distribute my applicattion, accross any *linux* box, with
the modules i have downloaded and installed in my box?
What is the best way to pack in order to distribute my app, without
having to pack more things than necessary (supposing that standard
perl is installed in other possible linux boxes) and taking as less
space as possible?
i do not mind if it is a self standalone executable other a perl
archive with .par archives (supposing in this last case that par is
NOT installed in the other machines)
Thank you very very much
(i have posted this in comp.lang.perl.modules also)
------------------------------
Date: Mon, 26 Apr 2004 15:00:24 +0200
From: "Bo Johanson" <Bo_Johanson_nojunkmail@hotmail.com>
Subject: Re: regexp quick reference card
Message-Id: <JJ7jc.216$id.3441@news2.e.nsc.no>
"The Regex Coach" - http://weitz.de/regex-coach/ - is a nice utility program
where you can test your regexps.
--
bo_johanson_nojunkmail@hotmail.com
"fenisol3" <olusola.o.olaode@intel.com> wrote in message
news:c6c489$huk$1@news01.intel.com...
> Hello all,
>
> Does anyone know where I can find like a cheatsheet or quick reference
card
> for Perl regular expressions online? Thanks.
>
> -fenisol3
>
>
------------------------------
Date: Mon, 26 Apr 2004 11:11:08 GMT
From: Geoff Cox <geoffacox@dontspamblueyonder.co.uk>
Subject: Re: slurp not working? ideas please!
Message-Id: <uerp801sntipm63194o6067hsvicvl836c@4ax.com>
On Mon, 26 Apr 2004 18:50:14 +0900, ko <kuujinbo@hotmail.com> wrote:
Keith
many thanks for the explanations - am carefully going through them
now. I'm sure you are right about the need to read, read and read
again!
Cheers
Geoff
------------------------------
Date: 26 Apr 2004 04:52:03 -0700
From: c_j_marshall@hotmail.com (Chris Marshall)
Subject: Re: variable interpolation failed :-(
Message-Id: <cb9c7b76.0404260352.25423c03@posting.google.com>
Tad McClellan <tadmc@augustmail.com> wrote in message
> [1] See me make this very same mistake here some years ago:
> Message-ID: <uk68f9cg8b.fsf@linda.teleport.com>
> See Randal set me straight too. :-)
Apologies for the non-perl question - but how/where do I look up this
message from the ID ?
Thanks,
Chris
------------------------------
Date: Mon, 26 Apr 2004 07:33:09 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: variable interpolation failed :-(
Message-Id: <slrnc8q0c5.ovs.tadmc@magna.augustmail.com>
Chris Marshall <c_j_marshall@hotmail.com> wrote:
> Tad McClellan <tadmc@augustmail.com> wrote in message
>> [1] See me make this very same mistake here some years ago:
>> Message-ID: <uk68f9cg8b.fsf@linda.teleport.com>
>> See Randal set me straight too. :-)
>
> Apologies for the non-perl question - but how/where do I look up this
> message from the ID ?
You've been missing the 2nd best (after the std docs) Perl
resource of them all!
http://groups.google.com/advanced_group_search
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
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 6467
***************************************