BSOD - perl one liner

2004-10-05 Thread Allegakoen, Justin Devanandan
Just out of interest anyone have that funky little perl -e one liner
that causes Windows to puke and die?

I remember it has some \n's and \t's in it. I can't find it in the
archives, and it may only work on Win2k since it was posted quite a
while back.

Just in

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Rejecting adds to a list

2004-10-05 Thread Thomas, Mark - BLS CTR
> What I would like is to only include a new IP if 
> $rejected{$_} > $tolerate (which is currently working) and the IP 
> isn't currently in the original IP list.

> 
> my $BlacklistedIPs = $cli->GetBlacklistedIPs();
> foreach (keys %rejected)
> {
> $BlacklistedIPs .= "\\e$_"  if ($rejected{$_} > 
> $tolerate); } $cli->SetBlacklistedIPs($BlacklistedIPs);
> 
> The contents of $BlacklistedIPs looks like:
>  
> 61.144.183.76\e80.15.130.137\e221.224.88.237\e211.211.95.210\e
> 
> Would anyone like to take a stab at this?

my %bl = map {$_=>$tolerate+1} split /\\e/, $cli->GetBlacklistedIPs();
$bl{$_} = $rejected{$_} foreach keys %rejected;
$cli->SetBlacklistedIPs(join "\\e", grep {$bl{$_}>$tolerate} keys %bl);


It would be nicer if your $cli object could get/set lists instead of
delimited strings--it would make the above shorter.

-- 
Mark Thomas Internet Systems Architect
[EMAIL PROTECTED]   DigitalNet, Inc.

$_=q;steal Porch Junk;;split//;$_=q=cd0153e71;
s/56s/45;39fs/=;y;\;s/;a28s/;;;s;$/;;;s((.))/;
q.$_[..$..$_[10].$_[2].q.x..q.($1)]./gee/print

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


OLE automation for MS Publisher

2004-10-05 Thread Brad Smith



Using MS Publisher XP(2002), I was able to create a COM object and 
build a document!  Apparently, previous Publisher versions did not 
operate on the COM standard.


So far, I have managed to create a new document and open an 
existing .pub document, add pages at a designated position, add 
graphics to the page, and print the document out to a postscript file.


Unfortunately, the most necessary thing, adding TextBoxes and 
inserting text, remains a mystery.  I can't seem to transpose the VBA 
samples to the Perl equivalent.  I am hoping someone on this list is 
better versed in the translation process.


Here is the code snippet I am trying to translate to Perl.  Help is much 
appreciated:


VBA Code #1 (Creates the textbox):
Set shpTextBox = 
ActiveDocument.Pages(1).Shapes.AddTextBox _ 
(Orientation:=pbTextOrientationHorizontal, _ 
Left:=144, Top:=144, _ Width:=72, Height:=18) 


VBA Code #2 (Places the text in the textbox and formats it):
With 
ActiveDocument.Pages(1).Shapes(1).TextFrame.TextRange 
.Text = "My Text" With .Font .Bold = msoTrue .Size = 25 
.Name = "Algerian" End With End With 


Thanks in advance for any help you can offer.


Brad Smith



___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Better ways to debug ?

2004-10-05 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote:

> 
> 
> 
> In one line:
> 
> print "\$killer = $killer\n";
> 
> or
> 
> print '$killer' . $killer . "\n";

Commas will also work since print can take variable args :

print '$killer = ', $killer, "\n";

> I'm not quite sure what you mean with the CRLF. You have
> a "\n" already, so the next line will start in a new line.
> If you want a blank line inbetween, just add another "\n";

\n (when not in binary mode) on Win32 will generate a CRLF sequence.

-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--<  o // //  Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs