[28217] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 9581 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 9 14:05:49 2006

Date: Wed, 9 Aug 2006 11: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           Wed, 9 Aug 2006     Volume: 10 Number: 9581

Today's topics:
        50+ bits of arithmetic in a 32-bit bag mailbox@cpacker.org
    Re: A possable bug in the "warnings" pragma. anno4000@radom.zrz.tu-berlin.de
        Array::Diff help understanding it <hpbenton@scripps.edu>
    Re: Array::Diff help understanding it <mritty@gmail.com>
    Re: Array::Diff help understanding it <mritty@gmail.com>
    Re: Cannot authenticate to NNTP server with Net::NNTP a <1usa@llenroc.ude.invalid>
    Re: Cannot authenticate to NNTP server with Net::NNTP a usenet@DavidFilmer.com
    Re: Cannot authenticate to NNTP server with Net::NNTP a <1usa@llenroc.ude.invalid>
    Re: Cannot authenticate to NNTP server with Net::NNTP a <rvtol+news@isolution.nl>
    Re: convert structured strings to possibly deep hash of <bik.mido@tiscalinet.it>
    Re: convert structured strings to possibly deep hash of <nobull67@gmail.com>
    Re: convert structured strings to possibly deep hash of <bik.mido@tiscalinet.it>
    Re: convert structured strings to possibly deep hash of <seven.reeds@gmail.com>
    Re: convert structured strings to possibly deep hash of <uri@stemsystems.com>
    Re: convert structured strings to possibly deep hash of <1usa@llenroc.ude.invalid>
    Re: convert structured strings to possibly deep hash of anno4000@radom.zrz.tu-berlin.de
    Re: counting number of uniques in a multidimensional ar <jack_posemsky@yahoo.com>
    Re: Encrypt Windows Password <rprp@gmx.net>
    Re: How to use OO and package? <bik.mido@tiscalinet.it>
    Re: Per/Tk - text widget does not get updated <lev.weissman@creo.com>
    Re: Per/Tk - text widget does not get updated <daveandniki@ntlworld.com>
    Re: Per/Tk - text widget does not get updated <lev.weissman@creo.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 9 Aug 2006 10:59:19 -0700
From: mailbox@cpacker.org
Subject: 50+ bits of arithmetic in a 32-bit bag
Message-Id: <1155146358.959495.189910@i3g2000cwc.googlegroups.com>

Our implementation of Perl under AIX
doesn't support 64-bit integer arithmetic;
so says "perl -V".

A search of these newsgroups turned up a
test of this fact as follows:

$two += 2;
$x = $two ** 63 + 25;
$y = $two ** 63 + 30;
if($x == $y) {print "64 bits not supported\n"}
else {print "64 bits supported\n"}

I found that it would give an affirmative
result if I used up to 55 instead of 63.
This suggests that a floating-point
format with a seven-byte fraction is
being invoked. Perhaps that's the native
floating-point of the AIX box?
At any rate, barring followups to the
contrary, I'll assume that I can treat
our Perl as having a 55-bit integer
arithmetic capability for accumulating
sums, at least. The code in question
doesn't have to be portable.

--
Charles Packer
mailboxATcpacker.org 
http://cpacker.org/whatnews



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

Date: 9 Aug 2006 10:11:19 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: A possable bug in the "warnings" pragma.
Message-Id: <4jtqm7F9mjipU1@news.dfncis.de>

A. Sinan Unur <1usa@llenroc.ude.invalid> wrote in comp.lang.perl.misc:
> Ben Morrow <benmorrow@tiscali.co.uk> wrote in
> news:rbbhq3-kc7.ln1@osiris.mauzo.dyndns.org: 
> > Quoth "A. Sinan Unur" <1usa@llenroc.ude.invalid>:
> >> Dale Wiles <WilesIgnoreMe@IgnoreMeModArnis.Com> wrote in 
> >> news:36kf5ovh19w.vyr@IgnoreMeModArnis.Com:
> ...
> >> >   This program, posted below, should die at "Killed me.".  If I run
> >> > it I get:

[big snip]

> I have confirmed that both:
> 
>     warnings::warnif(ref $self, $text);
> 
> and
> 
>     warnings::warnif($text);
> 
> result in the expected behavior.
> 
> However, 
> 
>     warnings::warnif($self, $text);
> 
> results in FATAL not being obeyed.
> 
> I did some single stepping, inspecting bitmasks etc, but I haven't been 
> able to come up with a satisfactory explanation for this.

Last time I looked at the code in lib/warnings.pm that deals with the
method call of warnif() I found it entirely incomprehensible.  It's
in sub __chk(), if anyone cares.  Not that my incomprehension proves
anything, but in view of this bug I'd recommend no to use the method
call until someone has found the time to go over it again.  The bug
is still in 5.8.8 and bleadperl (5.9.4).

Anno


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

Date: 9 Aug 2006 09:48:39 -0700
From: "PB0711" <hpbenton@scripps.edu>
Subject: Array::Diff help understanding it
Message-Id: <1155142119.882509.158630@m79g2000cwm.googlegroups.com>

First I apologise forr being so slow that I cannot understand this
simple module.
Here is the problem I have two Hash of Arrays (HoA's). I want to find
the difference between the arrays by useing Array::Diff. Array::Diff
askes for references to an array. Since I have

for $pro (keys $HoA_pro){
       my $con = Array::Diff->diff($HoA_pro{$pro}, $HoA_gene{$gene});
       print "$pro, $con->added\n";
}

It doesn't feel like I should be able to do that print but that's what
I'm getting from the README. When I print I'm getting a reference. Do I
need to unref it or ref it ......



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

Date: 9 Aug 2006 09:56:52 -0700
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: Array::Diff help understanding it
Message-Id: <1155142612.744764.204430@m79g2000cwm.googlegroups.com>

PB0711 wrote:
> First I apologise forr being so slow that I cannot understand this
> simple module.

Not understanding does not warrant an apology.

Posting code with syntax errors does.  Especially ones that make it
impossible to know what your *actual* problem is.

> Here is the problem I have two Hash of Arrays (HoA's). I want to find
> the difference between the arrays by useing Array::Diff. Array::Diff
> askes for references to an array. Since I have
>
> for $pro (keys $HoA_pro){

This is not valid Perl.  keys takes a hash.  Not a scalar.  Either you
have a hash %HoA_pro, or a hash reference $HoA_pro (in which case you'd
need to dereference it).

>        my $con = Array::Diff->diff($HoA_pro{$pro}, $HoA_gene{$gene});

1) Where the heck did $gene come from?
2) Here's the problem that your syntax error above causes for me.  I
don't know if you really have a hash, and therefore the first argumetn
is correct, or if you have a hash reference and the above argument is
the source of your problem.  So I can't adequetly help you.

Please read the Posting Guidelines for this group.  They encourage you
to post a SHORT but COMPLETE script that we can run by copy and
pasting, which demonstrates your error.  If you had done this, it would
be far easier to help you, and you would get the help you want far
faster.


>        print "$pro, $con->added\n";
> }
>
> It doesn't feel like I should be able to do that print but that's what
> I'm getting from the README.

I find that drastically unlikely.  Please quote the relevant passage.

> When I print I'm getting a reference. Do I
> need to unref it or ref it ......

If you have a reference, you need to dereference it.  Taking a
refernece to a reference is rarely a logical decision.

However, in this case, your problem is simply that method calls (like
any other subroutine calls) do not interpolate.  You cannot just stick
them in a double quoted string.

Assuming added() is a method of the class Array::Diff (and I've not
looked into this module to determine if it is), the above should
become:
print "$pro, ", $con->added(), "\n";


Paul Lalli



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

Date: 9 Aug 2006 10:07:56 -0700
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: Array::Diff help understanding it
Message-Id: <1155143276.594451.220580@i3g2000cwc.googlegroups.com>

Paul Lalli wrote:

> Assuming added() is a method of the class Array::Diff (and I've not
> looked into this module to determine if it is), the above should
> become:
> print "$pro, ", $con->added(), "\n";

After looking at the (rather disturbingly poor) documentation for the
module, it seems that added() likely returns a reference to an array
that contained the elements added in the new array from the old.  If
that's the case, the above should become:
print "$pro, ", @{$con->added()}, "\n";

And actually, because arrays *do* interpolate whereas method calls do
not, you can put this back the way you had it:

print "$pro, @{$con->added()}\n";

Paul Lalli



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

Date: Wed, 09 Aug 2006 13:20:11 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Cannot authenticate to NNTP server with Net::NNTP authinfo()
Message-Id: <Xns981A5F11B3A8Easu1cornelledu@127.0.0.1>

usenet@DavidFilmer.com wrote in
news:1155107141.282742.117350@h48g2000cwc.googlegroups.com: 

> Dr.Ruud wrote:
>> <SNIP a fixed version of my program>
> 
> Ah, I see.  I had not noticed the DEBUG constructor option - 

I had started investigating along the same lines but then I saw Dr. Ruud's 
post and moved on.

> I kept relying on $!, which I don't think the module ever set

How about $@?

Sinan
-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html


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

Date: 9 Aug 2006 10:16:50 -0700
From: usenet@DavidFilmer.com
Subject: Re: Cannot authenticate to NNTP server with Net::NNTP authinfo()
Message-Id: <1155143809.968736.233000@h48g2000cwc.googlegroups.com>

A. Sinan Unur wrote:
> usenet@DavidFilmer.com wrote in
> > I kept relying on $!, which I don't think the module ever set
>
> How about $@?

      $nntp->group('comp.lang.perl.XYZ')  # invalid group!
         or die "I'm dead, Jim - $! $@\n" ;

   I'm dead, Jim -

Nothing. Nada.  Zip.  It seems DEBUG is the only way to get error
messages...

-- 
David Filmer (http://DavidFilmer.com)



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

Date: Wed, 09 Aug 2006 17:34:14 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Cannot authenticate to NNTP server with Net::NNTP authinfo()
Message-Id: <Xns981A8A24E27C9asu1cornelledu@127.0.0.1>

usenet@DavidFilmer.com wrote in news:1155143809.968736.233000
@h48g2000cwc.googlegroups.com:

> A. Sinan Unur wrote:
>> usenet@DavidFilmer.com wrote in
>> > I kept relying on $!, which I don't think the module ever set
>>
>> How about $@?
> 
>       $nntp->group('comp.lang.perl.XYZ')  # invalid group!
>          or die "I'm dead, Jim - $! $@\n" ;
> 
>    I'm dead, Jim -
> 
> Nothing. Nada.  Zip.  It seems DEBUG is the only way to get error
> messages...

OK. Thanks for checking. I should have done it myself.

Sinan
-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html



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

Date: Wed, 9 Aug 2006 19:47:10 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Cannot authenticate to NNTP server with Net::NNTP authinfo()
Message-Id: <ebde7m.1d8.1@news.isolution.nl>

usenet@DavidFilmer.com schreef:

> It seems DEBUG is the only way to get error
> messages...

   my $newnews = $nntp->newnews($nntp->date() - 7200) ;

   print '=> code:', $nntp->code,     "\n" ;
   print '=> mesg:', $nntp->message,  "\n" ;

   print map "=> $_\n", @$newnews if (@$newnews) ;

   $nntp->quit ;

-- 
Affijn, Ruud

"Gewoon is een tijger."




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

Date: 9 Aug 2006 12:21:53 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: convert structured strings to possibly deep hash of hashes
Message-Id: <scdjd21o3tvo6llfh0he2u7lqijk5nbl8o@4ax.com>

On 8 Aug 2006 22:52:15 -0700, "seven.reeds" <seven.reeds@gmail.com>
wrote:

>/file.txt
>/a/file.txt
>/a/b/c
>/a/b/c/file.txt
>/z/m/w/file.txt
>
>and produce something like:
>
>%dir_hash(
>    'file.txt' => '',
>    'a' => {
>        'file.txt' => '',
>        'b' => {
>            'c' => {
>                'file.txt'
>            }

BTW: ITYM  'file.txt' => ''

The following may help you to get started:


  #!/usr/bin/perl
  
  use strict;
  use warnings;
  use Data::Dumper;
  
  my %dirhash;
  while (<DATA>) {
      chomp;
      my $last=\%dirhash;
      $last=$last->{$_} ||= {} for split qr|/|;
  }
  
  print Dumper \%dirhash;
  
  __END__
  /file.txt
  /a/file.txt
  /a/b/c
  /a/b/c/file.txt
  /z/m/w/file.txt


It doesn't exactly meet your requirements in at least two respects,
but you should be able to work around them. However I clearly remember
having seen posted right here, recently, an example involving a module
specifically aimed at helping one with the access to structures like
the one you're dealing with, and one that would greately aid you in
this case. Unfortunately I can't remember its name and cannot seem to
come up with resonable guesses for a CPAN search. Hopefully someone
will know better and point it out!


HTH,
Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: 9 Aug 2006 05:31:53 -0700
From: "Brian McCauley" <nobull67@gmail.com>
Subject: Re: convert structured strings to possibly deep hash of hashes
Message-Id: <1155126713.054857.300580@m73g2000cwd.googlegroups.com>


Michele Dondi wrote:
>       my $last=\%dirhash;
>       $last=$last->{$_} ||= {} for split qr|/|;

I generally prefer to avoid the extra level of empty hash wth a double
reference and autovivification.

my $last=\\%dirhash;
$last=\$$last->{$_} for split qr|/|;



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

Date: 9 Aug 2006 15:13:54 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: convert structured strings to possibly deep hash of hashes
Message-Id: <csnjd25bdel5lb38terlc8ho4lvjka8i1v@4ax.com>

On 9 Aug 2006 05:31:53 -0700, "Brian McCauley" <nobull67@gmail.com>
wrote:

>>       my $last=\%dirhash;
>>       $last=$last->{$_} ||= {} for split qr|/|;
>
>I generally prefer to avoid the extra level of empty hash wth a double
>reference and autovivification.
>
>my $last=\\%dirhash;
>$last=\$$last->{$_} for split qr|/|;

Cool! Hadn't thought of it and I was just thinking: I wish perl would
autovivify this too...


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: 9 Aug 2006 06:44:14 -0700
From: "seven.reeds" <seven.reeds@gmail.com>
Subject: Re: convert structured strings to possibly deep hash of hashes
Message-Id: <1155131054.751715.100780@m73g2000cwd.googlegroups.com>

very cool indeed.  Thank you all



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

Date: Wed, 09 Aug 2006 11:38:58 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: convert structured strings to possibly deep hash of hashes
Message-Id: <x7psf9apgt.fsf@mail.sysarch.com>

>>>>> "MD" == Michele Dondi <bik.mido@tiscalinet.it> writes:

  MD> On 9 Aug 2006 05:31:53 -0700, "Brian McCauley" <nobull67@gmail.com>
  MD> wrote:

  >>> my $last=\%dirhash;
  >>> $last=$last->{$_} ||= {} for split qr|/|;
  >> 
  >> I generally prefer to avoid the extra level of empty hash wth a double
  >> reference and autovivification.
  >> 
  >> my $last=\\%dirhash;
  >> $last=\$$last->{$_} for split qr|/|;

  MD> Cool! Hadn't thought of it and I was just thinking: I wish perl would
  MD> autovivify this too...

that is how i would have done it too. the recursive version that anno
posted was too much work and this looping/autovivify concept works well.

i have similar code in my autoviv tutorial at:

	http://sysarch.com/Perl/autoviv.txt

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Wed, 09 Aug 2006 17:33:27 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: convert structured strings to possibly deep hash of hashes
Message-Id: <Xns981A8A02CDEC0asu1cornelledu@127.0.0.1>

Uri Guttman <uri@stemsystems.com> wrote in
news:x7psf9apgt.fsf@mail.sysarch.com: 

> i have similar code in my autoviv tutorial at:
> 
>      http://sysarch.com/Perl/autoviv.txt

Looking at your deep_exists sub:

sub deep_exists {
	    my( $hash_ref, @keys ) = @_ ;
	    unless ( @keys ) {
		warn "deep_exists: no keys" ;
		return ;
	    }

	    foreach my $key ( @keys ) {
		unless( ref $hash_ref eq 'HASH' ) {
		    warn "$hash_ref not a HASH ref" ;
		    return ;
		}

		return 0 unless exists( $hash_ref->{$key} ) ;
#    	    	^^^^^^^^
# Shouldn't this be a plain return ?
#
		$hash_ref = $hash_ref->{$key} ;
	    }
	    return 1 ;
	}

Sinan
-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html



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

Date: 9 Aug 2006 17:58:03 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: convert structured strings to possibly deep hash of hashes
Message-Id: <4jum1bF9svqfU1@news.dfncis.de>

A. Sinan Unur <1usa@llenroc.ude.invalid> wrote in comp.lang.perl.misc:
> Uri Guttman <uri@stemsystems.com> wrote in
> news:x7psf9apgt.fsf@mail.sysarch.com: 
> 
> > i have similar code in my autoviv tutorial at:
> > 
> >      http://sysarch.com/Perl/autoviv.txt
> 
> Looking at your deep_exists sub:
> 
> sub deep_exists {
> 	    my( $hash_ref, @keys ) = @_ ;
> 	    unless ( @keys ) {
> 		warn "deep_exists: no keys" ;
> 		return ;
> 	    }
> 
> 	    foreach my $key ( @keys ) {
> 		unless( ref $hash_ref eq 'HASH' ) {
> 		    warn "$hash_ref not a HASH ref" ;
> 		    return ;
> 		}
> 
> 		return 0 unless exists( $hash_ref->{$key} ) ;
> #    	    	^^^^^^^^
> # Shouldn't this be a plain return ?
> #

Absolutely not!

Like its model exists(), deep_exists() is supposed to return a
boolean value.  Returning empty is not a "better way to return
false" it is a way of indicating failure.  Thus returning empty
as it does when no keys are given or if a ref is not a hash is
adequate, but not when non-existence is detected.

If you called deep_exists in a map like this:

    my @res = map deep_exists( $_, @keys), @hashes;

you'd expect an array as long as @hashes filled with true and
false values, not an array of only true values, as many as were
returned.

Anno


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

Date: 9 Aug 2006 09:14:48 -0700
From: "Jack" <jack_posemsky@yahoo.com>
Subject: Re: counting number of uniques in a multidimensional array column
Message-Id: <1155140088.299251.313320@p79g2000cwp.googlegroups.com>


Ted Zlatanov wrote:
> On  7 Aug 2006, jack_posemsky@yahoo.com wrote:
> Ted Zlatanov wrote:
> >> Here's a (very simple) function to give you the unique items from a
> >> list you pass:
> >>
> >> sub uniques
> >> {
> >> my %unique = ();
> >> $unique{$_}++ foreach @_;
> >> return keys %unique;
> >> }
> >>
> >> Now use it like this:
> >>
> >> my @columnarray = ( [1,2,3], [1,2,3], [4,5,6], [7,8,9], );
> >>
> >> foreach my $column (1 .. scalar @{$columnarray[0]})
> >> {
> >> print "Unique elements in column $column: ";
> >> print join ', ',
> >> uniques(map { $_->[$column-1] }
> >> @columnarray
> >> );
> >> print "\n";
> >> }
> >>
> >> I formatted this to be easy to understand, and I tested it with the
> >> data above under
> >>
> >> use warnings;
> >> use strict;
> >>
> >> and it worked correctly.  Please learn from the code posted above - it
> >> shows many useful techniques.
>
> > Ted - this is excellent stuff - how exactly can I capture an example of
> > 2 elements representing a duplicate in a variable from this code ???
>
> If you want to remember duplicates (untested):
>
> sub uniques
> {
>  my %unique = ();
>  $unique{$_}++ foreach @_;
>  my @ukeys = keys %unique;
>  my @dkeys = grep { $unique{$_} > 1 } @ukeys;
>  return [\@ukeys, \@dkeys];
> }
>
> then later use it like this in the loop over @columnarray:
>
> my $keys = uniques(map { $_->[$column-1] } @columnarray;
>
> print "Unique elements in column $column: ";
> print join ', ', @{$keys->[0]};
>
> print "Duplicate elements in column $column: ";
> print join ', ', @{$keys->[1]};
>
> So this modifies uniques() to return two arrays, the list of unique
> values and the list of unique values that appeared more than once,
> inside a two-element array.  The result is stored in $keys.  The
> original version just returned a list of unique values.
>
> @{$keys->[0]} means "get the first element of the $keys array
> reference, and since it's an array itself, convert it to a list
> (dereference it)."
>
> Note this is untested :)
>
> Ted

Hi Ted - great and thank you..  I tried the above and even with some
fiddling could not get it to work..  If you know of a way to just
capture and print out 1 example of a duplicate (not all), thats all I
am speaking of.

Thank you,
Jack



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

Date: Wed, 09 Aug 2006 17:24:21 +0200
From: Reinhard Pagitsch <rprp@gmx.net>
Subject: Re: Encrypt Windows Password
Message-Id: <44d9fe26$0$15786$14726298@news.sunsite.dk>

Hello,

Peter.Kramer wrote:
> Hello,
> I want to write a perl module that encrypts a clear password to a windows 
> hash.
> I didnt find any algorithm that builds the hash expect copypwd.exe which 
> works, but is an external program that does not run as scheduled task.
> 
> "cleartextpassword " ->
> "52616e646f6d4956dc110786f80987daa99d164016ba7d72b24eb2a2931e0ff7"

Copypwd uses the functions from the "Windows Management API" (MS
Platform SDK) and from the samsrv.dll. First Dump the passwords
(encrypted not in clear text) from a domain to a text file and than you
can use this file to import it on an other domain.
I do not belive that MS made the algorithm available. But that can be
asked in a MS news group, I guess.

regards,
Reinhard


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

Date: 9 Aug 2006 12:44:01 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: How to use OO and package?
Message-Id: <fvejd29r86qg478vkh97lam13501oh7426@4ax.com>

On 8 Aug 2006 19:10:46 GMT, John Bokma <john@castleamber.com> wrote:

>> http://perlmonks.org/?node_id=559798
>
>Just read it really fast, but does the author want something like:
>
>
>my $factory = use Some::Very::Long::But::Unique::Module::Name;
>my $obj = $factory->new;

Precisely. But it's not the whole story. The whole discussion, along
with some of the links provided there, is interesting and far from
trivial.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: 9 Aug 2006 03:09:58 -0700
From: "MoshiachNow" <lev.weissman@creo.com>
Subject: Re: Per/Tk - text widget does not get updated
Message-Id: <1155118198.473919.110520@m73g2000cwd.googlegroups.com>

Actualy,I now have found out that the text widget will not get updated
at all till I "return" from the "start" subroitine...
Does it mean that while the subroitine is running,I will not be able to
update the text widget  ?



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

Date: Wed, 9 Aug 2006 14:09:37 +0200
From: "Dave" <daveandniki@ntlworld.com>
Subject: Re: Per/Tk - text widget does not get updated
Message-Id: <44d9d08e$0$860$ba4acef3@news.orange.fr>


"MoshiachNow" <lev.weissman@creo.com> wrote in message 
news:1155115915.665130.245760@n13g2000cwa.googlegroups.com...
> HI,
>
> I define the window :
> my $mw = new MainWindow;  # Main Window
> my $frm_name = $mw -> Frame() -> pack();
> my $lab1 = $frm_name -> Label(-text=>"Enter the remote hostname or
> IP:") -> pack();
> my $ent1 = $frm_name -> Entry() -> pack();
> my $lab2 = $frm_name -> Label(-text=>"Enter the number of iterations to
> run [5]:") -> pack();
> my $ent2 = $frm_name -> Entry() -> pack();
> my $but = $mw -> Button(-text=>"Start nettest", -command =>\&start) ->
> pack(); #Text Area
> $txt = $mw -> Text(-width=>70, -height=>20) -> pack();
>
> MainLoop;
> ###################################
> Then in subroutine "start" I write tesxt:
>
>
>    $txt -> delete("1.0",'end');
>    $txt -> insert('end',"Remote Hostname:\t$REMOTE_HOST\n");
>    $txt -> insert('end',"Remote IP address:\t$REMADDR\n");
>    $txt -> insert('end',"My IP address:\t\t$MYADDRESS\n\n");
> ###################################
> Then later in the same sub I create a file :
>
>    open(FILE,">$FILE1");
>    print FILE ' ' x (100 * (1024 * 1024));
>    close FILE;
>    chmod 0777 => $FILE1;
>
> The problem is that the text widget is not updated till the file
> creation is over (couple of minutes).Printing to STDOUT at the same
> time completes immediately.
> Setting "$|" to "1" did not change much,as I expected to ...
>
> Appreciate any input.
>
> Thanks
>

try adding a $mw->update; after your set of insert commands, I suspect that 
the text is added to the widget but that the window is not being repainted 
to reflect this.




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

Date: 9 Aug 2006 07:52:47 -0700
From: "MoshiachNow" <lev.weissman@creo.com>
Subject: Re: Per/Tk - text widget does not get updated
Message-Id: <1155135167.708526.207400@m73g2000cwd.googlegroups.com>

Thanks,this was just it.



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

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


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