[22690] in Perl-Users-Digest
Perl-Users Digest, Issue: 4911 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 29 14:13:47 2003
Date: Tue, 29 Apr 2003 11:10:10 -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 Tue, 29 Apr 2003 Volume: 10 Number: 4911
Today's topics:
Re: setting a variable from a line in a file <peter_wilson@mail.com>
Splitting string in array by 2 characters <kderaedt@hotmail.com>
Re: Splitting string in array by 2 characters <Andrew.McGregor@amtrak.co.uk>
Re: Splitting string in array by 2 characters (Anno Siegel)
Re: Splitting string in array by 2 characters <kderaedt@hotmail.com>
Re: Splitting string in array by 2 characters <josef.moellers@fujitsu-siemens.com>
Re: Splitting string in array by 2 characters <bart.lateur@pandora.be>
Re: Test::Harness annoyance + perldoc format (remove the obvious)
Using Perl/Tk Progress Bar <motis@lyciumnetworks.com>
Re: Using Perl/Tk Progress Bar <peter_wilson@mail.com>
Re: Using Perl/Tk Progress Bar <motis@lyciumnetworks.com>
Re: Using Perl/Tk Progress Bar <lusol@cube0.CC.Lehigh.EDU>
What is AutoSearch and where do I find it? <sebastienb@nospam.nospam>
Re: WTB: Programming PERL DBI <willis3140@yahoo.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 29 Apr 2003 13:29:14 +0000 (UTC)
From: "Peter Wilson" <peter_wilson@mail.com>
Subject: Re: setting a variable from a line in a file
Message-Id: <b8luna$i6l$1@titan.btinternet.com>
"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrnbarhpu.inp.tadmc@magna.augustmail.com...
> Peter Wilson <peter_wilson@mail.com> wrote:
>
> > open(filelist,$list_of_files_filename)
>
>
> There are three things wrong with that line of code.
>
> Do you know what they are?
>
>
> > open(htmlfile,$_);
>
>
> Only two things on that one.
>
>
> --
> Tad McClellan SGML consulting
> tadmc@augustmail.com Perl programming
> Fort Worth, Texas
Yeah but it made the point and he was happy.
------------------------------
Date: Tue, 29 Apr 2003 15:07:33 +0200
From: "kderaedt" <kderaedt@hotmail.com>
Subject: Splitting string in array by 2 characters
Message-Id: <3eae7916$0$32464$ba620e4c@reader0.news.skynet.be>
Hi,
This is probably a dummy question. I'm trying to split a string into a
array, each value of the array should contain 2 characters.
Example.
0A000200010103020407040906030207020000
Thanks
Karel
------------------------------
Date: Tue, 29 Apr 2003 14:13:23 +0100
From: Andrew McGregor <Andrew.McGregor@amtrak.co.uk>
Subject: Re: Splitting string in array by 2 characters
Message-Id: <3EAE7A73.5030508@amtrak.co.uk>
kderaedt wrote:
> Hi,
>
> This is probably a dummy question. I'm trying to split a string into a
> array, each value of the array should contain 2 characters.
>
> Example.
> 0A000200010103020407040906030207020000
>
perldoc -f substr
perldoc -f sprintf
if you get any problems then post some example code.
------------------------------
Date: 29 Apr 2003 13:22:12 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Splitting string in array by 2 characters
Message-Id: <b8lua4$d4u$2@mamenchi.zrz.TU-Berlin.DE>
kderaedt <kderaedt@hotmail.com> wrote in comp.lang.perl.misc:
> Hi,
>
> This is probably a dummy question. I'm trying to split a string into a
> array, each value of the array should contain 2 characters.
>
> Example.
> 0A000200010103020407040906030207020000
You mean with no overlaps?
my @parts = $str =~ /(..)/;
Another applicatiopn of m// in list context.
Anno
------------------------------
Date: Tue, 29 Apr 2003 15:27:52 +0200
From: "kderaedt" <kderaedt@hotmail.com>
Subject: Re: Splitting string in array by 2 characters
Message-Id: <3eae7dd9$0$32453$ba620e4c@reader0.news.skynet.be>
I was trying with
@MSISDN = unpack((length($Field[0])/2), $Field[0]);
"kderaedt" <kderaedt@hotmail.com> wrote in message
news:3eae7916$0$32464$ba620e4c@reader0.news.skynet.be...
> Hi,
>
> This is probably a dummy question. I'm trying to split a string into
a
> array, each value of the array should contain 2 characters.
>
> Example.
> 0A000200010103020407040906030207020000
>
> Thanks
>
> Karel
>
>
------------------------------
Date: Tue, 29 Apr 2003 15:45:37 +0200
From: Josef =?iso-8859-1?Q?M=F6llers?= <josef.moellers@fujitsu-siemens.com>
Subject: Re: Splitting string in array by 2 characters
Message-Id: <3EAE8201.5E8803DD@fujitsu-siemens.com>
Anno Siegel wrote:
> =
> kderaedt <kderaedt@hotmail.com> wrote in comp.lang.perl.misc:
> > Hi,
> >
> > This is probably a dummy question. I'm trying to split a string =
into a
> > array, each value of the array should contain 2 characters.
> >
> > Example.
> > 0A000200010103020407040906030207020000
> =
> You mean with no overlaps?
> =
> my @parts =3D $str =3D~ /(..)/;
You mean
my @parts =3D $str =3D~ /(..)/g;
(with the "g")?
$str =3D '0A000200010103020407040906030207020000';
@parts =3D $str =3D~ /(..)/;
print join(" ", @parts), "\n";
0A
$str =3D '0A000200010103020407040906030207020000';
@parts =3D $str =3D~ /(..)/g;
print join(" ", @parts), "\n";
0A 00 02 00 01 01 03 02 04 07 04 09 06 03 02 07 02 00 00
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
------------------------------
Date: Tue, 29 Apr 2003 14:21:06 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Splitting string in array by 2 characters
Message-Id: <sg2tavs21sa7gen3fepqr2g1etjjuq4dcc@4ax.com>
kderaedt wrote:
> This is probably a dummy question. I'm trying to split a string into a
>array, each value of the array should contain 2 characters.
>
>Example.
>0A000200010103020407040906030207020000
$_ = '0A000200010103020407040906030207020000';
@pairs = /../sg;
In case the number of characters could be old, modify it to
@pairs = /..?/sg;
which probably will be a bit slower.
--
Bart.
------------------------------
Date: Tue, 29 Apr 2003 16:41:57 GMT
From: "--Rick" <no_trick@my-de(remove the obvious)ja.com>
Subject: Re: Test::Harness annoyance + perldoc format
Message-Id: <pXxra.130701$ja4.5739234@bgtnsc05-news.ops.worldnet.att.net>
"Sisyphus" <kalinabears@hdc.com.au> wrote in message
news:3eadf8f8$0$22583@echo-01.iinet.net.au...
|
| "James E Keenan" <jkeen@concentric.net> wrote in message
| news:b8kg4j$8ff@dispatch.concentric.net...
| >
| > This sounds like a cousin to the problem I reported a couple of
months
| back:
| > That when I installed ActivePerl 8.0 (Perl 5.8.0) on Win95, I got
screwy
| > results in the console when I called 'perldoc'. The solution
(short of
| > installing arcane patches) was to wait till I was upgraded to
Win2K before
| > installing 5.8.
| >
| >
| >
|
| Yes - I recall that saga :-)
|
| The key to this one was the use of "\r". Was "\r" involved with the
one you
| refer to ? I can't recall now.
|
| 'print "$x\r";' will return the cursor to its original starting
position if
| and only if length($x) is less than or equal to the width of the
cmd.exe
| console.
|
| Wonder if it's the same on other consoles ...... or is this just
another of
| the privileges associated with this wonderful os ?
|
| Cheers,
| Rob
|
That one was related to the interaction of the OS pager and perldoc.
One of the work-arounds was to install less.exe on the Win98 machine,
and set pager to it in the environment. I used that on my console at
work.
The other was to install a module that contains an earlier version of
perldoc. I'll have to look it up and report the module name. I did
that on my console at home.
Both work fine.
This was discussed in a perlbug report and the module name may also
have been listed there. Joseph Newton was one of the primary
participants in the discussion.
--Rick
------------------------------
Date: Tue, 29 Apr 2003 18:54:11 +0200
From: "012" <motis@lyciumnetworks.com>
Subject: Using Perl/Tk Progress Bar
Message-Id: <3eaea054@news.012.net.il>
Hello
I'm using Progress bar in perl/tk script to indicate the estimated time till
the script finish proccesing.
Instead of climbing slowly progress bar it looks like the progress bar is
updated at the end of the proccess.
Is there any way to see the progress bar climbing?
Thanks
Moti
------------------------------
Date: Tue, 29 Apr 2003 16:04:43 +0000 (UTC)
From: "Peter Wilson" <peter_wilson@mail.com>
Subject: Re: Using Perl/Tk Progress Bar
Message-Id: <b8m7qr$iii$1@sparta.btinternet.com>
"012" <motis@lyciumnetworks.com> wrote in message
news:3eaea054@news.012.net.il...
> Hello
> I'm using Progress bar in perl/tk script to indicate the estimated time
till
> the script finish proccesing.
> Instead of climbing slowly progress bar it looks like the progress bar is
> updated at the end of the proccess.
> Is there any way to see the progress bar climbing?
> Thanks
> Moti
>
>
are you calling $mw->update() after giving the bar a new value?
Pete
------------------------------
Date: Tue, 29 Apr 2003 19:19:42 +0200
From: "012" <motis@lyciumnetworks.com>
Subject: Re: Using Perl/Tk Progress Bar
Message-Id: <3eaea652@news.012.net.il>
Thanks a lot!!
That what was missing...
"Peter Wilson" <peter_wilson@mail.com> wrote in message
news:b8m7qr$iii$1@sparta.btinternet.com...
>
> "012" <motis@lyciumnetworks.com> wrote in message
> news:3eaea054@news.012.net.il...
> > Hello
> > I'm using Progress bar in perl/tk script to indicate the estimated time
> till
> > the script finish proccesing.
> > Instead of climbing slowly progress bar it looks like the progress bar
is
> > updated at the end of the proccess.
> > Is there any way to see the progress bar climbing?
> > Thanks
> > Moti
> >
> >
>
> are you calling $mw->update() after giving the bar a new value?
>
> Pete
>
>
------------------------------
Date: 29 Apr 2003 16:22:02 GMT
From: Steve Lidie <lusol@cube0.CC.Lehigh.EDU>
Subject: Re: Using Perl/Tk Progress Bar
Message-Id: <b8m8ra$d2e@fidoii.CC.Lehigh.EDU>
012 <motis@lyciumnetworks.com> wrote:
> Hello
> I'm using Progress bar in perl/tk script to indicate the estimated time till
> the script finish proccesing.
> Instead of climbing slowly progress bar it looks like the progress bar is
> updated at the end of the proccess.
> Is there any way to see the progress bar climbing?
> Thanks
> Moti
>
>
First, you'll get better answers in comp.lang.perl.tk.
Second, examine the CPAN module Tk::Copy::Mac and the update() method. This
recursive copy widget displays a Tk::ProgressBar::Mac widget dynamically, as
well as bytes remaining, time remaining, transfer rate, etc. You'll see how
to keep all this happening w/o blocking the application. You didn't tell us
what your blocking code is doing, so some other techniques may be required
as well.
------------------------------
Date: Tue, 29 Apr 2003 15:42:27 GMT
From: "Sebastien B." <sebastienb@nospam.nospam>
Subject: What is AutoSearch and where do I find it?
Message-Id: <D3xra.44864$kYH.14305@news01.bloor.is.net.cable.rogers.com>
I'm trying to install WWW::Search but it keeps crapping out (see bottom).
What is this AutoSearch.PL it's looking for and where the heck do I find
it?? I looked on CPAN but there's nothing there about it.
Writing Makefile for WWW::Search
mkdir blib
mkdir blib/lib
mkdir blib/lib/WWW
mkdir blib/arch
mkdir blib/arch/auto
mkdir blib/arch/auto/WWW
mkdir blib/arch/auto/WWW/Search
mkdir blib/lib/auto
mkdir blib/lib/auto/WWW
mkdir blib/lib/auto/WWW/Search
mkdir blib/man1
mkdir blib/man3
cp lib/WWW/Search/Test.pm blib/lib/WWW/Search/Test.pm
cp lib/WWW/Search.pm blib/lib/WWW/Search.pm
cp lib/WWW/Search/Simple.pm blib/lib/WWW/Search/Simple.pm
cp lib/WWW/Search/Null/Empty.pm blib/lib/WWW/Search/Null/Empty.pm
cp lib/WWW/Search/Null.pm blib/lib/WWW/Search/Null.pm
cp lib/WWW/Search/Null/Count.pm blib/lib/WWW/Search/Null/Count.pm
cp lib/WWW/Search/Null/Error.pm blib/lib/WWW/Search/Null/Error.pm
cp lib/WWW/Search/Result.pm blib/lib/WWW/Search/Result.pm
cp lib/WWW/SearchResult.pm blib/lib/WWW/SearchResult.pm
/usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl5/5.6.0/i386-linux -I/us
r/lib/perl5/5.6.0 AutoSearch.PL AutoSearch
Extracting AutoSearch (with variable substitutions)
AutoSearch.PL AutoSearch
make: AutoSearch.PL: Command not found
make: *** [AutoSearch] Error 127
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
--
------------------------------
Date: Tue, 29 Apr 2003 16:42:50 GMT
From: w i l l <willis3140@yahoo.com>
Subject: Re: WTB: Programming PERL DBI
Message-Id: <8ratavo51nauqabndptn5upmn3nli1l61c@4ax.com>
I have a copy of that book, it's practically brand new!
How much would you offer for it?
-will
On Sun, 27 Apr 2003 19:26:57 -0400, noipont@mailcity.com wrote:
>Does anybody know where I can find this book? Possibly a used
>one in. TIA.. George
------------------------------
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 4911
***************************************