[23320] in Perl-Users-Digest
Perl-Users Digest, Issue: 5540 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 22 06:05:57 2003
Date: Mon, 22 Sep 2003 03:05:09 -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, 22 Sep 2003 Volume: 10 Number: 5540
Today's topics:
Re: "my" declarations, only matter of taste? <abigail@abigail.nl>
Re: () questions <abigail@abigail.nl>
Re: Better to upgrade gumm@localhost.localdomain
Re: Better to upgrade <ict@eh.org>
Re: D not deleting all breakpoints <samj2@austarmetro.com.au>
Re: D not deleting all breakpoints <tassilo.parseval@rwth-aachen.de>
Decrpyt CPAN RC4 under Windows 2000. (John South)
Re: How can I comment out a large block of perl code? <abigail@abigail.nl>
Insert lines in a file (MJS)
Re: Insert lines in a file <thens@NOSPAMti.com>
Re: Insert lines in a file <krahnj@acm.org>
length of the longest $_ in @_ <samj2@austarmetro.com.au>
Re: length of the longest $_ in @_ <mpapec@yahoo.com>
Re: length of the longest $_ in @_ <abigail@abigail.nl>
Re: Little survey for Unix users (Helgi Briem)
Operator Precedence (Jeff Mott)
Re: Operator Precedence <ak+usenet@freeshell.org>
Re: Operator Precedence <abigail@abigail.nl>
problem fetching the total number of rows newbie (bhat)
Re: Sending html mail with inline images <me@privacy.net>
Re: some stupid questions about string search & replace (Si Ballenger)
Re: some stupid questions about string search & replace <krahnj@acm.org>
Re: This probably aint the right place . . . but there <nemail@hotmail.com>
Re: This probably aint the right place . . . but there <nemail@hotmail.com>
Re: This probably aint the right place . . . but there <nemail@hotmail.com>
Re: wtf is the deal? <abigail@abigail.nl>
Re: <bwalton@rochester.rr.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 22 Sep 2003 09:04:39 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: "my" declarations, only matter of taste?
Message-Id: <slrnbmtep7.48o.abigail@alexandra.abigail.nl>
Eric J. Roode (REMOVEsdnCAPS@comcast.net) wrote on MMMDCLXXIII September
MCMXCIII in <URL:news:Xns93FD7E031ACEEsdn.comcast@206.127.4.25>:
// -----BEGIN xxx SIGNED MESSAGE-----
// Hash: SHA1
//
// Matija Papec <mpapec@yahoo.com> wrote in
// news:bfhrmvgre842llne5rde01ouhmejpr3b2r@4ax.com:
//
// >
// > a)
// > for (1..20) {
// > my $mod = $_%3;
// > ...
// > }
// >
// > b)
// > my $mod;
// > for (1..20) {
// > $mod = $_%3;
// > ...
// > }
// >
// > Let's say we'll need $mod only inside of foreach, so both cases work as
// > desired but is one more preferred then the other?
//
// Case (a) limits the scope of $mod to the for loop block. In general, it
// is good practice to limit the scope of variables as narrowly as possible,
// since you're less likely to use its value by mistake later. Or, suppose
// you later add a variable $mod in an enclosing outer scope. With case
// (a), you don't have to worry about stomping on the new variable's value.
// With case (b), you have two variables at the same scope that can
// conflict.
//
// Case (a) creates a new lexical variable each time through the loop; this
// probably slows the loop down by some microseconds. That's almost
// certainly inconsequential.
Actually, for a small loop that you run many times, it may matter:
#!/usr/bin/perl
use strict;
use warnings;
use Benchmark qw /cmpthese/;
our $loop = 1000;
cmpthese -2 => {
inner => ' for (1 .. $::loop) {my $m = $_ % 3}',
outer => 'my $m; for (1 .. $::loop) { $m = $_ % 3}',
};
__END__
Benchmark: running inner, outer for at least 2 CPU seconds...
inner: 2 wallclock secs ( 2.04 usr + 0.00 sys = 2.04 CPU)
@ 1982.35/s (n=4044)
outer: 2 wallclock secs ( 2.11 usr + 0.00 sys = 2.11 CPU)
@ 2858.77/s (n=6032)
Rate inner outer
inner 1982/s -- -31%
outer 2859/s 44% --
Abigail
--
map{${+chr}=chr}map{$_=>$_^ord$"}$=+$]..3*$=/2;
print "$J$u$s$t $a$n$o$t$h$e$r $P$e$r$l $H$a$c$k$e$r\n";
------------------------------
Date: 22 Sep 2003 09:25:15 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: () questions
Message-Id: <slrnbmtfvr.48o.abigail@alexandra.abigail.nl>
Matija Papec (mpapec@yahoo.com) wrote on MMMDCLXXIII September MCMXCIII
in <URL:news:a5irmv8autq78mgo8vl9e0h0lc7din88ll@4ax.com>:
][
][ 1) () stands afaik for "empty list", so why it doesn't pass a map function?
][ Is such behavior accidental or intentional?
][
][ print join ',', map $_%2 ? () : $_, 1..20;
$ perl -wle 'print join "," , map $_%2 ? () : $_, 1..20;'
2,4,6,8,10,12,14,16,18,20
Seems to work fine here.
][ 2) how to grok this expression, what exactly perl does here?
][
][ my $count = () = $data =~ /match/g;
Perl does a little strange here. It matches /match/ against $data,
repeatedly, and, because it's in list context, it returns a list
of the matches (since there are no parens in /match/).
But the list itself is in scalar context. Now, we all like to chant
that there are no lists in scalar context, but this one is. And
apparently, a list in scalar context returns the number of elements
in the list.
However, I doubt this is documented.
][
][ is this /on the perl side/ same as,
][ my $count = @{[ $data =~ /match/g ]};
Sort of. Except that instead of a list, we have an array in scalar
context. And that behaviour is well defined.
Abigail
--
perl -Mstrict='}); print "Just another Perl Hacker"; ({' -le1
------------------------------
Date: Mon, 22 Sep 2003 05:09:20 GMT
From: gumm@localhost.localdomain
Subject: Re: Better to upgrade
Message-Id: <slrnbmspbq.3o8.gumm@localhost.localdomain>
The biggy I can think of is that if you are using threading,
the 5.6 and 5.8 threading implementations are significantly
different, and if you are using threads heavily, I'd test
the threadded applications in 5.8 before jumping into it.
In article <Fdp8b.2192$ed2.1564@newssvr27.news.prodigy.com>, Luriel wrote:
> On our UNIX and BSD working stations, we are still using Perl 5.6. I'm
> trying to get the IT department to upgrade to 5.8 or even 5.9 if that is
> out.
>
> Is there any real benefit or gain in 5.8 over 5.6 ? And what of 5.9? A yahoo
> search did not give me anything over then FAQs, but not really what the
> changes are. It would be veddy nice to know.
>
> Thankie
>
>
------------------------------
Date: 22 Sep 2003 15:23:56 +1000
From: Iain Truskett <ict@eh.org>
Subject: Re: Better to upgrade
Message-Id: <slrnbmt28v.m2f.ict@dellah.org>
* Luriel <luriel@gfy.yahoo.com>:
[...]
> Is there any real benefit or gain in 5.8 over 5.6 ? And
> what of 5.9? A yahoo search did not give me anything over
> then FAQs, but not really what the changes are. It would
> be veddy nice to know.
http://www.perldoc.com/perl5.8.0/pod/perldelta.html
5.9 is the development stream and is not out.
cheers,
--
Iain. <http://eh.org/~koschei/>
------------------------------
Date: Mon, 22 Sep 2003 07:43:58 GMT
From: Sam <samj2@austarmetro.com.au>
Subject: Re: D not deleting all breakpoints
Message-Id: <3F6EAA14.5040104@austarmetro.com.au>
Kevin Michael Vail wrote:
> In article <3F6DDE8B.50602@austarmetro.com.au>,
> Sam <samj2@austarmetro.com.au> wrote:
>
>
>>Hello
>>DB<45>D
>>DB<45>L
>>still lists the 3 breakpoints I have had and the code stops at them.
>>how can I delete all breakpoint. it seams the D switch is not working.
>
>
> What version of Perl are you working with? This changed (along with
> some other things) in 5.8.0.
as Bob Walton said, B * deleted all the breakpoints. as fare as what
perl version I am running, that is hard to know. I got 5.6 installed
with debian, then I installed 5.8 from the source code which I should
not have done. now I am running with out knowing which one is executing
my program. I am guessing it is 5.8. can you tell me how could I know or
how could I make one inactive or even should I attempt to?
thanks
------------------------------
Date: 22 Sep 2003 08:02:37 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: D not deleting all breakpoints
Message-Id: <bkmaat$dbr$1@nets3.rz.RWTH-Aachen.DE>
Also sprach Sam:
> as Bob Walton said, B * deleted all the breakpoints. as fare as what
> perl version I am running, that is hard to know. I got 5.6 installed
> with debian, then I installed 5.8 from the source code which I should
> not have done. now I am running with out knowing which one is executing
> my program. I am guessing it is 5.8. can you tell me how could I know or
> how could I make one inactive or even should I attempt to?
That's kind of easy:
DB<1> p $]
5.008
In my case it was 5.8.0.
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: 22 Sep 2003 01:23:16 -0700
From: jsouth@cix.co.uk (John South)
Subject: Decrpyt CPAN RC4 under Windows 2000.
Message-Id: <d2aa22df.0309220023.65347b31@posting.google.com>
I've found the Crypt::RC4 Perl script on the CPAN site as a easy way
to encrypt email attachments from my ISP.
I need to decrypt them on a workstation running Windows 2000. I've
tried a Windows API from ZBit but there must be subtle differences in
the algorithm because it doesn't return the plain text.
Does anyone know of a tool that would do the job on the workstation.
Otherwise I will have to find out how to run Perl under Windows 2000.
John South
Pangbourne UK
------------------------------
Date: 22 Sep 2003 09:48:20 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: How can I comment out a large block of perl code?
Message-Id: <slrnbmthb4.49d.abigail@alexandra.abigail.nl>
Dan Jacobson (jidanni@jidanni.org) wrote on MMMDCLXXI September MCMXCIII
in <URL:news:87y8wks6yq.fsf@jidanni.org>:
-: $ perldoc perlpod|grep =rem
-: $
-: =rem is undocumented but works it seems.
Yeah, and so will
=chickensoup
and
=heffalump
If the Perl compiler is looking for the beginning of a new statement,
and it encounters /^=[a-zA-Z]/, it goes into 'skipping' mode, until
it encounters /^=cut.*$/, or the end of the file.
You could even outcomment code by doing:
=cut begin
print "This won't run";
=cut end
Abigail
--
perl -we 'print q{print q{print q{print q{print q{print q{print q{print q{print
qq{Just Another Perl Hacker\n}}}}}}}}}' |\
perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w
------------------------------
Date: 21 Sep 2003 23:12:02 -0700
From: tabletdesktop@yahoo.com (MJS)
Subject: Insert lines in a file
Message-Id: <f0171209.0309212212.43eb5cbc@posting.google.com>
I can't figure out with whats wrong with this code. Please help.
It doesn't produce the required result.
After the user inputs the value, the script should insert the number
of lines according to that number right after matching a text pattern.
(e.g if input 3, 3 lines should be inserted).
Also, is there anyway to check whether the input is a natural number
and not something else.
================================================
use Tie::File;
use strict;
print "Please enter a positive integer for Data = ";
$data=<STDIN>;
#print "Data = $data";
#line counter
$linecounter = 0;#not used anywhere so far.
# open for update
open(FILE, '+<', 'data.txt') or die "Can't open the file for update:
$!";
# tie @array to filename using Tie::File
tie @array, 'Tie::File', data.txt or die $!;
while(<FILE>){
if ( /\n/) {
$linecounter +=1; #not used yet
if (/some pattern match/ ){
for($n=0; $n <= $data; $n++){
unshift (@array, "sometext"."$n" . "some text "."$n \n") ;
}
}
}
}
untie @array;
close(FILE);
==================
------------------------------
Date: Mon, 22 Sep 2003 12:01:45 +0530
From: Thens <thens@NOSPAMti.com>
Subject: Re: Insert lines in a file
Message-Id: <20030922120145.160afe4c.thens@NOSPAMti.com>
On 21 Sep 2003 23:12:02 -0700
tabletdesktop@yahoo.com (MJS) wrote:
# I can't figure out with whats wrong with this code. Please help.
# It doesn't produce the required result.
#
# After the user inputs the value, the script should insert the number
# of lines according to that number right after matching a text pattern.
# (e.g if input 3, 3 lines should be inserted).
#
# Also, is there anyway to check whether the input is a natural number
# and not something else.
This is a faq and you can search the faq using perldoc -q.
perlfaq says
" Assuming that you don't care about IEEE notations like "NaN"
or "Infinity", you probably just want to use a regular
expression.
if (/\D/) { print "has nondigits\n" }
if (/^\d+$/) { print "is a whole number\n" }
if (/^-?\d+$/) { print "is an integer\n" }
if (/^[+-]?\d+$/) { print "is a +/- integer\n" }
if (/^-?\d+\.?\d*$/) { print "is a real number\n" }
if (/^-?(?:\d+(?:\.\d*)?|\.\d+)$/) { print "is a decimal number" }
if (/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/)
{ print "a C float" }
"
[ code snipped ]
# $data=<STDIN>;
#
# #print "Data = $data";
#
chomp $data; # remove the trailing new line from the number.
[ snip ]
HTH
Regards,
Thens.
------------------------------
Date: Mon, 22 Sep 2003 08:07:02 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Insert lines in a file
Message-Id: <3F6EAD91.8DFE5420@acm.org>
MJS wrote:
>
> I can't figure out with whats wrong with this code. Please help.
> It doesn't produce the required result.
>
> After the user inputs the value, the script should insert the number
> of lines according to that number right after matching a text pattern.
> (e.g if input 3, 3 lines should be inserted).
>
> Also, is there anyway to check whether the input is a natural number
> and not something else.
>
> ================================================
> use Tie::File;
> use strict;
>
> print "Please enter a positive integer for Data = ";
> $data=<STDIN>;
You need to remove the newline at the end of the input from STDIN.
chomp( my $data = <STDIN> );
> #print "Data = $data";
>
> #line counter
> $linecounter = 0;#not used anywhere so far.
>
> # open for update
> open(FILE, '+<', 'data.txt') or die "Can't open the file for update:
> $!";
Since you are using Tie::File you don't need to open the file.
> # tie @array to filename using Tie::File
> tie @array, 'Tie::File', data.txt or die $!;
^^^^^^^^
You need to quote strings.
tie my @array, 'Tie::File', 'data.txt' or die "Cannot open data.txt:
$!";
> while(<FILE>){
> if ( /\n/) {
> $linecounter +=1; #not used yet
>
> if (/some pattern match/ ){
>
> for($n=0; $n <= $data; $n++){
> unshift (@array, "sometext"."$n" . "some text "."$n \n") ;
> }
> }
> }
> }
for ( 0 .. $#array ) {
if ( $array[ $_ ] =~ /some pattern match/ ) {
splice @array, $_ + 1, 0, "sometext"."$n" . "some text "."$n
\n";
last;
}
}
> untie @array;
> close(FILE);
> ==================
John
--
use Perl;
program
fulfillment
------------------------------
Date: Mon, 22 Sep 2003 08:22:03 GMT
From: Sam <samj2@austarmetro.com.au>
Subject: length of the longest $_ in @_
Message-Id: <3F6EB301.6080302@austarmetro.com.au>
Hello .... again :)
after I search my book and the online hlep. trying to find it there is a
built-in function to get the length of the longest item in a givin
array. length will not do it and scalar @array will not do it. I can
loop through the array but just wanted to ask if there is a built in
function for it. and how would you know if there is a built-in-function
for a task you want to do? or is it by time-experiance combo?
thanks
------------------------------
Date: Mon, 22 Sep 2003 11:16:53 +0200
From: Matija Papec <mpapec@yahoo.com>
Subject: Re: length of the longest $_ in @_
Message-Id: <rretmvsvombhmiemf0ijrho35462dtkcbe@4ax.com>
On Mon, 22 Sep 2003 08:22:03 GMT, Sam <samj2@austarmetro.com.au>
wrote:
>Hello .... again :)
>after I search my book and the online hlep. trying to find it there is a
> built-in function to get the length of the longest item in a givin
>array. length will not do it and scalar @array will not do it. I can
>loop through the array but just wanted to ask if there is a built in
>function for it. and how would you know if there is a built-in-function
>for a task you want to do? or is it by time-experiance combo?
You'll have to loop through the array,
#untested
my $max = 0;
$_>$max && $max=$_ for map length, @arr;
or if you more prefer,
for (map length, @arr) {
$_>$max && $max=$_;
}
------------------------------
Date: 22 Sep 2003 09:52:57 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: length of the longest $_ in @_
Message-Id: <slrnbmthjp.49d.abigail@alexandra.abigail.nl>
Sam (samj2@austarmetro.com.au) wrote on MMMDCLXXIV September MCMXCIII in
<URL:news:3F6EB301.6080302@austarmetro.com.au>:
~~ Hello .... again :)
~~ after I search my book and the online hlep. trying to find it there is a
~~ built-in function to get the length of the longest item in a givin
~~ array. length will not do it and scalar @array will not do it. I can
~~ loop through the array but just wanted to ask if there is a built in
~~ function for it. and how would you know if there is a built-in-function
~~ for a task you want to do? or is it by time-experiance combo?
There's no buildin doing this. Of course, it's easy to write a loop.
Abigail
--
BEGIN {my $x = "Knuth heals rare project\n";
$^H {integer} = sub {my $y = shift; $_ = substr $x => $y & 0x1F, 1;
$y > 32 ? uc : lc}; $^H = hex join "" => 2, 1, 1, 0, 0}
print 52,2,10,23,16,8,1,19,3,6,15,12,5,49,21,14,9,11,36,13,22,32,7,18,24;
------------------------------
Date: Mon, 22 Sep 2003 09:26:07 GMT
From: f_baggins80@hotmail.com (Helgi Briem)
Subject: Re: Little survey for Unix users
Message-Id: <3f6ebf99.580780818@News.CIS.DFN.DE>
On 19 Sep 2003 03:20:55 -0700, c_j_marshall@hotmail.com (Chris
Marshall) wrote:
>Abigail <abigail@abigail.nl> wrote in message news:<slrnbmlaea.esh.abigail@alexandra.abigail.nl>...
>> Steve Hémond (shemond@hotmail.com) wrote on MMMDCLXX September MCMXCIII
>> in <URL:news:_muab.9341$hF3.1237617@news20.bellglobal.com>:
>> -- I'm not willing to start a religious war, but, what is your prefered editor
>> -- for works such as Perl programming? (Vi(m) or Emacs?)
>>
>>
>> Real (wo)men use 'cat'. Wussies use 'ed'. Vi and Emacs are for poofs.
>>
>Reminds me of a userfriendly strip:
>http://ars.userfriendly.org/cartoons/?id=19990508
You jest, but I know an engineer, who in the sixties had
some sort of "personal computer" that you programmed
by writing programs, translating into machine code, then
binary (by hand), then punching holes in paper tape
with a paper punch before feeding the tape through
the machine. He reckoned it still saved him months
of labour.
--
Helgi Briem hbriem AT simnet DOT is
Excuse the munged address. My last
e-mail address was killed by spammers.
------------------------------
Date: 22 Sep 2003 00:53:00 -0700
From: mjeff1@twcny.rr.com (Jeff Mott)
Subject: Operator Precedence
Message-Id: <970676ed.0309212353.1949ae95@posting.google.com>
Since the assignment operator has higher precedence than comma,
shouldn't the following line
my $s = substr "foo", 0, 1;
technically be interpreted as
(my $s = substr "foo"), 0, 1;
?
------------------------------
Date: Mon, 22 Sep 2003 08:08:41 +0000 (UTC)
From: Andreas Kahari <ak+usenet@freeshell.org>
Subject: Re: Operator Precedence
Message-Id: <slrnbmtbg8.er8.ak+usenet@vinland.freeshell.org>
In article <970676ed.0309212353.1949ae95@posting.google.com>, Jeff Mott wrote:
> Since the assignment operator has higher precedence than comma,
> shouldn't the following line
>
> my $s = substr "foo", 0, 1;
>
> technically be interpreted as
>
> (my $s = substr "foo"), 0, 1;
To assign to $s, the right hand side must be evaluated. You
have a call to substr() there (uses at most four arguments), so
the zero and the one will be interpreted as the second and third
argument of that function call.
When in doubt, use parantheses.
--
Andreas Kähäri
------------------------------
Date: 22 Sep 2003 09:55:59 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Operator Precedence
Message-Id: <slrnbmthpf.49d.abigail@alexandra.abigail.nl>
Jeff Mott (mjeff1@twcny.rr.com) wrote on MMMDCLXXIV September MCMXCIII in
<URL:news:970676ed.0309212353.1949ae95@posting.google.com>:
?? Since the assignment operator has higher precedence than comma,
?? shouldn't the following line
??
?? my $s = substr "foo", 0, 1;
??
?? technically be interpreted as
??
?? (my $s = substr "foo"), 0, 1;
No. The reason is spelled out in the first section of the
description part of 'man perlop'.
Abigail
--
perl -le 's[$,][join$,,(split$,,($!=85))[(q[0006143730380126152532042307].
q[41342211132019313505])=~m[..]g]]e and y[yIbp][HJkP] and print'
------------------------------
Date: 22 Sep 2003 02:57:08 -0700
From: rnbhat89@yahoo.com (bhat)
Subject: problem fetching the total number of rows newbie
Message-Id: <4f49dc09.0309220157.21095655@posting.google.com>
Hello,
I am working on a mail server program ie my program reads the mail
from the mail server and dumps into the database(MYSQL). All the
messages are being kept in the table TB_MESSAGE. Table is being
designed as below
COUNT_ID PRIMARY KEY, --counter to keep track of the number of
messages
THREAD_ID -- used to identify the grouping of related messages
SUBJECT,
AFROM,
ATO,
MESSAGE_INDICATOR #--indicates whether it is a new message or not
REPLIED_OR_NOT #--zero for new messages
MESSAGE_STATUS
etc.
#--example(data is being stored as below
COUNT_ID THREAD_ID MESSAGE_INDICATOR
100 THOO23 1
101 THOO24 1
102 THOO25 0
103 THOO23 0
104 THOO23 0
i want to get new messages from the TB_MESSAGE and also the count of
number of related messages of this
message.
ie my query should get the results as below
COUNT_ID COUNT(THREAD_ID)
100 3
101 1
How should i write the query ? Actually i was doing it as below
#--the below query runs for 2 times and gets 100 and 101.
SELECT COUNT_ID,AFROM,SUBJECT,THREAD_ID FROM TB_MESSAGE WHERE
MESSAGE_INDICATOR=1 GROUP BY THREAD_ID ORDER BY SEARCH_DATE
DESC,COUNT_ID DESC;
while()
{
#--i get the count(*)
#--get the thread_id form the outer query and use it in the below
query.
SELECT COUNT(*) FROM TB_MESSAGE WHERE THREAD_ID=?
{
}
}
#--if i use the above scenario it takes a long time to display the
messges. Since the second query is being executed throughout the
while loop. Can i write a single query to do the above functinality.
#--the below query doesn't work.
SELECT A.THREAD_ID,COUNT(*) FROM TB_MESSAGE A,TB_MESSAGE B WHERE
A.COUNT_ID=B.COUNT_ID AND A.MESSAGE_INDICATOR=1 AND A.REPLIED_OR_NOT=0
AND (A.MESSAGE_STATUS=1 OR A.MESSAGE_STATUS=4 OR A.MESSAGE_STATUS=2)
GROUP BY B.THREAD_ID;
Could any one help me in building this query.
Thanks in Advance,
Regards,
Shirley.
------------------------------
Date: Mon, 22 Sep 2003 20:45:33 +1200
From: "Tintin" <me@privacy.net>
Subject: Re: Sending html mail with inline images
Message-Id: <bkmcu3$32brg$1@ID-172104.news.uni-berlin.de>
"Sebastian Scholz" <mcbass@lightsphere.de> wrote in message
news:bkl4i7$dem$1@newsreader2.netcologne.de...
>
> "zentara" <zentara@highstream.net> schrieb im Newsbeitrag
> news:5bdrmvoppcr864t1f3f5edfjc8pl7docrg@4ax.com...
> > On Sat, 20 Sep 2003 20:50:28 +0200, "Sebastian Scholz"
> > <mcbass@lightsphere.de> wrote:
> >
> > >Hi
> > >
> > > I wrote a small script to send a html mail with inline images using
> > >mail:sender. Sending html mails without the images works fine, but when
I
> > >try to have the images sent with the mail I only get the html and the
> image
> > >attached to the mail. I used the example for the mail:sender module but
> that
> > >did not work. Here is my code snippet :
> >
> > To have the image shown inline, you need to use the ID tag and cid: tag
> > as demonstrated in the script below. You probably can work them into
> > your code.
[snipped MIME::Lite example]
> Thanks, but MIME::Lite does not seem to be enable me to login onto the
smtp
> server as I can with Mail::Sender ..... or am I wrong ?
MIME::Lite either uses sendmail or makes use of Net::SMTP
------------------------------
Date: Mon, 22 Sep 2003 04:10:13 GMT
From: shb*NO*SPAM*@comporium.net (Si Ballenger)
Subject: Re: some stupid questions about string search & replace in perl
Message-Id: <3f6e7569.782704529@news.comporium.net>
Tad has a vision of hell: ;-)
>>> [Re-located. Please do NOT top-post. Your writing should go BELOW the
>> part you're writing about]
>
>
>Do you know what "top post" means?
>
>If not, ask.
>
>If so, then please honor the request to stop doing it. Soon.
>
>
>--
> Tad McClellan SGML consulting
> tadmc@augustmail.com Perl programming
> Fort Worth, Texas
------------------------------
Date: Mon, 22 Sep 2003 07:40:57 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: some stupid questions about string search & replace in perl
Message-Id: <3F6EA778.C8499DB9@acm.org>
walala wrote:
>
> sorry, for that problem 3, I guess what I want is to remove the "\" at the
> end of each line and add a "+" to the beginning of the next line(not the
> front of that line, but next line)...
>
> Can you statement still do the work?
Did you try it?
John
--
use Perl;
program
fulfillment
------------------------------
Date: Mon, 22 Sep 2003 04:49:32 +1000
From: "Bob" <nemail@hotmail.com>
Subject: Re: This probably aint the right place . . . but there's no real newsgroup for MySQL
Message-Id: <I%wbb.4282$d6.159444@nasal.pacific.net.au>
Erik Max Francis wrote in message <3F6E3A1F.7A2D9F7@alcyone.com>...
:Michael Budash wrote:
:
:> he said: "my lame ISp never so much as answers my questions", not: "my
:> lame ISp won't teach me programming and it's their responsibility".
:
:That's right. Yet the question he had was about programming, not
:something related to his ISP's technical support.
:
No, it wasn't a programming question in fact, more a question as to 'where
is typically', rather than 'how to' and I regard a 'where is' question a
technical support question, you know, something someone new in a job might
ring a sys admin to ask, I have tried my 'sys admin' but they are out having
a smoke by the loook of things.
------------------------------
Date: Mon, 22 Sep 2003 04:44:51 +1000
From: "Bob" <nemail@hotmail.com>
Subject: Re: This probably aint the right place . . . but there's no real newsgroup for MySQL
Message-Id: <G%wbb.4280$d6.159312@nasal.pacific.net.au>
Erik Max Francis wrote in message <3F6E1B4F.7AB68296@alcyone.com>...
:Michael Budash wrote:
:
:> > Hope you don't mind me crossposting this but I'd really like to get
:> > a few
:> > responses as my lame ISp never so much as answers my questions.
:>
:> change isps, life's too short...
:
:Why should it be his ISP's responsibility to teach him programming?
:
Well it's not my ISP's responsibilty to 'teach me programming' I agree but
some sort of info as to where and if I can create a database might be
considered considerate given the money I pay them for the service.
:--
: Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
: __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
:/ \ Sometimes there's no point in giving up.
:\__/ Louis Wu
------------------------------
Date: Mon, 22 Sep 2003 04:46:46 +1000
From: "Bob" <nemail@hotmail.com>
Subject: Re: This probably aint the right place . . . but there's no real newsgroup for MySQL
Message-Id: <H%wbb.4281$d6.159382@nasal.pacific.net.au>
Michael Budash wrote in message ...
:In article <3F6E1B4F.7AB68296@alcyone.com>,
: Erik Max Francis <max@alcyone.com> wrote:
:
:> Michael Budash wrote:
:>
:> > > Hope you don't mind me crossposting this but I'd really like to
:> > > get a few responses as my lame ISp never so much as answers my
:> > > questions.
:> >
:> > change isps, life's too short...
:>
:> Why should it be his ISP's responsibility to teach him programming?
:
:he said: "my lame ISp never so much as answers my questions", not: "my
:lame ISp won't teach me programming and it's their responsibility".
:
Thanks for taking the time and consideration to answer my questions Mike, it
is much appreciated.
------------------------------
Date: 22 Sep 2003 09:17:10 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: wtf is the deal?
Message-Id: <slrnbmtfgm.48o.abigail@alexandra.abigail.nl>
Eric Bohlman (ebohlman@earthlink.net) wrote on MMMDCLXXI September
MCMXCIII in <URL:news:Xns93FB8E929B0CFebohlmanomsdevcom@130.133.1.4>:
'' "Tom" <tom@nosleep.net> wrote in news:3f6b4a8f$1@nntp0.pdx.net:
''
'' > OK, but one final word. In my work, the entire threads must be kept
'' > intact so everyone involved can follow the flow and know all the
'' > details.
''
'' In Usenet, unlike arbitrary email exchanges, we have threading, message-
'' IDs, and archives to achieve those goals. Therefore it's not necessary for
'' each new article in a thread to embody the entire history of the thread.
'' I strongly suspect that many of the email conventions in your work are
'' based more on CYA considerations than anything else, considerations that
'' don't apply here.
There are still MUA out there that can't thread? And people actually
use them?
I never top-post, not even in "corporate" email.
Abigail
--
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");
------------------------------
Date: Sat, 19 Jul 2003 01:59:56 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re:
Message-Id: <3F18A600.3040306@rochester.rr.com>
Ron wrote:
> Tried this code get a server 500 error.
>
> Anyone know what's wrong with it?
>
> if $DayName eq "Select a Day" or $RouteName eq "Select A Route") {
(---^
> dienice("Please use the back button on your browser to fill out the Day
> & Route fields.");
> }
...
> Ron
...
--
Bob Walton
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 5540
***************************************