[12485] in Perl-Users-Digest
Perl-Users Digest, Issue: 6086 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 22 02:07:25 1999
Date: Mon, 21 Jun 99 23:01:28 -0700
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, 21 Jun 1999 Volume: 8 Number: 6086
Today's topics:
Re: Return value in script. <xyf@inetnebr.com>
Re: Return value in script. (Ronald J Kimball)
Re: Statistics for comp.lang.perl.misc (Ronald J Kimball)
Re: Statistics for comp.lang.perl.misc (Abigail)
Re: Statistics for comp.lang.perl.misc (Abigail)
Re: virtualave.net <webmaster@chatbase.com>
Re: virtualave.net (Darrell Stec)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 22 Jun 1999 00:06:11 -0500
From: ktb <xyf@inetnebr.com>
Subject: Re: Return value in script.
Message-Id: <376F19C3.435A591A@inetnebr.com>
If I try to rewrite the bottom of the script to like this:
_____________________________________________
<snip top of script>
while (<BottleFile>) {
@parts = split(/\t/);
if(! defined ($PartsFile = $parts[0])) {
next;
}
if ($PartsFile =~ /\Q$SearchString/i) {
print "\n$_\n";
}else{
print "No string found.\n";
}
}
____________________________________________
The word searched for is found, but for each line in the file not found
it prints "No string found." Why is this 'else' clause not working?
Thanks,
kent
ktb wrote:
>
> Hi, I have this script that I can search a file of mine. The script
> works fine but I'm trying to get it to print "No string found." if the
> search is not sussessful. The entire script is below but it's this part
> I'm working with:
> ________________
>
> sub result {
> if($& lt 1) {
> print "No string found.\n";
> } else {
>
> print "\n$_\n";
>
> }
> }
> _________________
>
> This subroutine will not print "No string found." if the search is not
> successful ie. when I type something like "l;kaa" which the file doesn't
> contain. If I change the line to, if($& gt 1) it will print the line as
> many times as the search sucessfully finds what it's looking for. When
> I just hit return twice (enter nothing to search for) I get "No string
> found." printed several times. Anyway maybe there is a better way of
> doing this? I've screwed around with "return" and can't get anything to
> work. Any thoughts would be apreciated.
> kent
>
> _____________________________________________________________________________
>
> #!/usr/bin/perl -w
>
> use strict;
> my ($SearchString, $parts, $PartsFile, @parts, $search, $OutPut);
>
> print "Enter string to search: ";
> chomp ($SearchString = <STDIN>);
>
> open (BottleFile, "botglass.txt") || die "Can't open \"botglass.txt.\"
> $!.\n";
>
> while (<BottleFile>) {
> @parts = split(/\t/);
>
> if(! defined ($PartsFile = $parts[0])) {
> next;
> }
>
> if ($PartsFile =~ /\Q$SearchString/i) {
>
> result();
>
> }
> }
>
> ###
> sub result {
> if($& lt 1) {
> print "No string found.\n";
> } else {
>
> print "\n$_\n";
>
> }
> }
>
> _____________________________________________________________________________
------------------------------
Date: Tue, 22 Jun 1999 01:10:32 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Return value in script.
Message-Id: <1dtrzzy.ijipcm1m6h0nzN@p57.tc2.metro.ma.tiac.com>
ktb <xyf@inetnebr.com> wrote:
> if ($PartsFile =~ /\Q$SearchString/i) {
>
print "\n$_\n";
>
> }
else {
print "No string found.\n";
}
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Tue, 22 Jun 1999 01:10:33 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <1dts09k.1ufnheh1t0jn1gN@p57.tc2.metro.ma.tiac.com>
Bart Lateur <bart.lateur@skynet.be> wrote:
> Greg Bacon wrote:
>
> > I though about fixing it to catch Abigail's quoting
>
> This has been brought up before. In fact, *I* brought it up before. :-)
I also brought it up before, when Abigail was consistently using ++ as
her quoting prefix. I suggested that Greg add that to his regex, he did
so, and Abigail no longer uses ++.
Clearly, continuing this game of catch-up would be an exercise in
futility.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: 21 Jun 1999 23:27:15 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <slrn7mu44t.k1b.abigail@alexandra.delanet.com>
Randal L. Schwartz (merlyn@stonehenge.com) wrote on MMCXX September
MCMXCIII in <URL:news:m1yahdtu8e.fsf@halfdome.holdit.com>:
$$ >>>>> "Greg" == Greg Bacon <gbacon@cs.uah.edu> writes:
$$
$$ Greg> Top 10 Posters by OCR (minimum of five posts)
$$ Greg> ==============================================
$$
$$ Greg> 0.924 ( 80.8 / 87.5) 153 abigail@delanet.com
$$
$$ You are really gonna have to add some AI to recognize Abigail's
$$ peculiar quoting style. Either that, or a cancelbot to kill Abi's
$$ postings because they don't fit Usenet tradition. :)
Neither does your quoting style.
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 21 Jun 1999 23:29:22 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <slrn7mu48j.k1b.abigail@alexandra.delanet.com>
Bart Lateur (bart.lateur@skynet.be) wrote on MMCXX September MCMXCIII in
<URL:news:376e9cd7.236836@news.skynet.be>:
II
II Abigails quoting starts with one of:
II
II * 2 identical non-word characters (but not space)
II * a set of matching "parens", such as "()","<>","[]","{}"
II * Two capital i's. I've seen this only once, and honestly, I think this
II was a mistake.
Do you really think I make mistakes like that?
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 21 Jun 1999 21:45:12 -0700
From: TRG Software : Tim Greer <webmaster@chatbase.com>
To: DarStec@aol.com
Subject: Re: virtualave.net
Message-Id: <376F14D8.E4A73507@chatbase.com>
DarStec@aol.com wrote:
>
<SNIP>
> Will you please stop sending private Email to me when I reply on a PUBLIC
> forum.
Listen weirdo, I replied to both as common courtesy. What's the matter
with you? And why are you going so far out of your way to get pissy with
me?
> As USUAL you are stupidly WRONG.
Show me *anything* I've stated that was "stupid" and I'll send you a
dollar. Further, you say "as usually", when you don't know how I
'usually' am. Add the fact that your pseudo insults don't mean much,
when you're embarrassing yourself by using poor grammar and
syntactically incorrect wording.
> You didn't even know what the
> problem was, because
_Because_ he *never* said what the problem was! What's the matter with
you? Are you always this unprofessional and cynical because people (like
me) ask people to post relevant subjects? Is there a reason why you're
such an advocate of that sort of mentality??
> he very considerately did not post his script.
How is omitting the actual content that makes his post REVELANT to this
news group (therein making it completely off topic!) make it a
"considerate" action? No offense, but judging by your email to me (and
you're uncalled for and unjustified attacks on me and my character for
my completely reasonable and logical post, which WAS justified), I must
ask you; Do you literally have the word "stupid" written across your
forehead?
> Get off
> your "a free server is bad" kick.
When did I say that? That had *nothing* to do with his post, nor did I
say that was the reason. Why don't you gop back and actually READ what I
said?
> The minute you see someone that says they
> are on a free web host, you seem to have a compulsion to say that the problem
> is not a Perl problem
When did I ever say that? How do you know what I'm thinking or WHY I
do/say anything? I do have the insight to actually ask someone what
their question has to do with _Perl_, when their post has nothing about
it! Why is this so difficult for you to comprehend? I don't think it's
difficult to figure out whom the person here is with the problem, and
whom is being rude. It's certainly not me. Why are you so "threatened"
by me, to the point that you feel this overwhelming urge to send me an
email filled with your childish rantings that have *nothing* to do with
this issue, other then the obvious fact that you can't seem to
understand this simple event.
> before you even know what the problem might be.
Maybe he should have stated his problem, rather then saying "It doesn't
work", and giving no other information. Why is it such a moral crime for
me to suggest that with the current post he made and with the lack of
any information otherwise, it dictates that it's an off topic posts and
to actually urge him to maybe READ some help pages, since he states it
was the web server that seemed to be the problem! I never assumed
anything, simply put, his post wasn't a Perl question. Deal with it...
> Try
> studying your martial arts a little more and learn a little serenity.
You watch too many movies.. And you should seriously consider on
practicing what you preach.
> {Or
> did you study them as so many kids do today to put a hurt on someone?}
Yes, of course that's it! I mean, I must be a danger to society, a
morally corrupt criminal and use my knowledge of everything I've ever
studied to bring harm to society in general. It's a big 'hoot', let me
tell you. After all, what sort of deranged mind would actually suggest
that a post with no mention of a Perl code problem just MIGHT be off
topic and to have the gall to actually go even FURTHER and suggest he
look at the HELP and FAQ sections of the site in question. Well, that
and the fact that YOU assume I'm some jerk because of that reply.. Yes,
how DARE my mind not function in the exact same basic way as yours, so
you can actually comprehend the situation. You sir, are a complete
moron!
<SNIP>
> > ".... other then the fact that he was having a problem and he was having
> > this "problem" with a script coded in Perl, which doesn't mean anything."
> Say what????
Go back... and... READ.. it... Slow enough for you? You took that out of
context, no wonder you're confused. You need to seriously review what is
happening here. He states that his Perl script works on his home system,
but not on virtualave.net. That's all he said. Just because that script
is written in Perl, doesn't me jack (just like your libelous statements
and assumptions in regards to myself). You just don't get it, do you?
Unless you actually state what the problem IS (other then "it's not
working") with no further information, it's not the place to post HERE!
Or should *everyone* that can't get a Perl script working properly just
all post here saying "It doesn't work", and we're all supposed to GUESS,
or email back and forth how many times? The NG's are for everyone, so
everyone can contribute and help..., It's not a private wish-list that
you submit your problem to.
> He is having a problem with Perl code, but that doesn't mean
> anything in a Perl newsgroup.
Not if he didn't say what the problem was (other then "it's not
working") and provide no information that can help us HELP HIM! No code,
nothing. No, that doesn't belong here. I didn't tell him to NOT post,
you goof, I simply said that with what he supplied; it's not a Perl
question and it's off topic. That wasn't a flame, got it? It's an
observation and (if he bothered to come back and check) he'd get a clue
to actually post the problem.
> Where did you learn that kind of logic?
Well, education, intelligence, and experience all dictate my logic, what
about you? Anger, spite, and resentment (along with a lack of knowledge)
must dictate yours - which is obvious by your actions and statements.
> He responded to me in Email,
That's irrelevant to this NG.
> because I sent him one asking what kind of
> problem he had.
Which was kind of you, but it's not relevant to your justifications of
saying I'm such an ogre - Why are you? This has nothing to do with the
NG issue, and that's the point, right Darrell?
> Given your attitude
And given yours... Need I comment on yours? Or am I just automatically
an ass***e because I'm not a newbie asking off topic questions?
> to anyone that says they are using a
> free web host,
You're making things up. I never, ever stated that there's anything
wrong with someone or their posting simply because they are on a free
web host! Show me where I've ever said this! Do you maybe own or run a
free web host and this is why you're so defensive? Or did you just post
completely off topic and stupid posts (as you have today) and get flamed
one too many times. Why are you making such a big deal about this? Why
can't you deal with the fact, that people have a right to ask people to
NOT post off topic questions here, UNLESS they provide the information
to make it actually belong here! You're a real genius!
> it is no wonder he felt uncomfortable posting his code.
Oh really?.. He's psychic, is he? Because I haven't stated any such
thing, and he couldn't have known to be "uncomfortable" in the first
place. Further, how do you know he felt "uncomfortable"? You sound like
you're trying to justify your bogus statements by again assuming and
stating off the wall things.
Perhaps he knew it wasn't a proper thing to post, since he felt so
"uncomfortable" about it. If so, then why did he go and post such an off
topic question and make it so much more "uncomfortable". Yes, you're the
savior to all the newbies asking all the off topic questions (excuse me,
seemingly off topic, even though everything in his email dead on proves
it was just that, off topic).
> Even
> I got the impression from your posts
You can read?
> that you are incapable of anything but
> ridicule,
Show me a relevant post that wasn't completely out of line that I
ridiculed anyone! You're obviously trying to cover your pathetic
statements, but you're not making any sense of justifying anything you
say! What about you? Are you somehow immune to the very subject of this?
How exactly are you justified in emailing me and telling me this
obviously false BS, and then say that _I_ am some person that always
ridicules people? What are you trying to do? All of this BS of yours,
simply because you don't possess the brain power to unscramble the
signals? This is all obvious stuff... Why are you so defensive? You're a
maniac.
> and a beginner certainly doesn't need that even from a know-it-all
> like you.
Did I say I know it all? How does me saying (by his post) his post is
off topic and there was NO Perl question make me guilty of what you
claim? I'm here to offer help, not attack people. I simply stated that
it was not (by the content) something that belonged here. If you want to
start a NG that's dedicated towards helping "newbies" install the free
scripts they download from Matt's archive, then go for it. That would be
great. But don't try and insult me by your blatant and belligerent
stupidity, simply because you don't wish to agree with me actually
following the rules that dictate the entire point of Ng's in the first
place! What do you know anyway? Do you know anything beyond the very
basics of Perl? Where do you get off telling me this BS, when it's
obvious and in your face!?
>
>
> >
> > It's good to hear that his problem is solved, although it's usually
> > polite to post that it's been solved and what the problem was (if it's
> > indeed relevant to this NG) so people won't continue to try and offer
> > help still, and further; so others with the same problem can see the
> > answer before they end up posting the same question. :-)
>
> Additionally, his problem may still not be solved.
I can see why...
> He is so new to all of
> this that he hasn't even gotten a "Hello World" program down pat yet.
Wow, you were a big help.. Good thing you saved him from the cruel
clutches of the main 'ol bastards in the Perl NG!! You're to say, that
you can't help this kid get a simple "hello world" script to work? And
you're getting on my case for saying his post was off topic? Maybe you
simply don't know even enough to know what's off topic? Is that the
problem?
> He
> needs help with Perl coding at its most basic level.
Which is beyond your abilities, right?
> It was just plain dumb
> luck
I'd call it "bad luck" if I got offered 'help' from someone as
unschooled as you. Maybe you should learn the language a little better
before passing judgments on others that have more knowledge then you do.
No offense, but this is ridiculous, when you can't even figure that much
out!
> that he got any response from his program on his own computer.
Well, he probably would have gotten many more and gotten his problem
solved if he actually posted his problem. A lot of good your wisdom did,
eh? I guess this all gives you the exclusive right to send other people
offensive emails, simply because you "tried".
What a joke...
--
Regards,
Tim Greer : webmaster@chatbase.com | software@linkworm.com
The ChatBase: http://www.chatbase.com | 250,000+ hits daily Worldwide!
TRG Software: http://www.linkworm.com | CGI scripts in Perl/C, & more.
Unix/NT/Novell Administration, Security, Web Design, ASP, SQL, & more.
Freelance Programming & Consulting, Musician, Martial Arts, +Sciences.
------------------------------
Date: 22 Jun 1999 05:12:52 GMT
From: darstec@aol.com (Darrell Stec)
Subject: Re: virtualave.net
Message-Id: <19990622011252.08876.00000873@ngol07.aol.com>
In article <376EB5E7.EB06D615@chatbase.com>, TRG Software : Tim Greer
<webmaster@chatbase.com> writes:
>
>[posted & emailed]
>
>Darrell Stec wrote:
>>
>> In article <376D698D.E9C1DEC4@chatbase.com>, TRG Software : Tim Greer
>> <webmaster@chatbase.com> writes:
>>
>> >Leonid Goltser wrote:
>> >>
>> >> Somebody suggested me to upload my scripts on virtualave.net. I did but
>my
>> >> scripts do not work (although, they work perfectly on my machine).
>Browser
>> >> can't open them. If somebody use virtualave.net, can you help me?
>Probably
>> >> something wrong with configuration or something else. If you run your
>> >> scripts on that server, please, give me a piece of your code what works
>> >> there. I'll use it as an example.
>> >
>> >Isn't it logical to actually go to virtualave.net's web site and take a
>> >look at *their* site's help and support pages? This isn't a perl
>> >question, you realize that much, don't you? With that said, please don't
>> >post such off-topic questions here.
>> >--
>> >Regards,
>> >Tim Greer: chatmaster@chatbase.com / software@linkworm.com
>> >Chat Base: http://www.chatbase.com | 250,000+ hits daily Worldwide!
>> >TRG Software: http://www.linkworm.com | CGI scripting in Perl/C, & more.
>> >Unix/NT/Novell Administration, Security, Web Design, ASP, SQL, & more.
>> >Freelance Programming & Consulting, Musician, Martial Arts, Sciences.
>> >
>> >
>>
>> Actually it really IS a Perl question, and on-topic. The performance of
>the
>> coding had nothing to do with Virtual Avenue at all, Leonid simply made
>that
>> assumption. There are a few basics missing from the coding, if what I got
>in
>> Email was the complete program.
>>
>> Later,
>> Darrell Stec E-Mail: DarStec@aol.com
>>
Answered in Email. Every time Timmy sees Virtual Avenue or free web host and a
reply from me, he thinks I want his personal opinion in Email, NOT.
Later,
Darrell Stec E-Mail: DarStec@aol.com
Webpage Sorcery
http://webpagesorcery.com
We Put the Magic in Your Webpages
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 6086
**************************************