Encryption recommendations

2008-08-08 Thread Chris O
Hi All!

I need to encrypt txt files on a shared linux web server, then decrypt
 read them on a win32 box. What module(s) are recommended for this?

- Chris
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Track mouse position

2008-06-06 Thread Chris O
The idea of better employee monitoring has been discussed at my
office. I'd like to create a compiled executable to be distributed via
group policy that will track mouse movement (or lack of) and report
activity/inactivity to a local server. I want to know when an employee
is working and when they're away from their desk.

I already know how to compile a perl script, distribute it to all
workstations, and have it report back to a server. I need to know
what's the best way to implement tracking of mouse movement. Ideas?

Also, the workstation OS is XP Pro if it makes any difference.

- Chris
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: draw boxes around tablular data ???

2008-05-16 Thread Chris O
 However, the customer wants the printed production orders to have boxes
 drawn around the tabular data.

 Currently, the tabular data is formatted via printf's to generate
 aligned columns, written to a TXT file, and send to a line printer.

 Please, give me some ideas HOW to draw boxes around this tabular data.

--

You could use an image file format or PDF to display the text. Then, draw
boxes around it.

- Chris

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


PerlEX,Modules, Sharing variables

2008-02-27 Thread Chris O
I'm attempting my first PerlEX app and I'm failing miserably. :-(

The goal is for my module to access variables stored in the calling
script. The following example works when run as CGI but fails as
PerlEX. Am I on the right path here or is there a better way?



# --
# test.plex
# --

BEGIN {
use strict;
use test_package qw(test_sub1 test_sub2);
our $cached_when=(localtime);
}

our %hash = (
'Bob' = {
Age = '7',
Type = 'Foo',
}
);

print Content-type: text/html\npragma: no-cache\n\n;

test_package::test_sub1();

test_package::test_sub2();



# --
# test_package.pm
# --

package test_package;

use strict;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);

require Exporter;

@ISA = qw(Exporter AutoLoader);
@EXPORT_OK = qw(test_sub1 test_sub2);
$VERSION = '0.01';

sub test_sub1{

for my $subkey (sort keys %{$main::hash{'Bob'}}){
print SubKey: $subkey = $main::hash{'Bob'}{$subkey}br\n;
}
}

sub test_sub2{
print 'Cached: '.$main::cached_when.br\n;
print 'Now: '.(localtime).br\n;
}


1;
__END__


test.plex
Description: Binary data


test_package.pm
Description: Binary data
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: MSVCR71.dll error in ActivePerl-5.10.0.1002-MSWin32-x86-283697.msi

2008-02-26 Thread Chris O
 Does installing msvcr71.dll (into one of your path folders) fix the
 problem ?

 Rob


It appears to be a library issue at compile. Jan mentioned that
dbd-odbc makes reference to msvcr71.dll. He's working on it. The dll
is installed on the machine in question and works when I revert to
5.8.

- Chris
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


MSVCR71.dll error in ActivePerl-5.10.0.1002-MSWin32-x86-283697.msi

2008-02-25 Thread Chris O
FYI, there appears to be a problem with the latest active perl release
(ActivePerl-5.10.0.1002-MSWin32-x86-283697.msi). After installation,
when I try to use any DBI related module, perl crashes and windows
displays the error this application has failed to start because
MSVCR71.dll was not found. This is on server 2003 sp1.

I found some info at http://support.microsoft.com/kb/895994 related to
this error.


- Chris
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


XMPP/Jabber example

2007-12-04 Thread Chris O
Hey Guys and Gals!

I may be going out on a limb here, but can anyone send me an example
of how to connect, send, and receive messages via XMPP? I've tried
many basic examples online, but none of them have options for
encryption. I'm using a default install of soapbox 07 server
w/encryption.

http://www.coversant.com/Products/SoapBoxServer/Overview/tabid/99/Default.aspx

Thanks!

- Chris
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: localtime failing on DST change

2007-03-13 Thread Chris O
On Tue, 13 Mar 2007, Bill Luebkert wrote:
 My 'localtime' function output doesn't reflect DST since the Sunday
 changeover.

Jan Wrote:
This is expected if you have the TZ environment variable set because
Microsoft didn't release an updated MSVCRT.dll.

Works fine for me on windows... but I'm having the same issue on Fedora. :-(

- Chris
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Fill PDF Form Fields

2007-03-06 Thread Chris O
Anyone know how to fill in form fields on a PDF? I've looked at a few
modules on cpan  googled a bit, but can't seem to find anything .

Thanks,

Chris
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


More efficient regex

2007-02-28 Thread Chris O

Gurus,

In the sample below, I'm checking $foo for all caps or all lowercase. Is
there a more efficient regex method?

- Chris



$foo='APPLE JONES PARKER';

if(($foo!~/[A-Z]/)or($foo!~/[a-z]/)){
$foo=title_case($foo);
}

print $foo.\n;




sub title_case{
  my($string) = @_;
  my @exception_words = ('A', 'The', 'If', 'Is', 'It', 'Of', 'Our',
'An','On', 'In', 'But', 'With', 'Has', 'Had', 'Have');
  my @exception_stuff = ('N','S','E','W','NE','NW','SE','SW','PO','BOX');
  
  $string =~ s/([\w']+)/\u\L$1/g;
  foreach(@exception_words){$string =~ s/\b$_\b/lc($_)/ge;} # Make Exception
Words LC
  foreach(@exception_stuff){$string =~ s/\b$_\b/$_/gei;} # Make Exception
Stuff Correct Case
  
  $string =~ s/(.)/\u$1/; # Uppercase the first letter
  return $string;
}

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


SOAP XML via https

2007-02-02 Thread Chris O
Hey gurus! It's been a while since I've posted here.

My latest task involves downloading faxes from myfax.com. I have a working
PHP example (attached) that retrieves an XML list of inbound faxes and I
need to convert this to Perl but I don't know where to start.

Can someone recommend what soap/xml modules I should use?


DownloadAvailableFaxesInfo.php5
Description: Binary data
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


SOAP XML via https

2007-02-02 Thread Chris O
Hey gurus! It's been a while since I've posted here.

My latest task involves downloading faxes from myfax.com. I have a working
PHP example (attached) that retrieves an XML list of inbound faxes and I
need to convert this to Perl but I don't know where to start.

Can someone recommend what soap/xml modules I should use?


- Chris


DownloadAvailableFaxesInfo.php5
Description: Binary data
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Stumped... Replace line endings

2006-11-19 Thread Chris O
I have blocks of text in my MS SQL database that look like...

This is line 1
This is line 2
This is line 3


I want to reformat them like...

This is line 1\par
This is line 2\par
This is line 3\par


(I'm writing documents in RTF Format, which use \par\n in place of \n)


The problem is that Perl refuses to replace the line endings when I try...

$text=~s/\n/\\par\n/g;



I'm stumped and can't find anything online. Should I be using something
other than \n to detect line endings?

- Chris

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Backticks and IIS6.0

2006-11-17 Thread Chris O
 I'm moving from Windows 2000 (IIS 5) to Windows Server 2003 (IIS6).  I'm
unable to capture the output of a program using backticks in a CGI script.

I've had weird issues using backticks on windows in general (in the past).
As a habit, I've since used system() instead and I've had no problems with
it. This could be a permissions issue as Peter said.

You may also want to try this...

open (P1, ping $host 21|) || die Cannot start ping\n;
@ping1 = P1;
close(P1);

- Chris

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Regular Expressions and variables

2006-11-11 Thread Chris O
how do i use scalar variables in substitution and complex matching?

eg I want the following to work.

$string =~ s/^$variable//;

$string =~ m/^([^$variable]*)/;

--


Do a search for perl regex and you'll find all kinds of info.

- Chris


$foo='The Quick Brown Fox';
$bar='brown';
$color='Orange';

print Found 1\n if ($foo=~/$bar/);  # Case sensitive

print Found 1\n if ($foo=~/$bar/i); # Case insensitive

$foo=~s/$bar/$color/gi;   # Case insensitive greedy substitution

print $foo\n;

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Regular Expressions and variables

2006-11-11 Thread Chris O
how do I use scalar variables in substitution and complex matching?

eg I want the following to work.

$string =~ s/^$variable//;

$string =~ m/^([^$variable]*)/;

--


Do a search for perl regex and you'll find all kinds of info.

- Chris


$foo='The Quick Brown Fox';
$bar='brown';
$color='Orange';

print Found 1\n if ($foo=~/$bar/);  # Case sensitive

print Found 1\n if ($foo=~/$bar/i); # Case insensitive

$foo=~s/$bar/$color/gi;   # Case insensitive greedy substitution

print $foo\n;

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: what?!? [OT]

2006-10-18 Thread Chris O

In 2038 I'll be 86. I don't take it for granted that I'll be seeing
anything
at all :-)

So? If I should live so long, I'll be 90, gumming my oatmeal in the nursing
home and hoping for another Packers' winning season. 


Well, I'll only be 55 so I should probably start working on a solution now.
:-)

- Chris

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: what?!?

2006-10-17 Thread Chris O
John Deighan wrote:
 
 The problem comes when you have a function that computes an index,
 it's buggy and returns a negative number. 

Bill wrote:
 The point is to debug your code properly.  You can't expect buggy code to
work properly anywhere.  This is just one spot where a bug in your code
could cause you to go a while longer before realizing it, but that's still
no excuse for the bug being there in the first place. It's the bug that's
causing the problem, not the feature.


Ditto. It's a good idea to check/filter any data imported that may contain
content or format inconsistencies. This is a founding security principle for
all software.

- Chris

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: what?!? [OT]

2006-10-17 Thread Chris O
 Does Perl have a Year 2000 problem? Is Perl Y2K compliant?

I wish we could have a y2k hype scare every year. I made a bundle in 99'
testing for y2k compatibility. Anyone else?

- Chris

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: :Mechanize problem

2006-09-27 Thread Chris O
 I am having trouble submitting a form because it is using an image to
click on. 
  
 How do I submit/click on this image. 
 
 David M. Funk 


If you cant just submit the form, you should be able to use HTTP::Request in
combination with www::mechanize.

- Chris

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Recompile at execute

2006-09-22 Thread Chris O
When a script is repeatedly executed, does activestate perl recompile it
each time? Or only the first run after a change has been made?

Is this procedure different when executing a script from the command line
vs. executing it as CGI from a web server (not perlex/fastcgi)?

- Chris

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl in the Funnies

2006-09-19 Thread Chris O
 Perl made it into the comics today! Check out Foxtrot.

That's awesome. No mention of any other languages either. Bill Amend Rocks.

- Chris

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl in the Funnies

2006-09-19 Thread Chris O
 That's awesome. No mention of any other languages either. Bill Amend
Rocks.

 What...JavaScript isn't enough of a real language? 

In a word, no. But JavaScript has come a long way over the years.

- Chris

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl in the Funnies

2006-09-19 Thread Chris O
 That's awesome. No mention of any other languages either. Bill Amend
Rocks.


 Big Deal.  Perl got honorable mention as a web tool.

 I dont think Bill Amend knows or cares much about Perl, other than it's
 somehow related to webpages.   but thats just a guess.


I'll have to agree with George's peanuts theory. Although, for a proclaimed
dead language, honorable mention as a web too is not too bad.

- Chris

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Help with CGI.PM and Perlex

2006-09-15 Thread Chris O
 I am running into a problem with a very basic function with CGI.PM. The
code will not param correctly.
 This first test code taken from the POD will not param any values...



To me, cgi.pm always seemed like a big pain. You can print the form and
headers manually, and use the following cgi.pm excerpt to read the form data
(much easier).

Hope this helps, 

- Chris



print Content-type: text/html\npragma: no-cache\n\n; # Content type 
prevents browser caching
parse_form; # use this function to capture both GET and POST value pairs as
%input


## Print html containing form here

sub parse_form {
   read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
   if (length($buffer)  5) {
 $buffer = $ENV{QUERY_STRING};
}
   @pairs = split(//, $buffer);
   foreach $pair (@pairs) {
  ($name, $value) = split(/=/, $pair);

  $value =~ tr/+/ /;
  $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack(C, hex($1))/eg;
  
  $input{$name} = $value;
  #print $name: $valuebr;
   }
}

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Working Out Dates

2006-09-07 Thread Chris O
 Hi guys,

 I looking for some help with dates... shows the last 10 working days...
work out the weekends and miss them out

 Ewen


Date::Calc is your friend. :-)

- Chris

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Out of office - Cant these be filtered from the list?

2006-08-25 Thread Chris O
For those of you who are associated with activstate, has stripping the OOF
messages at the server level ever been considered? Maybe require anything
with a subject containing Out of office to be reviewed by a moderator
first?

Just a suggestion, not a gripe. You guys are awesome.

- Chris


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs