Win32::OLE, WMI, and Variable Question

2004-07-06 Thread ANDERSON, JEFFREY
Hello all, I'm relatively new to perl, so please be kind :) I'm trying to schedule some jobs on a bunch of win2k/2003 boxes. I have the following VBscript that I'm trying to convert to perl: option Explicit Dim objWMIService, objNewJob, errJobCreated, JobID Set objWMIService = GetObject("winmg

Regular expression to test for numeric values

2004-04-01 Thread Motter, Jeffrey D
I've read the FAQ's on this, but they don't seem to answer the question. I have a variable that could contain any value( alpha, alpha-numeric, or numeric). If the value is NOT numeric, I need to change the variables' value to "0"( as in zero ). Examples: $txtype="2.314"; # is numeric, so keep t

Using glob

2003-07-11 Thread MOTTER, JEFFREY D
Is it possible to do a "glob" on a directory and get a list of files with a certain extension( *.txt ) and also for a specific modification time? I'm current doing: my @file_list=glob("c:\\rawdata\\*.txt"); But I only want to get files modified on a certain date. Jeff __

Getting Tables in MS Access DB

2002-12-26 Thread MOTTER, JEFFREY D.
Using a DBI:ODBC DSN-less connection to an Access DB( Access 2000 ), how do I get the the names of all tables contained in the DB? I tried to query MSysObjects, but I'm getting a permission's error. Here's my connect string: my $dbh = DBI->connect("dbi:ODBC:driver=Microsoft Access Driver

Re: Can't print using word (97) through Win32::OLE (p.s)

2002-04-06 Thread Jeffrey
->Quit; > } > > TIA > Stephen Patterson > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs = ---

Re: Can't print using word (97) through Win32::OLE

2002-04-06 Thread Jeffrey
rint: > Win32::OLE->LastError"; # > line 29 > $word->Quit; > } > > TIA > Stephen Patterson > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/

Safe IP variables

2002-04-02 Thread Jeffrey
don't write scripts that are used by the general public -- only co-workers. And if they enter 'rm -rf *', it's their own machine that they are hosing. :) ===== Jeffrey Hottle nkuvu at monkey yaho

Re: Perl's exec and system functions

2002-04-02 Thread Jeffrey
> > Any ideas? Any suggestions? Any better way to do > this? Any better documentation on these two > functions? I am still searching and thought I'd try > here. > > Thanks in advance! > > Nicole Amashta > Web Application Development > > > = Jeffrey

Re: Retrieving Values from OLE Automation

2002-03-19 Thread Jeffrey
""; > > my $Outlook = Win32::OLE->new('Outlook.Application', > 'Quit') || > die "FATAL ERROR: Cannot open Outlook!\n", > Win32::OLE->LastError; > my $ol = Win32::OLE::Const->Load($Outlook); > my $namespace = $Outlook->Ge

Re: Multi-level hashes and arrays

2002-03-17 Thread Jeffrey
gt; Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs = Jeffrey Hottle nkuvu at monkey yahoo dot com (remove the animal to email me!)

RE: Tk, Directory Browser (not File Browser)

2002-03-15 Thread Jeffrey
--- Martin Moss <[EMAIL PROTECTED]> wrote: > Tk::DirTree Original post: > > DirTree does this, but does not match the > "Windows" look of > > getOpenFile. Any ideas? I think someone missed reaading a sentence here. ;) = ---------

Difference module

2002-03-13 Thread Jeffrey
, since I can't guarantee that any specific software package is installed. Thanks. = -------- Jeffrey Hottle nkuvu at monkey yahoo dot com (remove the animal to email me!) __ Do You Yahoo!? Try FREE Yahoo! Mai

Re: Reading Excel file

2002-03-12 Thread Jeffrey
in that. Win32::OLE is best if this won't be a cross-platform script. SpreadSheet::ParseExcel and SpreadSheet::WriteExcel are better solutions for cross-platform work. = -------- Jeffrey Hottle nkuvu at monkey yahoo dot

Anonymous subroutines

2002-03-11 Thread Jeffrey
$1)/ige; Semi-Off topic question. What's the advantage of an 'anonymous' sub? You still have to call it by name, and add the &$, right? Should I just RTFM? :) (Hint: I'm not sure where to look this up) =

RE: Excel SaveAs

2002-03-08 Thread Jeffrey
hat... Thanks. = -------- Jeffrey Hottle nkuvu at monkey yahoo dot com (remove the animal to email me!) __ Do You Yahoo!? Try FREE Yahoo! Mail - the world's greatest free email! http://mail.yahoo.com/ ___ Perl-Win32

Excel SaveAs

2002-03-08 Thread Jeffrey
dition to extension). The SaveAs works if I specify the filename only -- but it doesn't save to a CSV file, it just renames it. Anyone have ideas (preferably regarding this subject)? = Jeffrey Hottle nkuvu at monkey

Distance between 2 latitudes and longitudes

2002-03-06 Thread MOTTER, JEFFREY D.
Does any know where I can find a script to calculate the distance between 2 seperate latitudes and longitudes? Jeff ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Does Perl have "Case" Statements?

2002-03-01 Thread Jeffrey
with the if-elsif chain you can OR your conditions. Is there another situation where fall-through is desired? Most sanity checkers (a la Lint) have a default warning about fall-through. = Jeffrey Hottle nkuvu at monkey yahoo dot com (remove the animal to email me

Re: Does Perl have "Case" Statements?

2002-02-28 Thread Jeffrey
ching string. > > Thus a Case Statement, IMHO, would be the best > possible solution - with > my current knowledge... > > :) > > TIA!! > > Chris > > > _______ > Perl-Win32-Users mailing list > [EMAIL PRO

RE: sending a file as an e-mail Attachment using Perl

2002-02-27 Thread Jeffrey
You'll probably want to s/Jan/Jenda/ here: --- "Krummel, James C - PGGC-6" <[EMAIL PROTECTED]> > I have been using Jan Krynicky Mail::Sender for > years. It is easy and works > great. = -------- Jeffrey Hottle nkuvu at monkey ya

RE: How do i unsubscribe this list

2002-02-27 Thread Jeffrey
> Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs = Jeffrey Hottle nkuvu at monkey yahoo dot com (remove the animal to email me!) ___

RE: using a command which includes spaces in the system() functio n

2002-02-25 Thread Jeffrey
h". Ooh, look, another nit to pick! Quick, after it! ;) = ---- Jeffrey Hottle nkuvu at yahoo dot com __ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic G

RE: Repost: problems with elsif and $self

2002-02-25 Thread Jeffrey
else { > > print("FALSE\n"); > > } > > > > And what does it print when you take out the first > line, i.e. > when $var is not defined. = Jeffrey Hottle nkuvu at yah

Re: use strict and globabl variables

2002-02-23 Thread Jeffrey
he 2002 Olympic Games > http://sports.yahoo.com > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs = Jeffrey Ho

Re: Win 2000 Pl & CGI problems

2002-02-23 Thread Jeffrey
s are with the execute > and read permissions. > I get a little lost in that area. Any advice? > > > James > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mai

RE: using a command which includes spaces in the system() functio n

2002-02-22 Thread Jeffrey
o unsubscribe: > http://listserv.ActiveState.com/mailman/mysubs > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs = -

Re: Repost: problems with elsif and $self

2002-02-22 Thread Jeffrey
series of if/elsif's. > > Dirk Bremer - Systems Programmer II - ESS/AMS - > NISC St. Peters > 636-922-9158 ext. 652 fax 636-447-4471 > > [EMAIL PROTECTED] > www.nisc.cc > > > ___ > Perl-Win32-Users mailing

RE: Repost: problems with elsif and $self

2002-02-22 Thread Jeffrey
elf=shift; > > (doesn't have to be the first line, but it must > be the first shift; > > I would use Data::Dumper in your code and do a > > > > print STDERR Dumper($self); > > > > at various points. > > > > Also make sure you haven't redefined $self locally >

Re: Perl, OLE, and Excel commands.

2002-02-20 Thread Jeffrey
nce or a > general way to call > Excel Menu commands from OLE from within PERL? > > Thanks, > Daniel > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailma

Re: Strange if syntax

2002-02-20 Thread Jeffrey
ve no idea what the author expected it to hold, either. I really dislike Rational's Perl coders... Thanks for the responses, but don't bother with this much more, since I don't think that even the author knew what the script was trying to do. = -

Strange if syntax

2002-02-20 Thread Jeffrey
sonally wouldn't write it that way, but it does at least make sense). What I am wondering about the most is the ; between the "" and the if. BTW, this is slightly OT, since this is a script from Rational -- to be run with ccperl, not AS Perl. Thanks for any enlightenment. =

RE: path info

2002-02-19 Thread Jeffrey
directory that the script was called from. The FindBin module will give you the script's actual directory. = -------- Jeffrey Hottle nkuvu at yahoo dot com __ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002

Re: Benchmark Error

2002-02-14 Thread Jeffrey
r a > reliable count) > > I assume that the error is coming from the test2 > sub. When run without the benchmark, I get no > errors. Why does test2 generate this > error? > > Dirk Bremer - Systems Programmer II - ESS/AMS - > NISC St. Peters > 636-922-9158 ext. 652 fax 636-447-4471 >

Re: Phantom process?

2002-02-08 Thread Jeffrey
ly thing it mentions is that if you haven't saved the workbook, Excel asks if it should be saved (unless DisplayAlerts is false). Since I am completely unfamiliar with the code in Win32::OLE, do you think it is more likely a problem with MS or the Win32::OLE module? =

Re: excel ole: how to set print area and page set up

2002-02-08 Thread Jeffrey
** > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs = ---

Re: Hash Questions

2002-02-04 Thread Jeffrey
an't find reference to wq anywhere. = ---- Jeffrey Hottle nkuvu at yahoo dot com __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com ___ Perl-Wi

RE: > was unexpected at this time

2002-02-01 Thread Jeffrey
d from volumes where >stgpool_name=\'$Pool\'and (status=\'FULL\' or >status=\'FILLING\') and >access\<\>\'OFFSITE\' order by volume_name`); = Jeffrey Hottle nkuvu at yahoo dot com _

RE: Loops - Internal Counter

2002-02-01 Thread Jeffrey
ILE_LOCATION/DF_$catname.dat"); > > while () { > push (@items, $_) if ($counter ne $id); > > $counter++; > } > > Roy > [EMAIL PROTECTED] > ___ > Perl-Win32-Users mailing

Re: where to find perlref for autovivify (was RE: Strange assignment)

2002-01-25 Thread Jeffrey
gt; autovivification? > > Is this described in the Camel book? > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users = --

Re: determine index of array element

2002-01-21 Thread Jeffrey
t; Dan. > _______ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users = Jeffrey Hottle nkuvu at yahoo dot com __

Re: ppm repositories

2002-01-21 Thread Jeffrey
_ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users = Jeffrey Hottle nkuvu at yahoo dot com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail!

Perl talking to VSlick

2002-01-16 Thread Jeffrey
lk to VSlick? It is conceivable that I search through all of the .h files for the project, but there are a LOT of files. Large project. I've already searched CPAN for vslick, with no luck. TIA = -------- Jeffrey Hottle nkuvu at yah

RE: OLE errors

2002-01-11 Thread Jeffrey
x27;, 'Quit')); > > You want to use '||' instead. > > Try this: > > my $Excel = > Win32::OLE->GetActiveObject('Excel.Application') > || Win32::OLE->new('Excel.Application', '

OLE errors

2002-01-11 Thread Jeffrey
mands still work fine. This is a new script, meaning that I typed everything in properly (no hidden garbage characters), but these are commands I have used many many times. Does anyone have any insightful or generally useful ideas? I'm stumped. = Jeff

Re: Launching Excel via Win32::OLE with libraries

2002-01-09 Thread Jeffrey
ded for informational purposes and > should not be > construed as a solicitation or offer to buy or sell > any securities or > related financial instruments. > > _______ > Perl-Win32-Users mail

Re: Calling a Perl Program Within the Middle of Another Perl Program

2002-01-07 Thread Jeffrey
TECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users = Jeffrey Hottle nkuvu at yahoo dot com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail

RE: [Fwd: Re: null pointer & OLE]

2001-11-29 Thread Jeffrey
T "Play" > > > > I don't know if it is OLE telling me that the > parameter is not optional, > > or if OLE is just relaying a message from the > "Play" function... > > > > ==Doug Claar > > ___ > > Perl-Win32-

Re: Regular expression help

2001-11-29 Thread Jeffrey
great. > > Rob > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users = Jeffrey Hottle nkuvu at yahoo dot com

RE: sprintf question

2001-11-28 Thread Jeffrey
course. I should have remembered this, but apparently I wasn't thinking too clearly about it. Thanks for the explanation. = Jeffrey Hottle nkuvu at yahoo dot com __ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site

Re: OT: Virus

2001-11-28 Thread Jeffrey
hat should be easily handled by user > configuration ? Uhh, is the answer Microsoft..? ;) = Jeffrey Hottle nkuvu at yahoo dot com __ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.co

RE: sprintf question

2001-11-27 Thread Jeffrey
use the original regex matches all the way from > the beginning (^) to the > end ($) of the string, I felt I should do so as > well. I don't know the ins > and outs of the data Scott might be running through > it; he might have a good > reason for insisting the input string

RE: sprintf question

2001-11-27 Thread Jeffrey
D.+$/; > my $tmp = $1; > $tmp = sprintf("%.3d", $tmp); // not doing its > job properly. > print "$tmp is tmp\n"; > > } > > > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://lis

Re: How to omit lines from execution in a perl program

2001-11-12 Thread Jeffrey
; evaluating > the string, and then exits. Yuck. > > Regards > > Nick Djurovich > > Software Development Manager > mediaMailGroup > Colchester > UK > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED]

RE: Good IDE's, either freeware or commercial, for debugging?

2001-11-09 Thread Jeffrey
ts freeware variants. UltraEdit is only > $30 and worth every > penny. = Jeffrey [EMAIL PROTECTED] __ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com

Re: Optimizing Excel usage?

2001-10-15 Thread Jeffrey
s > @rowCol = ("A","B","C","D"); As a side note, you can do away with this array -- the Cells object also accepts one-based column numbers. (i.e., column B is 2). This might give you a trivial speed gain... = Je

RE: [PBML] Re: Regular expression needed

2001-10-10 Thread Jeffrey
t;[EMAIL PROTECTED]> wrote: > you need to escape all of the /'s in your path with > in > the match > > /^\/bootp\/linux\//; ===== ---- Jeffrey [EMAIL PROTECTED] __ Do You Yahoo!? Make a g

RE: [PBML] Re: Regular expression needed

2001-10-10 Thread Jeffrey
e to match theses lines > > I tried this while () { > chomp(); > /^\/bootp/linux/\/ > > but it doesn't work how can I do ? > > Thanks. > > > > > > > > > > > > ____

File::Find docs

2001-10-09 Thread Jeffrey
A number of people have sent me email mentioning that the docs contain all. Please stop. It is quite obvious that I didn't understand the docs. I am so sorry that I bothered everyone on the list with my trivial question. = Jeffrey [EMAIL PROT

RE: File::Find p.s.

2001-10-09 Thread Jeffrey
> each file located by > find() is "wanted". = Jeffrey [EMAIL PROTECTED] __ Do You Yahoo!? NEW from Yahoo! GeoCities - quick and easy web site host

File::Find p.s.

2001-10-09 Thread Jeffrey
The code that I am working with is simple: use File::Find; find (\&wanted, "*.txt"); #various patterns tried here sub wanted { print "Found $_\n"; } = ---- Jeffrey [EMAIL PROTECTED] ___

File::Find

2001-10-09 Thread Jeffrey
ng for -- I want the filenames, not the contents. TIA = ---- Jeffrey [EMAIL PROTECTED] __ Do You Yahoo!? NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocitie

Re: OLE - excel chart placement

2001-09-28 Thread Jeffrey
the chart like this: > > $chart = $Book->Charts->Add > > > the chart ends up on its own sheet until calling the > location method to > move it > > > tia ( I hope), > Paul > > ______

RE: Inserting a picture into Excel

2001-09-27 Thread Jeffrey
res->ShapeRange->ScaleWidth(0.4, > 0, 0); > > $Excel->ActiveSheet->Pictures->ShapeRange->ScaleHeight(0.4, > 0, 0); > > $Excel->ActiveSheet->Pictures->ShapeRange->IncrementLeft(-3.75); > > $Excel->ActiveSheet->Pictures->Sha

Re: insert a picture into an Excel spreadsheet

2001-09-27 Thread Jeffrey
; > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users = Jeffrey [EMAIL PROTECTED] _

Replacing characters in a string

2001-03-29 Thread MOTTER, JEFFREY D. (SBMS)
I have a string that was read from a file( in BINMODE ). After I read from the file, I store the string in a variable called $line. Right after that, I do a substitution to get rid of any leading characters that are hex 00( "\x00" ) $line=~s/^\x00+//; Sometimes, there can be anywhere fro

RE: Executing a script within another script

2001-03-05 Thread MOTTER, JEFFREY D. (SBMS)
I have been using the "system" method for quite some time and it seems to work very well. $var1="something"; $var2="something else"; system "c:\\perl\\scripts\\mytest.pl $var1 $var2"; > -Original Message- > From: Dirk Bremer [SMTP:[EMAIL PROTECTED]] > Sent: Monday, March 05, 2001 10:43