[21805] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 4009 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 22 06:10:40 2002

Date: Tue, 22 Oct 2002 03: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           Tue, 22 Oct 2002     Volume: 10 Number: 4009

Today's topics:
    Re: [REPOST] Need advice on a project (wrt to tie'ing t <goldbb2@earthlink.net>
    Re: [REPOST] Need advice on a project (wrt to tie'ing t <bart.lateur@pandora.be>
    Re: Assigning one symbol table to another one <goldbb2@earthlink.net>
    Re: Assigning one symbol table to another one <tassilo.parseval@post.rwth-aachen.de>
    Re: Calling Subroutines <bart.lateur@pandora.be>
    Re: Columns Limit <goldbb2@earthlink.net>
    Re: Columns Limit <s_grazzini@hotmail.com>
    Re: cyrpt() and other questions.... (Jeff Mott)
    Re: cyrpt() and other questions.... (havoc)
    Re: cyrpt() and other questions.... <tassilo.parseval@post.rwth-aachen.de>
    Re: DBI module INSERT command problem <mbudash@sonic.net>
    Re: Difference in regular expression replacement betwee <goldbb2@earthlink.net>
    Re: How to capture all stderr and stdout for logging? <goldbb2@earthlink.net>
    Re: how to igore the comments line in files? <goldbb2@earthlink.net>
    Re: Newbie: how to include a file from my webpage <goldbb2@earthlink.net>
        regular expression to extract the path name <michael.kirchner@unibw-muenchen.de>
    Re: regular expression to extract the path name <mbudash@sonic.net>
    Re: regular expression to extract the path name (tî'pô)
    Re: while loop to stop take #2 <pinyaj@rpi.edu>
        wrong with tk in komodo-2.0? <jackkon@ms29.url.com.tw>
    Re: XML-Parser and Expat <bart.lateur@pandora.be>
    Re: XML-Parser and Expat (Sisyphus)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 22 Oct 2002 00:12:01 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: [REPOST] Need advice on a project (wrt to tie'ing to a file and general strategy)
Message-Id: <3DB4D011.5C1F1732@earthlink.net>

Michele Dondi wrote:
> 
> Last week I posted the article pasted hereafter. Since I haven't
> received much feedback, I'm posting it again. Sorry for any
> disturbance this might cause...

Parts of your post were answered.  Instead of reposting, you ought to
rewrite your post, with just the parts that you didn't get answers on.

[snip]
> So, the first question regards how to calculate checksums with perl:
> do I have to resort to external programs (thus, possibly, having to
> use a Windows port of a *nix one for compatibility) or is there a
> (recommended) module suitable for this task?

This was answered.

> Also, I know (more than) one way to make such a program, but an
> important consideration to take into account is that now I should run
> it on huge (for me) "data sets" (that is of the size of 10^5 files).

Store the data in a database -- either one created with a tied hash,
using one of the modules that comes with perl (DB_File or SDBM_File) or
using a "real" database, with DBI, and one of access, or oracle, or
SQLite, etc.

> I know from FAQs, etc. that a solution is to tie to a file (whatever I
> will use: array, hash...), but there are many modules designed for
> that. Which one do you recommend?

Whichever one is easiest to use, and will work on your data.

You probably already have SDBM_File or DB_File installed -- if these
work, then use them.

> I'd prefer a KISS solution, that is, I know that some of them use some
> sort of database libraries transparently, but it seems to me an
> overhead.
> 
> In case I decide to use a DB-oriented module, are there any
> portability issues wrt the abovementioned libraries (e.g. are they
> available and work reliably on "all" platforms?).

Read perldoc AnyDBM_File, and scroll down a bit.

> Also, I would like to cache the data relative to size/checksums when
> they are calculated, so to "include them on the list" when running the
> program subsequent times.

That's easy enough -- don't delete the file that you tie your hash to,
or if using a real database, don't make your table(s) temporary.

> Notice that I'm aware this strategy won't catch all duplicates between
> one run and the other, but I'm sure it would be nevertheless an
> enhancement for my purposes...

Why wouldn't it?

Suppose that you implement your remove-duplicates thing as follows:

# or SDBM_File, or whatever.
tie my(%hash), "DB_File", "digests", ....;

# Remove modified items from the cache.
while( my ($digest, $tf) = each %hash ) {
   my ($timestamp, $filename) = unpack("Na*", $tf);
   delete $hash{$digest}
      unless -e $filename and $timestamp == (stat _)[9];
}

# identify duplicates.
find( { no_chdir => 1, wanted => sub {
   next unless -f;
   open( my ($fh), "<", $_ ) or warn("$_ : $!"), next;
   binmode $fh;
   my $digest = Digest::MD5->new->addfile($fh)->digest;
   my $tf = pack("Na*", scalar((stat $fh)[9]), $_);
   close $fh;
   if( my $old = $hash{$digest} ) {
      return if $tf eq $old;
      $hash{$digest} = $tf, return
         if $_ eq (my $f = substr $old, 4);
      print "$_ and $f have the same MD5 checksum\n"; # unlink($_)?
   } else {
      $hash{$digest} = $tf;
   }
} }, $path );

[untested]

The no_chdir means I can just use $_ instead of $File::Find::name
everywhere.

There's no need to check for lengths being the same, since MD5 checksums
also mix in the length of the data.

I stat $fh instead of $_ because it's usually faster to stat a
filehandle than a filename.  This may differ on other systems than mine,
though.

-- 
my $n = 2; print +(split //, 'e,4c3H r ktulrnsJ2tPaeh'
 ."\n1oa! er")[map $n = ($n * 24 + 30) % 31, (42) x 26]


------------------------------

Date: Tue, 22 Oct 2002 07:25:06 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: [REPOST] Need advice on a project (wrt to tie'ing to a file and general strategy)
Message-Id: <phu9rucq9jqc18jvarbe8vejnj3eold66u@4ax.com>

Michele Dondi wrote:

>So, the first question regards how to calculate checksums with perl:
>do I have to resort to external programs (thus, possibly, having to
>use a Windows port of a *nix one for compatibility) or is there a
>(recommended) module suitable for this task?

I use Digest::MD5 for this purpose. Much more reliable than a simple
CRC32 checksum, because it's a 128 bit checksum instead of 32.

General:	<http://search.cpan.org/author/GAAS/Digest-MD5-2.20/>
Win32:	<http://www.activestate.com/PPMpackages/5.6plus/>

The latter is version 2.16, the former 2.20.

>In case I decide to use a DB-oriented module, are there any
>portability issues wrt the abovementioned libraries (e.g. are they
>available and work reliably on "all" platforms?).

A tied hash 5berkely style DB) is IMO an excellent choice for this kind
of application. See `perldoc AnyDBM_File` for a generic intro. In
general, the database itself cannot be moved to another platform,
because of binary incompatibilities, but the data is meaningless on
another platform anyway. At least the code will be portable.

-- 
	Bart.


------------------------------

Date: Tue, 22 Oct 2002 00:24:50 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Assigning one symbol table to another one
Message-Id: <3DB4D312.CF0BEACE@earthlink.net>

Bodo Schulze wrote:
> 
> Hi,
> 
> symbol tables being stored in hashes, I wonder why it is not possible
> to assign them using the normal hash syntax
> 
>         %hash1 = %hash2;
> 
> On the other hand, it is possible to do the assignment like this
> 
>         @hash1{ keys %hash2 } = values %hash2;

Symbol table hashes are slightly (or maybe very) magical.  There's
probably some optomization which prevents you from doing what you want.

How about you try putting the assignment into a BEGIN block?

   BEGIN { %pkg2:: = %pkg1:: }

[untested]

-- 
my $n = 2; print +(split //, 'e,4c3H r ktulrnsJ2tPaeh'
 ."\n1oa! er")[map $n = ($n * 24 + 30) % 31, (42) x 26]


------------------------------

Date: 22 Oct 2002 05:08:06 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@post.rwth-aachen.de>
Subject: Re: Assigning one symbol table to another one
Message-Id: <ap2mfm$hic$1@nets3.rz.RWTH-Aachen.DE>

Also sprach Benjamin Goldberg:

> Bodo Schulze wrote:
>> 
>> Hi,
>> 
>> symbol tables being stored in hashes, I wonder why it is not possible
>> to assign them using the normal hash syntax
>> 
>>         %hash1 = %hash2;
>> 
>> On the other hand, it is possible to do the assignment like this
>> 
>>         @hash1{ keys %hash2 } = values %hash2;
> 
> Symbol table hashes are slightly (or maybe very) magical.  There's
> probably some optomization which prevents you from doing what you want.
> 
> How about you try putting the assignment into a BEGIN block?
> 
>    BEGIN { %pkg2:: = %pkg1:: }

I think this is all very fragile. Perl occasionally dumps core when you
assign to %main:: :

    ethan@ethan:~$ perl
    package Test;
    $test1 = 1;
    package main;
    BEGIN {
            %main:: = %Test::;
    }
    Segmentation fault

It's a little different when doing the assignment not inside BEGIN:

    ethan@ethan:~$ perl -w
    package Test;
    $test1 = 1;
    package main;
    %main:: = %Test::;
    print $test1;
    __END__
    Name "Test::test1" used only once: possible typo at - line 2.
    Name "main::test1" used only once: possible typo at - line 5.
    Segmentation fault

Yet, it will not segfault when leaving warnings out. Also, these two
segfaults only happen on 5.6.1 and 5.8.0 but not on 5.005_03. I sent a
bugreport yesterday.

Tassilo
-- 
$_=q!",}])(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus;})(rekcah{lrePbus;})(lreP{rehtonabus;})(rehtona{tsuJbus!;
$_=reverse;s/sub/(reverse"bus").chr(32)/xge;tr~\n~~d;eval;


------------------------------

Date: Tue, 22 Oct 2002 07:29:54 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Calling Subroutines
Message-Id: <9ev9rukqeagkob1mr6mq0dpvp9ro6s4ohi@4ax.com>

David Formosa (aka ? the Platypus) wrote:

>> There is nothing to fear about subroutines within subroutines, as long
>> as you make them refer to a closure. Real subs wont nest properly, so
>> don't try this:
>> 
>>     sub outer {
>>         ...
>>         sub inner {
>>             ...
>>         }
>>         inner(@args);
>>     }
>
>I've had no problem with that type of construct.  Have I been just
>lucky?

It doesn't work as it should (IMO), because the inner subs can't
properly access the lexical variables of the outer sub (it always access
the lexical variables of the very first invocation of the outer sub). In
addition, it doesn't buy you anything, because sub inner can just as
easily be accessed from outside sub outer. In other words: sub inner is
still a *global* sub.

This is a possibly dangerous and furthermore useless language construct.

-- 
	Bart.


------------------------------

Date: Tue, 22 Oct 2002 00:31:34 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Columns Limit
Message-Id: <3DB4D4A6.6BB5788B@earthlink.net>

Naser El-Bathy wrote:
> 
> I'm trying to write a cgi script in Perl. This script should generate
> Excel version.  The maiximum Excell sheet columns should be more than
> 700 columns.
> Is it possible to do so.
> Please advise.
> Your assistnace is appreciated.

Show us the code you have written so far, and maybe we can help you.

-- 
my $n = 2; print +(split //, 'e,4c3H r ktulrnsJ2tPaeh'
 ."\n1oa! er")[map $n = ($n * 24 + 30) % 31, (42) x 26]


------------------------------

Date: 21 Oct 2002 22:31:33 -0600
From: Steve Grazzini <s_grazzini@hotmail.com>
Subject: Re: Columns Limit
Message-Id: <3db4d4a4@news.mhogaming.com>

Naser El-Bathy <nelbathy@ford.com> wrote:
> I'm trying to write a cgi script in Perl. This script should generate
> Excel version.  The maiximum Excell sheet columns should be more than
> 700 columns.
> Is it possible to do so.
> Please advise.
> Your assistnace is appreciated.

Check Spreadsheet::WriteExcel or Win32::OLE.

(But IIRC, Excel sheets are limited to 256 columns.)

-- 
Steve

perldoc -qa.j | perl -lpe '($_)=m("(.*)")'


------------------------------

Date: 21 Oct 2002 23:22:15 -0700
From: jeffmott@twcny.rr.com (Jeff Mott)
Subject: Re: cyrpt() and other questions....
Message-Id: <f9c0ce19.0210212222.4731751b@posting.google.com>

> I've used the functions in Digest::MD5 such as md5_base64, to do what
> you are talking about.  I've always assumed that the Digest::<X>
> modules are better than using crypt.  Are they?

I havn't looked at every single Digest::* module but I would generally
say yes. MD5 and SHA-1 (better than MD5) will use all 256 characters
rather than 64 and produce a longer hash (less collisions).

crypt provides 302231454903657293676544 possible hashes.
SHA-1 provides 1.1579208923731619542357098500869e+333 possible hashes.


------------------------------

Date: 22 Oct 2002 01:36:21 -0700
From: mike-_-@excite.com (havoc)
Subject: Re: cyrpt() and other questions....
Message-Id: <d87cc458.0210220036.4dae24c7@posting.google.com>

My apologies, yes I meant to say "these". And I posted the crypt()
question here because before posting I flipped through a perl book
that didn't cover the function at all, it merely explained (in a
single sentance) what it did, so I figured this would be the best
place to ask (since I found the function in a perl book).

And no, I didn't try 'perldoc -f crypt' becuase perl is not installed
on the computer I am using (and probably never will be). All my
programs are running on a webserver (Hypermart) so I can't exactly use
perldoc at a command line.

Thanks to everyone for the help tho, and especially Tassilo, who
answered most my questions. I'll find a php group and do some more
research on the phpsession thing....

-Mike


------------------------------

Date: 22 Oct 2002 09:00:59 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@post.rwth-aachen.de>
Subject: Re: cyrpt() and other questions....
Message-Id: <ap344b$s77$1@nets3.rz.RWTH-Aachen.DE>

Also sprach havoc:

> And no, I didn't try 'perldoc -f crypt' becuase perl is not installed
> on the computer I am using (and probably never will be). All my
> programs are running on a webserver (Hypermart) so I can't exactly use
> perldoc at a command line.

So you can't exactly use Perl properly at all. All these technologies
exist for almost any platform, and they are freely available. So if you
plan to be serious with programming in a web-environment, it will be
much less pain on the long run to have a Perl-distribution, perhaps an
apache and an SQL-database at disposal. Unless, of course, you prefer to
write a script, upload it and repeat until it works on the server. It is
more convenient to make it run on your own machine before uploading.

> Thanks to everyone for the help tho, and especially Tassilo, who
> answered most my questions. I'll find a php group and do some more
> research on the phpsession thing....

Sessions in Perl and sessions in PHP might work quite differently (from
a programatical standpoint). I'd first try to find some Perl-specific
information on them. google will probably help you with that.

Tassilo
-- 
$_=q!",}])(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus;})(rekcah{lrePbus;})(lreP{rehtonabus;})(rehtona{tsuJbus!;
$_=reverse;s/sub/(reverse"bus").chr(32)/xge;tr~\n~~d;eval;


------------------------------

Date: Tue, 22 Oct 2002 05:14:39 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: DBI module INSERT command problem
Message-Id: <mbudash-163EC1.22143821102002@typhoon.sonic.net>

In article <vQXs9.183542$Fw2.5203791@twister.austin.rr.com>,
 "Doug" <dgardiner@houston.rr.com> wrote:

> And I'm suing Access at the moment

it's about time someone brought them to justice... 8^)


------------------------------

Date: Tue, 22 Oct 2002 01:04:08 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Difference in regular expression replacement between 5.005_03 & 5.6.0
Message-Id: <3DB4DC48.9FDCDCB9@earthlink.net>

J. Gilbert wrote:
> 
> $string = "owning_account_no_fk1"
> 
> With perl 5.005_03 the  following syntax:
> 
>     $string =~ s/\B[aeiou]//g;
> 
> is yielding: "ownng_ccnt_n_fk1".
>
> However, in 5.6.0, the same syntax
> 
> is yielding: "ownng_ccunt_n_fk1".
> 
> Changing the syntax to:
> 
>    $string =~ s/\B[aeiou]*//g;
> 
> yields the same string between
> 5.005_03 and 5.6.0: "ownng_ccnt_n_fk1".
> 
> My question is, is the difference in behavior for
> the first syntax a result of a bug (or change) with
> 5.6.0?  I'm willing to bet that the second syntax is
> the more "correct" one, but I'd like to know why
> the difference... any help would be great, thanks!

It's a bug -- anchors should apply to the original string, not the
transformed string.

Think of what should happen if you do:
   $x = "foobar";
   $x =~ s/^foo|^bar//g;

-- 
my $n = 2; print +(split //, 'e,4c3H r ktulrnsJ2tPaeh'
 ."\n1oa! er")[map $n = ($n * 24 + 30) % 31, (42) x 26]


------------------------------

Date: Tue, 22 Oct 2002 00:30:35 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: How to capture all stderr and stdout for logging?
Message-Id: <3DB4D46B.233ABDCA@earthlink.net>

chris wrote:
> 
> I need to create a batch process to run a perl script. The script in
> turn runs deeply nested child scripts. The main script is open with a
> pipe | and I have to redirect stderr in each child script. This is
> working.
> 
> Now the bacth process has reached a child script that I should not
> modify. This child script will make use of a module that I wrote and I
> am able to make changes at this level.
> 
> How do I capture all stderr and stdout from the parent for logging?

Try this:

   use IO::File;
   use IPC::Open3;
   use Symbol qw(gensym);
   local *GETERR = ( IO::File->new_tempfile or die );
   my $pid = open3( gensym, my($get_output), ">&GETERR",
      $cmd );
   while( my $output = <$get_output> ) {
      ....
   }
   waitpid( $pid, 0 ) or die;
   $? and die;
   seek GETERR, 0, 0 or die;
   while( my $error = <GETERR> ) {
      ....
   }
[untested]

NB: If you want, you can have GETERR open to a normal file, instead of
to a tempfile... depending on your needs, you might not even have to
read it into your program if you do that.

-- 
my $n = 2; print +(split //, 'e,4c3H r ktulrnsJ2tPaeh'
 ."\n1oa! er")[map $n = ($n * 24 + 30) % 31, (42) x 26]


------------------------------

Date: Tue, 22 Oct 2002 00:20:50 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: how to igore the comments line in files?
Message-Id: <3DB4D222.59233E3A@earthlink.net>

miao mao wrote:
> 
> I need to generate a diff report between two versions of a file.
> but I have to ignore the comments/header info.
> Do you know how should I do that? Is there a script already written
> for handling that?

Assuming that these are C-style comments, try:

   perldoc -q comment

-- 
my $n = 2; print +(split //, 'e,4c3H r ktulrnsJ2tPaeh'
 ."\n1oa! er")[map $n = ($n * 24 + 30) % 31, (42) x 26]


------------------------------

Date: Tue, 22 Oct 2002 01:08:28 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Newbie: how to include a file from my webpage
Message-Id: <3DB4DD4C.3EB13C74@earthlink.net>

Oakseer@attbi.com wrote:
> Francesco Moi wrote:
> 
> > Hello.
> >
> > I'm a PHP user, and I use 'include' command in order to build my
> > webpages:
> >
> > include 'header.php';
> > include 'body.php'; ....
> >
> > Does any similiar Perl command exist?
> 
> I believe the equivalent would be "require":
> 
> require "somefile";

Actually, I think that what the OP wants is "do", not "require".  Read
the documentation:
   perldoc -f do
   perldoc -f require

In particular, consider what happens with a loop:

   for $row (@rows) {
      do "print_row.pl";
   }

I don't think that require would have the desired effect.

Of course, this type of thing should be done with modules and
subroutines and use(), instead of with do(), but using do() will likely
ease the OP's transition from PHP to Perl.

-- 
my $n = 2; print +(split //, 'e,4c3H r ktulrnsJ2tPaeh'
 ."\n1oa! er")[map $n = ($n * 24 + 30) % 31, (42) x 26]


------------------------------

Date: Tue, 22 Oct 2002 09:25:31 +0200
From: Michael Kirchner <michael.kirchner@unibw-muenchen.de>
Subject: regular expression to extract the path name
Message-Id: <3DB4FD6B.3000903@unibw-muenchen.de>

Hello all.

I have a path name including the file name and I want to define a 
regular expression which gives only the path name. I tried many 
constructs but none works.
f.e.:
I have "/dir1/dir2/dir3/file.ext"
I want "/dir1/dir2/dir3/"
I use  s/\/.*?$// ... but gives ""  :-(

Any better idea?
Thaks a lot.
Micha



------------------------------

Date: Tue, 22 Oct 2002 08:27:47 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: regular expression to extract the path name
Message-Id: <mbudash-C92B10.01274622102002@typhoon.sonic.net>

In article <3DB4FD6B.3000903@unibw-muenchen.de>,
 Michael Kirchner <michael.kirchner@unibw-muenchen.de> wrote:

> Hello all.
> 
> I have a path name including the file name and I want to define a 
> regular expression which gives only the path name. I tried many 
> constructs but none works.
> f.e.:
> I have "/dir1/dir2/dir3/file.ext"
> I want "/dir1/dir2/dir3/"
> I use  s/\/.*?$// ... but gives ""  :-(
> 
> Any better idea?
> Thaks a lot.
> Micha
> 

s{[^/]+$}{};

or use a module...

hth-


------------------------------

Date: Tue, 22 Oct 2002 10:42:26 +0200
From: "Teh (tî'pô)" <teh@mindless.com>
Subject: Re: regular expression to extract the path name
Message-Id: <mp3aru4c35v87lvn6sjq5rndaahguotpk2@4ax.com>

Michael Budash bravely attempted to attach 23 electrodes of knowledge
to the nipples of comp.lang.perl.misc by saying:
>In article <3DB4FD6B.3000903@unibw-muenchen.de>,
> Michael Kirchner <michael.kirchner@unibw-muenchen.de> wrote:
>
>> Hello all.
>> 
>> I have a path name including the file name and I want to define a 
>> regular expression which gives only the path name. 
>
>s{[^/]+$}{};
>
>or use a module...
>

Or 
$_ = `dirname $_`;

But that's not a RE nor is it really perl...


------------------------------

Date: Tue, 22 Oct 2002 01:08:50 -0400
From: Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
To: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: while loop to stop take #2
Message-Id: <Pine.A41.3.96.1021022010801.21458B-100000@vcmr-104.server.rpi.edu>

[posted & mailed]

On Tue, 22 Oct 2002, Martien Verbruggen wrote:

>On Mon, 21 Oct 2002 12:02:27 -0400,
>	Jeff 'japhy' Pinyan <pinyaj@rpi.edu> wrote:
>> 
>> In a related note, this does populate $_:
>>
>>   while (<FH> && 1) { ... }
>> 
>> but that's because of Perl's hunky-dory constant folding.
>
>$ perl5.6.1 -MO=Deparse -e 'while (<FH> && 1) { print }'
>while (<FH> and 1) {
>        print $_;
>}

Sorry.  Reverse the order of the operands.  while (1 && <FH>) works as I
wrote.  I just got the order confused.

-- 
Jeff "japhy" Pinyan      RPI Acacia Brother #734      2002 Acacia Senior Dean
"And I vos head of Gestapo for ten     | Michael Palin (as Heinrich Bimmler)
 years.  Ah!  Five years!  Nein!  No!  | in: The North Minehead Bye-Election
 Oh.  Was NOT head of Gestapo AT ALL!" | (Monty Python's Flying Circus)



------------------------------

Date: Tue, 22 Oct 2002 14:09:24 +0800
From: "jackkon" <jackkon@ms29.url.com.tw>
Subject: wrong with tk in komodo-2.0?
Message-Id: <ap2pme$a6f@netnews.hinet.net>

hi
I am a newbie in komodo.
I use komodo as my perl tk IDE.
I use the komodo GUI Builder 1.0 to design my GUI.
When I put a Label in the grid and set the color of font to "blue" by the
toolbar of komodo,
I get error message at running time. Error messags is below.
Bad option `-activeforeground' at C:/Perl/site/lib/Tk/Widget.pm line 196.

How can I slove the question?
Thanks





------------------------------

Date: Tue, 22 Oct 2002 07:04:03 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: XML-Parser and Expat
Message-Id: <8mt9ruonunqb62p12emfmo9tddsjb10b1p@4ax.com>

John Ralston wrote:

>I'm a perl newbie and don't understand modules and dependencies very well,
>yet. I'm trying to install XML-Parser-2.31 on a Win98 system with ActivePerl
>5.6.0 installed.

Uh-oh. XML::Parser is a pretty dangerous module to install on
Activestate, because PPM, Activestate's own module installer, depends on
it. So it's easy to shoot yourself in the foot with it. Therefore,
XML::Parser needs an installation procedure that's a bit out of the
ordinary.

One of the latest precompiled binary distributions for XML::Parser and
XML::Parser::Expat, can be found on <http://xmlproj.com/PPM/>. It does
take care of this special procedure, I believe. But, it's only at
version 2.30. Will that do?

   HTH,
   Bart.


------------------------------

Date: 22 Oct 2002 02:20:14 -0700
From: kalinabears@hdc.com.au (Sisyphus)
Subject: Re: XML-Parser and Expat
Message-Id: <e615828f.0210220120.60e7fac7@posting.google.com>

"John Ralston" <jaralston3@att.net> wrote in message news:<Wi0t9.21975$Pk1.5159@nwrddc02.gnilink.net>...
> I'm a perl newbie and don't understand modules and dependencies very well,
> yet. I'm trying to install XML-Parser-2.31 on a Win98 system with ActivePerl
> 5.6.0 installed. I've done a number of builds and installs, so I'm not
> totally sure where all the various files I'll describe came from.
> 

Simplest way to install version 2.31 of XML::Parser would be to use
the ppm utility.

ppm install XML-Parser

(Installed version 2.31 for me. Just accept the prompt for where to
place the  dll.)

Of course, if you're now without a working version of XML::Parser,
then ppm (which uses XML::Parser) will no longer work.

If you want to get info on how to build the module from source, you
could try the xml mailing list. See http://lists.perl.org . (As you've
discovered already, it gets a little messy :-)

Hth.

Cheers,
Rob


------------------------------

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 4009
***************************************


home help back first fref pref prev next nref lref last post