[25934] in Perl-Users-Digest
Perl-Users Digest, Issue: 8154 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 7 18:05:28 2005
Date: Tue, 7 Jun 2005 15:05:07 -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, 7 Jun 2005 Volume: 10 Number: 8154
Today's topics:
Re: Generating formatted documents in Perl <russeld@pobox.com>
iterating over a hashref of hashrefs <perlquestions@mail.com>
Re: iterating over a hashref of hashrefs <mark.clementsREMOVETHIS@wanadoo.fr>
Re: iterating over a hashref of hashrefs xhoster@gmail.com
Re: iterating over a hashref of hashrefs <john@castleamber.com>
Re: Link List matching <matteod@intelcocomm.com>
Re: Multilanguage capable scripts howto? <1usa@llenroc.ude.invalid>
Re: Multilanguage capable scripts howto? <noreply@gunnar.cc>
Re: Multilanguage capable scripts howto? <krienke@uni-koblenz.de>
Re: Multilanguage capable scripts howto? <1usa@llenroc.ude.invalid>
Out of memory in perldb <vdheuv.losetheMouse@kabelMickeyfoon.nl>
perl one liner to display the third line from the end o <shankeypNO_SPAM@comcast.net>
Re: perl one liner to display the third line from the e <jgibson@mail.arc.nasa.gov>
Re: perl one liner to display the third line from the e <no@email.com>
Re: random numbers <caesar@miskatonic.edu>
Re: Randomly selecting Variables <sbryce@scottbryce.com>
Re: summarize bytes <joe@inwap.com>
symbol table question <rtrahan@optonline.net>
Re: symbol table question <nobull@mail.com>
Re: symbol table question <rtrahan@optonline.net>
Re: symbol table question <jgibson@mail.arc.nasa.gov>
Tk::FileSelect hangs on W98 root directory <rtrahan@optonline.net>
Re: Tk::FileSelect hangs on W98 root directory <1usa@llenroc.ude.invalid>
Re: Tk::FileSelect hangs on W98 root directory <rtrahan@optonline.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 07 Jun 2005 13:23:52 -0500
From: Russel Dalenberg <russeld@pobox.com>
Subject: Re: Generating formatted documents in Perl
Message-Id: <CPKdndPAboQ3ezjfRVn-uA@io.com>
Tad McClellan wrote:
> Russel Dalenberg <russeld@pobox.com> wrote:
>
>>I'm trying to write a Perl program that will output a simple catalog. I'd
>>like to produce something nicer than raw text output.
>
>>fields in columns. I'd like to provide headers and footers with page
>>numbers (in alternating corners for even/odd pages, if possible).
>
>>or is there some
>>other way that I should use to generate formatted output.
>
>
> I'd generate *structured* output from your Perl (or other) program,
> and have some other program format that for me.
Humm ... the first part is pretty easy; the input is already pretty
structured to begin with. But I was really hoping not to have to depend on
any other software to generate the final document. Maybe that's not as
easy as I had hoped.
>>and see if I can generate troff files. :-)
>
> I'd generate XML, perhaps in a catalog-specific schema or even
> in DocBook, and let one of the bazillion XML processors turn it
> into PDF, or troff or HTML or...
I don't know much about XML. From what I can see, generating simple XML
from my input data would be easy, but how does that give me paginated
output? I only mentioned troff because long ago and far away I used to
generate documents by hand that way, and I know it can handle pages with
headers and footers.
--
Russel Dalenberg
russeld@pobox.com
------------------------------
Date: Tue, 7 Jun 2005 14:21:09 -0400
From: "Sam" <perlquestions@mail.com>
Subject: iterating over a hashref of hashrefs
Message-Id: <d84oim$hnu$1@newslocal.mitre.org>
I have a data structure that looks like this:
$self->{'foo'}->{'bar'}->{'dog'} = "fred";
$self->{'foo'}->{'bar'}->{'blue'}->{'cat'} = "barney";
$self->{'foo'}->{'ban'}->{'dog'} = "wilma";
$self->{'foo'}->{'ban'}->{'cat'} = "betty";
$self->{'foo'}->{'bas'}->{'dog'}= "bambam";
$self->{'foo'}->{'bas'}->{'cat'} = "dino";
Where I want all entries which have a key = "cat". The trick is that the
depth of the hashref tree is not constant. (line2) otherwise I'd just use a
bunch of nested foreach statements.
------------------------------
Date: 07 Jun 2005 18:41:44 GMT
From: "Mark Clements" <mark.clementsREMOVETHIS@wanadoo.fr>
Subject: Re: iterating over a hashref of hashrefs
Message-Id: <42a5ea68$0$1221$8fcfb975@news.wanadoo.fr>
Sam wrote:
> I have a data structure that looks like this:
> $self->{'foo'}->{'bar'}->{'dog'} = "fred";
> $self->{'foo'}->{'bar'}->{'blue'}->{'cat'} = "barney";
>
>
> $self->{'foo'}->{'ban'}->{'dog'} = "wilma";
> $self->{'foo'}->{'ban'}->{'cat'} = "betty";
>
>
> $self->{'foo'}->{'bas'}->{'dog'}= "bambam";
> $self->{'foo'}->{'bas'}->{'cat'} = "dino";
>
> Where I want all entries which have a key = "cat". The trick is that the
> depth of the hashref tree is not constant. (line2) otherwise I'd just use a
> bunch of nested foreach statements.
You need to put your question in the body of the message, otherwise it isn't clear
exactly what you are asking. Read the posting guidelines.
Assuming that what you want is:
an algorithm to retrieve all items in the structure with a keyname of "cat"
then:
a) you can use a recursive algorithm to traverse your structure.
b) you can use an iterative algorithm to traverse your structure (may require more work)
c) you can maintain a secondary data structure indexing where "cat" entries are, making
it easier to pull them out again afterwards.
Mark
------------------------------
Date: 07 Jun 2005 18:46:58 GMT
From: xhoster@gmail.com
Subject: Re: iterating over a hashref of hashrefs
Message-Id: <20050607144658.366$UZ@newsreader.com>
"Sam" <perlquestions@mail.com> wrote:
> I have a data structure that looks like this:
> $self->{'foo'}->{'bar'}->{'dog'} = "fred";
> $self->{'foo'}->{'bar'}->{'blue'}->{'cat'} = "barney";
>
> $self->{'foo'}->{'ban'}->{'dog'} = "wilma";
> $self->{'foo'}->{'ban'}->{'cat'} = "betty";
>
> $self->{'foo'}->{'bas'}->{'dog'}= "bambam";
> $self->{'foo'}->{'bas'}->{'cat'} = "dino";
>
> Where I want all entries which have a key = "cat".
Which key? Will 'cat' only occur as a key in the lowest level of nesting?
sub foo {
return unless ref $_[0];
return map {$_ eq 'cat'? $_[0]{$_} : foo ($_[0]{$_})} keys %{$_[0]};
};
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: 7 Jun 2005 18:50:59 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: iterating over a hashref of hashrefs
Message-Id: <Xns966E8CB98EFF8castleamber@130.133.1.4>
Sam wrote:
> I have a data structure that looks like this:
> $self->{'foo'}->{'bar'}->{'dog'} = "fred";
> $self->{'foo'}->{'bar'}->{'blue'}->{'cat'} = "barney";
>
>
> $self->{'foo'}->{'ban'}->{'dog'} = "wilma";
> $self->{'foo'}->{'ban'}->{'cat'} = "betty";
>
>
> $self->{'foo'}->{'bas'}->{'dog'}= "bambam";
> $self->{'foo'}->{'bas'}->{'cat'} = "dino";
>
> Where I want all entries which have a key = "cat". The trick is that
> the depth of the hashref tree is not constant. (line2) otherwise I'd
> just use a bunch of nested foreach statements.
find( 'cat', $self );
sub find {
my ( $query, $hash ) = @_;
for my $key ( keys %$hash ) {
my $item = $hash->{ $key };
if ( ref $item ) {
find( $query, $item );
next;
}
if ( $key eq $query ) {
print "Found $query: $item\n";
}
}
}
I have written it out a bit, since I don't know your exact requirements
(sort order, etc), but this is a way to do such a thing: recursive tree
traversal (in this case depth first). If you want to search first at the
same level before going to the next level, you can do something like:
if ( ref $item ) {
push @todo, $key;
next;
}
and add after the for:
find( $query, $hash->{ $_ } ) for @todo;
(untested, etc).
--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
------------------------------
Date: 7 Jun 2005 16:39:02 -0500
From: "Matteo D'Amato" <matteod@intelcocomm.com>
Subject: Re: Link List matching
Message-Id: <Xns966EB3FD5CE67matteodintelcocommco@216.40.28.72>
Hi,
I have a pipe delimited text file containing country codes with their
country names. i.e.
30741|Greece - Corinth
30751|Greece - Argos
30821|Greece - Crete
31|Netherlands
316|Netherlands - Mobile
319|Netherlands - Mobile
3110|Netherlands - Rotterdam
3120|Netherlands - Amsterdam
3123|Netherlands - Haarlem/Heemstede
This is just a sample, the actual file contains 19732 lines. Now I need to
write a program that will take in a full phone number as an argument i.e.
308212398721 -> and will return 'Greece - Crete' and matched prefix '30821'
I tried to used the link list example from the PERL FAQ, but it takes 7
minutes just to read the file and build the tree. Can anyone give me some
guide lines on how to write this in the fastest way using Perl. Thanks
--Matteo
------------------------------
Date: Tue, 07 Jun 2005 13:00:20 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Multilanguage capable scripts howto?
Message-Id: <Xns966E5B5EBAF59asu1cornelledu@127.0.0.1>
Rainer Krienke <krienke@uni-koblenz.de> wrote in
news:d83ipu$j29$1@news.uni-koblenz.de:
> A. Sinan Unur wrote:
>
>
>>> <URL:
>>> http://search.cpan.org/~nwclark/perl-5.8.7/lib/Locale/Maketext.pod>
>>
>> Actually, you probably want:
>>
>> <URL: http://search.cpan.org/~sburke/Locale-Maketext-1.09/>
>
> Thanks for the hint. Actually I tried Locale::Maketext::Simple but
> without any success.
Sorry, I have never used that module.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)
comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
------------------------------
Date: Tue, 07 Jun 2005 15:50:00 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Multilanguage capable scripts howto?
Message-Id: <3gln1kFclh2bU1@individual.net>
Rainer Krienke wrote:
> The perl script t.pl:
>
> #!/usr/bin/perl
> package t;
> use Locale::Maketext::Simple (
> Path => '/home/krienke/tmp/perl/auto'
> );
> loc_lang('de_DE'); # also tried "de" or without loc_lang
There you set the language explicitly, while I was under the impression
that your problem was how to derive it from the current LOCALE.
> The file t.po looks like this:
>
> # translator-comments
> #. automatic-comments
> #: reference...
> #, flag...
> msgid "Hello"
> msgstr "Hallo"
That looks like the gettext format. However, shouldn't the file be named
de.po, and the other file de.mo, or else how would the module know from
which file it's supposed to grab the string 'Hallo'?
Just guessing here ... I know nothing about Locale::Maketext::Simple.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Tue, 07 Jun 2005 16:28:45 +0200
From: Rainer Krienke <krienke@uni-koblenz.de>
Subject: Re: Multilanguage capable scripts howto?
Message-Id: <d84aut$jj9$1@news.uni-koblenz.de>
Gunnar Hjalmarsson wrote:
> Rainer Krienke wrote:
>> The perl script t.pl:
>>
>> #!/usr/bin/perl
>> package t;
>> use Locale::Maketext::Simple (
>> Path => '/home/krienke/tmp/perl/auto'
>> );
>> loc_lang('de_DE'); # also tried "de" or without loc_lang
>
> There you set the language explicitly, while I was under the impression
> that your problem was how to derive it from the current LOCALE.
>
Thank good. You had the right idea. I thought (the documentation does not
drop a word about this) that it the filename had to be according to the
name of the package ("t") and that in auto/ there should be a structure
like it is in /usr/share/locale i.e. subdirectories with the locale names
like de_DE or en_US, ... But this was not true.
I renamed the mo-file in auto/ to de.mo and suddenly it worked.
Thanks a lot.
Rainer
------------------------------
Date: Tue, 07 Jun 2005 15:33:30 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Multilanguage capable scripts howto?
Message-Id: <Xns966E7556687C1asu1cornelledu@127.0.0.1>
Rainer Krienke <krienke@uni-koblenz.de> wrote in
news:d84aut$jj9$1@news.uni-koblenz.de:
> Gunnar Hjalmarsson wrote:
>
>> Rainer Krienke wrote:
>>> The perl script t.pl:
>>>
>>> #!/usr/bin/perl
>>> package t;
>>> use Locale::Maketext::Simple (
>>> Path => '/home/krienke/tmp/perl/auto'
>>> );
>>> loc_lang('de_DE'); # also tried "de" or without loc_lang
>>
>> There you set the language explicitly, while I was under the
>> impression that your problem was how to derive it from the current
>> LOCALE.
>>
>
> Thank good. You had the right idea. I thought (the documentation does
> not drop a word about this)
Not true:
> that it the filename had to be according to the name of the package
> ("t") and that in auto/ there should be a structure like it is in
> /usr/share/locale i.e. subdirectories with the locale names like
> de_DE or en_US, ... But this was not true.
From the module documentation:
SYNOPSIS
Minimal setup (looks for auto/Foo/*.po and auto/Foo/*.mo):
package Foo;
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)
comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
------------------------------
Date: Tue, 7 Jun 2005 17:47:47 +0200
From: "Theo van den Heuvel" <vdheuv.losetheMouse@kabelMickeyfoon.nl>
Subject: Out of memory in perldb
Message-Id: <42a5c2b6$0$75695$58c7af7e@news.kabelfoon.nl>
Hi everybody,
I am getting an Out of Memory error while debugging my program with perldb.
It does not happen with perl. In fact, it happens when I issue a command
like:
x $_
(note that it does not occur with p $_). I have not messed with .perldb.
I have no idea where to look.
Any suggestions?
TIA
Theo van den Heuvel
------------------------------
Date: Tue, 7 Jun 2005 14:27:10 -0500
From: "Oxnard" <shankeypNO_SPAM@comcast.net>
Subject: perl one liner to display the third line from the end of a file
Message-Id: <caadnSguucGMaDjfRVn-pA@comcast.com>
perl v5.8.0
Assuming the file is a random length text file.
I know I can do this in a Perl script, however I would like to add the one
liner to an shell script.
Anyone have idea ideas on how to do this?
------------------------------
Date: Tue, 07 Jun 2005 13:03:25 -0700
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: perl one liner to display the third line from the end of a file
Message-Id: <070620051303252250%jgibson@mail.arc.nasa.gov>
In article <caadnSguucGMaDjfRVn-pA@comcast.com>, Oxnard
<shankeypNO_SPAM@comcast.net> wrote:
> perl v5.8.0
>
> Assuming the file is a random length text file.
> I know I can do this in a Perl script, however I would like to add the one
> liner to an shell script.
> Anyone have idea ideas on how to do this?
You know you can do what? Oh, wait. The question is in the Subject
line. You are more likely to get good answers if you put your question
in the Body of your message and otherwise help people to help you.
Anyway, while it is not too efficient for big files, this works:
perl -e '@f=<>;print $f[-3]' file
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
------------------------------
Date: Tue, 07 Jun 2005 21:27:35 +0100
From: Brian Wakem <no@email.com>
Subject: Re: perl one liner to display the third line from the end of a file
Message-Id: <3gme9nFd8k6rU1@individual.net>
Oxnard wrote:
> perl v5.8.0
>
> Assuming the file is a random length text file.
> I know I can do this in a Perl script, however I would like to add the one
> liner to an shell script.
> Anyone have idea ideas on how to do this?
If you are on a proper OS then tail and head would be your best bet I would
think.
system("tail -3 filename | head -1");
What do you want to happen if there are less than 3 lines in the file?
--
Brian Wakem
------------------------------
Date: 7 Jun 2005 18:44:16 -0000
From: Don Salad <caesar@miskatonic.edu>
Subject: Re: random numbers
Message-Id: <9YYKCXHY38510.5724074074@anonymous.poster>
> I want to generate 6 random numbers from 1 to 10.
>
> The 6 numbers must not the same.
>
> These numbers must match to the number of an array.
>
> I like to know how many iterations to get the match.
That should be OK, but it's VERY IMPORTANT not to generate too many
random numbers, or you could end up with the same problem as
calculating pi: you may inadvertently generate copyright
infringements, child pr0n, death threats, etc.
Thanks,
Don
------------------------------
Date: Tue, 07 Jun 2005 10:20:15 -0600
From: Scott Bryce <sbryce@scottbryce.com>
Subject: Re: Randomly selecting Variables
Message-Id: <dMqdnXq28sahVDjfRVn-iw@comcast.com>
George wrote:
> Those 30 vaiables are used in formating a tabular label defined in
> format function , now out of 30 only 15 are assigned in one go , very
> much like bingo tickets,
If you want to randomly assign 15 out of 30 scalars, things could get messy.
Can these 30 variables be stored as hash elements? Instead of $var_1,
$var_2, etc, use $hash{var_1}, $hash{var_2}, etc.
Load an array with the hash keys, shuffle them, then take the first 15
keys from the shuffled array. Assign the random numbers to those hash
elements.
------------------------------
Date: Tue, 07 Jun 2005 14:58:49 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: summarize bytes
Message-Id: <A5ydnZrXQfcxhTvfRVn-3A@comcast.com>
bastardx wrote:
> id34 2005-06-07 323 7211
> id34 2005-06-07 15 2381
That's trivial to do using a hash or two in Perl.
It's the sort of thing found as student exercises
in early chapters of just about any Perl tutorial.
Hint:
$info{$id}{IN} += $in;
$info{$id}{OUT} += $out;
-Joe
Followup-To has been set to comp.lang.perl.misc
------------------------------
Date: Tue, 07 Jun 2005 10:36:07 -0400
From: Richard Trahan <rtrahan@optonline.net>
Subject: symbol table question
Message-Id: <Igipe.22969$HP1.22229@fe08.lga>
Consider the following code:
package mypackage;
$x = 7;
otherpackage::mysub($x);
...
package otherpackage;
sub mysub
{
# retrieve variable name here
}
In mysub, I would like to retrieve the name mypackage::x, as well as
the variable type (SCALAR). How do I do that? I know how to use
caller() to retrieve the caller's package, and I know how to iterate
through the caller's symbol table to retrieve symbolic names
and existence of types, but I don't know how to associate one
of them with the alias to $x in mysub, i.e., $_[0].
Any help, please. Thanks.
------------------------------
Date: Tue, 07 Jun 2005 17:41:55 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: symbol table question
Message-Id: <d84iol$8qc$1@redhat2.bham.ac.uk>
Richard Trahan wrote:
> Consider the following code:
>
> package mypackage;
> $x = 7;
> otherpackage::mysub($x);
> ...
> package otherpackage;
> sub mysub
> {
> # retrieve variable name here
> }
>
> In mysub, I would like to retrieve the name mypackage::x, as well as
> the variable type (SCALAR). How do I do that? I know how to use
> caller() to retrieve the caller's package, and I know how to iterate
> through the caller's symbol table to retrieve symbolic names
> and existence of types, but I don't know how to associate one
> of them with the alias to $x in mysub, i.e., $_[0].
if ( \${"${caller}::$name"} == \$_[0] ) {
print "First argument to mysub is \$$name in package $caller\n";
}
> Any help, please.
More helpfull would be the advice "Don't do this". Package variables
are very rare in modern well written Perl code, most variables are
lexicially scoped so won't have a name in the symbol table. Some, of
course, could have more than one.
What are you trying to achive? This smells distictly X-Y.
If your subroutine really must take an argument that is a symbol table
entry (which I think is unlikely) then it is better to make it
explicitly do so. Actually I hate psudo-GLOBs so I'd pass a GLOBref.
$x = 7;
otherpackage::mysub(\*x);
------------------------------
Date: Tue, 07 Jun 2005 13:46:48 -0400
From: Richard Trahan <rtrahan@optonline.net>
Subject: Re: symbol table question
Message-Id: <s3lpe.3083$S62.3007@fe11.lga>
Brian McCauley wrote:
>
> What are you trying to achive? This smells distictly X-Y.
>
Thank you for your response. I hadn't thought of equating the references.
I am expanding the Track program in Damian Conway's book, chapter on
Ties. The procedure, for scalars, is to call a tracking class which ties
the tracked variable after setting up a hash object and some stuff in
the STORE and FETCH methods which record caller() info. The proc is
limited in that it does not print the variable names, and it's
cumbersome to look at source code to match caller() info to debug
output in order to determine what variable is being dumped.
Another limitation is that the Track class, as shown in Conway's
book, relies on sub aliasing of @_ to variables, provided they're
scalars. For example, the setup for tracking a scalar is:
Track->scalar($myvariable)
In Track::scalar(), $_[0] is the class name ("Track") and $_[1] is
aliased to $myvariable (I've never been quite sure what an alias
is under the hood, although I know it refers to the same memory
location). But if you try to do something like:
Track->hash(%myhash)
it doesn't work, since Perl flattens %myhash into a list, rather than
putting an alias into $_[1]. If you try something like
Track->hash(\%myhash), you get a reference in hash(), and I don't know
how to tie a variable if you only have a reference to it. (I think
dereferencing it produces a copy of the hash, not an alias.) Therefore,
the Track class cannot be expanded to include hashes using this procedure.
Instead, the program setting up the tracking must call
tie(%hash,"Track",@arglist); tie() seems to be a magic syntax that
doesn't flatten %hash. (This is not explained anywhere, AFAIK.)
I don't like symbol tables either, thank you, but I think they're
necessary when developing debuggers and IDEs.
BTW, if you're into Tk, could you have a look at my other post? That's a
more serious problem for me now, and I've had trouble finding Tk fellow
travelers.
------------------------------
Date: Tue, 07 Jun 2005 13:10:27 -0700
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: symbol table question
Message-Id: <070620051310277582%jgibson@mail.arc.nasa.gov>
In article <s3lpe.3083$S62.3007@fe11.lga>, Richard Trahan
<rtrahan@optonline.net> wrote:
> Brian McCauley wrote:
> >
> > What are you trying to achive? This smells distictly X-Y.
> >
> Thank you for your response. I hadn't thought of equating the references.
>
>
[problem with tie snipped]
>
> BTW, if you're into Tk, could you have a look at my other post? That's a
> more serious problem for me now, and I've had trouble finding Tk fellow
> travelers.
Have you looked at comp.lang.perl.tk ? I think they are hanging out
there.
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
------------------------------
Date: Tue, 07 Jun 2005 06:26:26 -0400
From: Richard Trahan <rtrahan@optonline.net>
Subject: Tk::FileSelect hangs on W98 root directory
Message-Id: <DCepe.55175$NZ1.51778@fe09.lga>
I'm running ActiveState build 811 on W98. When using Tk::FileSelect,
attempting to navigate to the root directory of any drive hangs the
interpeter. There is no mention of this problem in this ng. Is anyone
else experiencing this?
------------------------------
Date: Tue, 07 Jun 2005 18:31:27 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Tk::FileSelect hangs on W98 root directory
Message-Id: <Xns966E9382A5EE4asu1cornelledu@127.0.0.1>
Richard Trahan <rtrahan@optonline.net> wrote in news:DCepe.55175$NZ1.51778
@fe09.lga:
> I'm running ActiveState build 811 on W98. When using Tk::FileSelect,
> attempting to navigate to the root directory of any drive hangs the
> interpeter. There is no mention of this problem in this ng. Is anyone
> else experiencing this?
How about a short, complete script that still exhibits the problem so that
others can try it out?
Please read the posting guidelines for this group. They contain valuable
information on how to help yourself as well as on how to help others help
you.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)
comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
------------------------------
Date: Tue, 07 Jun 2005 14:41:51 -0400
From: Richard Trahan <rtrahan@optonline.net>
Subject: Re: Tk::FileSelect hangs on W98 root directory
Message-Id: <3Tlpe.3085$S62.1941@fe11.lga>
A. Sinan Unur wrote:
> How about a short, complete script that still exhibits the problem so that
> others can try it out?
>
use strict;
use Tk;
use Tk::FileSelect;
our $mw = MainWindow->new;
$mw->Button(
-command => \&fs
)->pack;
MainLoop;
sub fs
{
$mw->FileSelect(-directory => "c:/windows/temp")->Show;
}
The above program will allow me to click up to /windows, but if I go
higher, the program hangs.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 8154
***************************************