Re: determine index of array element

2002-01-21 Thread Jeffrey
You can find what you want with an array, but a hash would be more efficient. Array code: for (my $count = 0; $count = scalar @array; $count++) { if ($array[$count] eq $var) { #Do stuff (spit out the index, #set a flag, whatever } } Hash code: # Well, your hash could

determine index of array element

2002-01-21 Thread Abner, Daniel
Let's say I have an array... @array = ("three", "one", "two"); and I have a variable... $var = "three"; How can I determine the index of the string "three" in the array @array (if it exists)? In this case, "0". Should I be working with hashes instead and then relying on keys

RE: Getting the url from IE

2002-01-21 Thread rayid . ghani
Thanks a lot for your help! I have been looking for this for a week and couldn't find any resources on the web or in any of the books that I checked. BTW, the filethat you mentioned, C: \Perl\html\site\lib\Win32\OLE\Browser\Browser.html, doesn't see mto be there in my installation of Perl. I woul

RE: Getting the url from IE

2002-01-21 Thread Peter Guzis
You could use OLE events, but the following is probably much easier: --- use strict; use Win32::OLE; my $ie = Win32::OLE->new ('InternetExplorer.Application') or die Win32::OLE::LastError(); $ie->{'Visible'} = 1; my ($url, $last_url); while (1) { $url = $ie->{'LocationURL'}; last if Win3

Re: Another Question - hashes please ..

2002-01-21 Thread Edward G. Orton
- Original Message - >From: "Andrew Wax" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Monday, January 21, 2002 4:05 PM >Subject: Another Question - hashes please .. > >Good Afternoon - I have a hash that I define as: > >$the_data[1] = >{ >x => "A", >y => "B", >}; >print $t

Re: Another Question - hashes please ..

2002-01-21 Thread Andrew Wax
Chuck, This did the trick Thank You! The small things in life - like syntax!! Andrew - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 21, 2002 4:09 PM Subject: Re: Another Question - hashes please .. Andrew, try: $the_data[1]->{y} =

RE: Another Question - hashes please ..

2002-01-21 Thread Peter Guzis
When you write: $the_data[1] = some_value; you are overwriting all of $the_data[1]. Instead, if you only wish to replace an exising key, use: $the_data[1]->{y} = "C"; Peter Guzis Web Administrator, Sr. ENCAD, Inc. email: [EMAIL PROTECTED] www.encad.com -Original Message- From: Andre

RE: Another Question - hashes please ..

2002-01-21 Thread Morse, Richard E.
In your "update", you are actually resetting the entire value of $the_data[1] to point to a new hash reference, which has only y defined.   Try this instead:   $the_data[1] = { x => 'A', y => 'B' }; print $the_data[1]->{x}, "\n"; $the_data[1]->{y} = 'C'; print $the_data[1]->{y}, "\n";    HTH,

Re: Another Question - hashes please ..

2002-01-21 Thread Chuck . Hirstius
Andrew, try: $the_data[1]->{y} = 'C'; Chuck >Good Afternoon - I have a hash that I define as: > >$the_data[1] = >{ >    x => "A", >y => "B", >}; >print $the_data[1] -> {x}; > >works and prints A >if I want to update the value of 'y' to C like: >$the_data[1] >{ >y => "C" >}; >prin

Another Question - hashes please ..

2002-01-21 Thread Andrew Wax
Good Afternoon - I have a hash that I define as:   $the_data[1] ={    x => "A",y => "B",};print $the_data[1] -> {x};   works and prints A     if I want to update the value of 'y' to C like: $the_data[1] ={y => "C"};print $the_data[1] -> {x};   this does not work because it prints o

Howto call perl subrutine

2002-01-21 Thread Vilius Gaidelis
Howto call perl subrutine from Oracle?   Vilius Gaidelis 

Getting the url from IE

2002-01-21 Thread rayid . ghani
I'm trying to write a perl script that that starts an IE (internet explorer) instance using Win32:: OLE and then runs in the background, monitoring/recording the urls that are being browsed in that IE instance. I can't find any documentation on the IE object model to get to the address/url that is

RE: Quick PING question

2002-01-21 Thread Ben Wilson
I use this to see if my Outlook Web Access server is still up. Been having some problems with the asp engine on IIS dying mysteriously, the http service is available, but doesn't render the page correctly, so I check the tag. use LWP::Simple; $blat_path = "blat.exe "; $subject = " OWA ";

WMI Impersonate User

2002-01-21 Thread Ken Swift
Hello again, I apologize for all the questions that I have asked in the last week, but here is one more. I have the below block of code that works fine, but I want to check the service of a remote server that is on a different domain. sub MS_CheckService { my($CheckService) = @_; my

Re: ppm repositories

2002-01-21 Thread Jeffrey
http://aspn.activestate.com//ASPN/Reference/Products/ActivePerl/faq/ActivePerl-faq2.html#repositories --- "Michael D. Schleif" <[EMAIL PROTECTED]> wrote: > > What is a good list of ppm repositories? > > I haven't needed to use ppm for several months. > Now, when I goto do a > search, these fai

ppm repositories

2002-01-21 Thread Michael D. Schleif
What is a good list of ppm repositories? I haven't needed to use ppm for several months. Now, when I goto do a search, these fail: I searched the archives to no avail. What do you think? -- Best Regards, mds mds resource

RE: Quick PING question

2002-01-21 Thread Chuck . Hirstius
>Ok, here's another one for you... Can I, from command line >run a "hit" to a web site, and report the results back to a file, >and NOT to the browser? Yes. >It seems that the PING thing saved so much typing that they want >me to try to do the same for some Web Sites. they're never satisfied

Re: Quick PING question

2002-01-21 Thread Edward G. Orton
- Original Message - From: "Chris" <[EMAIL PROTECTED]> To: "Win32 Perl Users" <[EMAIL PROTECTED]> Sent: Monday, January 21, 2002 2:08 PM Subject: RE: Quick PING question > Thank you to ALL who answered > > Here I was trying to reinvent the wheel! ;-) > > Ok, here's another one for y

RE: Quick PING question

2002-01-21 Thread Chris
Thank you to ALL who answered Here I was trying to reinvent the wheel! ;-) Ok, here's another one for you... Can I, from command line run a "hit" to a web site, and report the results back to a file, and NOT to the browser? It seems that the PING thing saved so much typing that they want m

Re: Quick PING question...

2002-01-21 Thread Ken Bandes
> I am looking at Net::Ping and trying to get it to actually dump the real > results > to a file. > > It currently can display the "HostName is Alive" or "Not responding". > > This is being run on NT/W2K/W98/WME boxes. > > How can I display the real results??? Here's a script I use to monitor my

RE: Win32::Lanman & disabled accounts

2002-01-21 Thread Bullock, Howard A.
Check out the discussion of USER_FLAGS at : http://www.roth.net/perl/adminmisc/#USER_FLAGS -Original Message- From: Geoffrey Leeming [mailto:[EMAIL PROTECTED]] Sent: Monday, January 21, 2002 12:39 PM To: [EMAIL PROTECTED] Subject: Win32::Lanman & disabled accounts Can I use any of the W

Win32::Lanman & disabled accounts

2002-01-21 Thread Geoffrey Leeming
Can I use any of the Win32::Lanman functions to find out if an NT account is disabled? Win32::Lanman::NetUserGetInfo will tell me almost everything else I need to know, but it doesn't seem to include whether or not it's disabled... or am I missing something? ___

RE: Quick PING question...

2002-01-21 Thread Joe Schell
> -Original Message- > Behalf Of Chris > > > I am looking at Net::Ping and trying to get it to actually dump the real > results > to a file. > > It currently can display the "HostName is Alive" or "Not responding". > > This is being run on NT/W2K/W98/WME boxes. > > How can I display the r

Re: Quick PING question...

2002-01-21 Thread Edward G. Orton
- Original Message - From: "Chris" <[EMAIL PROTECTED]> To: "Win32 Perl Users" <[EMAIL PROTECTED]> Sent: Monday, January 21, 2002 11:49 AM Subject: Quick PING question... > I am looking at Net::Ping and trying to get it to actually dump the real > results > to a file. > > It currently ca

RE: (no subject)

2002-01-21 Thread Ron Hartikka
try $counter->update; after $counter->configure(-text=>$i);   My guess is you are going to want to look at Tk's 'after' method.   -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of robozSent: Monday, January 21, 2002 11:01 AMTo: [EMAIL PROTE