[25805] in Perl-Users-Digest
Perl-Users Digest, Issue: 8044 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 3 00:05:32 2005
Date: Mon, 2 May 2005 21:05:05 -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, 2 May 2005 Volume: 10 Number: 8044
Today's topics:
pattern matching dynamic strings w/ regex ending in $ p <rader@hep.wisc.edu>
Re: pattern matching dynamic strings w/ regex ending in <apeiron+usenet@coitusmentis.info>
Re: Somethign about hashes <tadmc@augustmail.com>
Re: Somethign about hashes <tadmc@augustmail.com>
Re: start_table problem <pilkowsk@informatik.uni-marburg.de>
Re: start_table problem <emschwar@pobox.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 02 May 2005 15:31:59 -0500
From: rader <rader@hep.wisc.edu>
Subject: pattern matching dynamic strings w/ regex ending in $ problem
Message-Id: <d562nv$ii7$1@news.doit.wisc.edu>
I'm seeing a simple, ah, problem with perl 5.8.0...
chive(rader): perl -v | head -2 | tail -1
This is perl, v5.8.0 built for i386-linux-thread-multi
chive(rader): cat crud
#!/usr/bin/perl
$a = 'fuBar';
$b = 'Bar$';
$a_new = `echo -n $a`;
$b_new = `echo -n $b`;
if ( $a_new =~ /$b_new/ ) {
print "match\n";
} else {
print "no match?!\n";
}
chive(rader): ./crud
no match?!
Anybody know of a workaround? The code above behaves as expected
with 5.6.x. Could this actually be a bug?
steve
- - -
systems & network manager
high energy physics
university of wisconsin
------------------------------
Date: 03 May 2005 02:09:15 GMT
From: Christopher Nehren <apeiron+usenet@coitusmentis.info>
Subject: Re: pattern matching dynamic strings w/ regex ending in $ problem
Message-Id: <slrnd7dnab.3hr.apeiron+usenet@prophecy.dyndns.org>
On 2005-05-02, rader scribbled these
curious markings:
[Posting to both clpmod and clpmisc is largely superfluous. Following up
to and F'ups set to clpmisc.]
> chive(rader): cat crud
> #!/usr/bin/perl
> $a = 'fuBar';
> $b = 'Bar$';
> $a_new = `echo -n $a`;
> $b_new = `echo -n $b`;
> if ( $a_new =~ /$b_new/ ) {
> print "match\n";
> } else {
> print "no match?!\n";
> }
>
> chive(rader): ./crud
> no match?!
Make sure that the results of the echo commands are actually what you
expect. FWIW, it WFM on 5.8.6 i386-freebsd-thread-multi-64int.
Best Regards,
Christopher Nehren
--
I abhor a system designed for the "user", if that word is a coded
pejorative meaning "stupid and unsophisticated". -- Ken Thompson
If you ask the wrong questions, you get answers like "42" and "God".
Unix is user friendly. However, it isn't idiot friendly.
------------------------------
Date: Mon, 2 May 2005 19:06:43 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Somethign about hashes
Message-Id: <slrnd7dg4j.65s.tadmc@magna.augustmail.com>
Nikos <hackeras@gmail.com> wrote:
> but once again iam i am a vivtim of circumstances....
Once, twice, thrice maybe.
But you've done it DOZENS of times!
The root of the problem here is that you do not respect
the other people on this newsgroup.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 2 May 2005 19:09:16 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Somethign about hashes
Message-Id: <slrnd7dg9c.65s.tadmc@magna.augustmail.com>
Nikos <hackeras@gmail.com> wrote:
> Chris Mattern wrote:
>
>> Tell me, if you drove your car to the supermarket and they were out
>> of milk, would you regard this as a matter to take up with your
>> mechanic? After all, it happened while you were on a trip with
>> your car!
>>
>
> lol! :-)
>
> ok, but it wouldnt be much of a trouble if you helped me a little on the
> styling since little details are confusing me, would it?
But then someone else will see that they can get CSS and web server
and MySQL problems answered here, and they will post _their_ questions.
If we let you throw trash in our park without complaint, then we
will end up with LOTS more trash in the park.
We like our park. We don't like you trashing it, so please stop doing that.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 3 May 2005 00:39:46 +0200
From: Fabian Pilkowski <pilkowsk@informatik.uni-marburg.de>
Subject: Re: start_table problem
Message-Id: <3dnoflF6rjf7bU1@individual.net>
* Nikos schrieb:
> Trey Waters wrote:
>>
>> Just to point out the relevant section from `perldoc CGI`:
>>
>> With a few exceptions (described below), start_tag_name
>> and end_tag_name functions are not generated automatically
>> when you use CGI. However, you can specify the tags you
>> want to generate start/end functions for by putting an
>> asterisk in front of their name, or, alternatively,
>> requesting either "start_tag_name" or "end_tag_name" in
>> the import list.
>>
>> Funny thing is, the section of the CGI.pm documentation relevant to this
>> question was found with the FIRST match of searching for "start_table". I
>> will admit, the text of the paragraph can be a little confusing (esp. if
>> you're like me, and not the quickest kid on the block), but the example
>> that follows makes it perfectly clear.
>>
>> I will let you figure out how to use perldoc to find the example in the
>> CGI.pm docs which will show you how to fix your error message. :)
>
> Can you beleive that i dont know at all how to use perldoc even how to
> serach the syntax of print?
Well, reading this I understand why you're asking all your annoying
questions here. You don't know *how* to read the docs.
Hiltherto, you have told you won't read at all. -- Is the time coming
where you want to read the docs yourself? Hoping this, I'll answer your
question:
`perldoc` is a program you can call from your console.
To read the docs of one module you have to type `perldoc Module` -- in
the case of CGI.pm (see above) you just have to type `perldoc CGI` as
Trey has mentioned in his posting. When looking for some information
about one of Perl's builtin functions like print(), you have to type
`perldoc -f print`. All this is done from your console.
>
> i have activestates perl.
> Can i see the help document in browser somehow or is better in console?
Additionally, when using ActiveState's Perl all these informations are
already available in HTML format. Scout about a subdirectory of Perl's
install dir (AFAIR, "C:\perl" as default) named "html". This HTML pages
are using frames: a left one to show a navigation bar and a right one to
show the information you have choosen in the first. The navigation bar
begins with some ActiveState stuff, followed by the core docs. When
scrolling down some lines you see the docs for all installed modules. As
Sinan has pointed to, there is also a link in your start menu.
Please, have a look at this and try to read it.
regards,
fabian
------------------------------
Date: Mon, 02 May 2005 16:50:12 -0600
From: Eric Schwartz <emschwar@pobox.com>
Subject: Re: start_table problem
Message-Id: <eto4qdlz1i3.fsf@wilson.emschwar>
Nikos <hackeras@gmail.com> writes:
> Iam suign it i just did not post it but since it seems you want it and
> blame me for not psoting all the code, here, take it ALL :-)
We do not want all. We want the smallest possible code required to
show the problem. Don't start with all of the code you have--
instead, figure out where the problem is, and then start with only
that code. You actually got that part right. Then, put it in a file
by itself, and add only the bare minimum required to get that code
running. Then start deleting code until you can't reproduce the
problem anymore-- most often, this will in itself help you find the
problem.
Only then should you cut and paste the entire example-- not your
original file, just the example. However, if you find yourself
pasting more than about 20 lines, then you probably haven't simplified
your code enough yet, so keep working on it.
Also, you need to sit down and read all of "Learning Perl", about
three times. I know it's hard, I know you don't like to work that
way-- sorry, but that's life. If you want to irritate everyone here
who knows how to help you enough so that they killfile you, and the
only people who see your posts don't know the right way to answer,
then please continue the way you have been. If you want to get the
best answers possible from the smartest people, then stop right now,
and work your way through the book, very slowly. Also, read the FAQ,
and learn how to search the documentation to find the answer you're
looking for.
And always always ALWAYS cut and paste error messages EXACTLY. Do NOT
retype them, as you will make mistakes. Do NOT retype your example
code, as you will make mistakes there, too. ALWAYS cut and paste!
ALWAYS!
-=Eric (seriously, always)
--
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
-- Blair Houghton.
------------------------------
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 8044
***************************************