Windows Directory

2006-03-21 Thread Jerry Kassebaum
How do I get a directory listing on a Windows machine? I think it is something like: $direc = system `dir`; print $direc; ; Thanks. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe:

Re: lwp, javascript - forget it.... right?

2006-03-21 Thread Chris Wagner
At 10:32 AM 3/21/2006 +0800, Foo Ji-Haw wrote: It's not a Perl Thing. All languages (including Java, .Net) cannot 'eval' javascript. Since you can access the javascript file, why not mimick their encryption? I didn't want to believe that and a quick CPAN search relieved me. There's atleast one

Re: Windows Directory

2006-03-21 Thread Ken Barker
At 09:56 AM 3/21/2006, Jerry Kassebaum wrote: How do I get a directory listing on a Windows machine? I think it is something like: $direc = system `dir`; print $direc; ; Try: $command = dir c:\\your_dir; system($command); ___ Perl-Win32-Users

RE: Windows Directory

2006-03-21 Thread Paul Sobey
How do I get a directory listing on a Windows machine? I think it is something like: $direc = system `dir`; print $direc; ; Thanks. my $dir = C:\\test; opendir DIR, $dir; my @files = grep { ! /^\.+$/ } readdir DIR; closedir DIR; you might add a map { $dir\\$_ } before the grep if you

Re[2]: Windows Directory

2006-03-21 Thread Christopher Taranto
Tuesday, March 21, 2006, 8:42:57 AM, you wrote: KB At 09:56 AM 3/21/2006, Jerry Kassebaum wrote: How do I get a directory listing on a Windows machine? I think it is something like: $direc = system `dir`; print $direc; ; KB Try: KB $command = dir c:\\your_dir; KB system($command); Or, without

mimic javascript encryption with Javascript::MD5

2006-03-21 Thread Hon Shi
Not trying to do anything nefarious here, just tring to automate some testing. Anyways. I've been using perl's LWP to 'screenscap' and collect data. We ran into a site that uses javascript to hide the user name and login. The form has ist's submit mapped as PINPUT id=submit1

Re: mimic javascript encryption with Javascript::MD5

2006-03-21 Thread Carter Thompson
Take a look at the Digest::MD5 module on CPAN. http://search.cpan.org/~gaas/Digest-MD5-2.36/MD5.pm I use it quite a bit in various automation projects I've done. You may be able to adapt it to your needs. HTH, Carter. On Mar 21, 2006, at 11:28 AM, Hon Shi wrote: Not trying to do

Re: Implementing or Emulating TSRs in Win32 Console Apps

2006-03-21 Thread pDale
On 3/17/06, Chris Wagner [EMAIL PROTECTED] wrote: At 11:09 PM 3/17/2006 +0200, =?iso-8859-1?Q?Veli-Pekka_T=E4til=E4?= wrote:It's no big deal really but I wonder why you use the marginally shorterforms u and ur in stead of you and your. U renders quite well with a speech synth here, but ur is

Re: WWW:Mechanize and Proxies

2006-03-21 Thread DePriest, Jason R.
David, You need to change your environment variables for the operating system. If you wanted to do it from within the script you could do something like this: $ENV{HTTP_PROXY} = 'http://username:[EMAIL PROTECTED]:8080/''; On 3/9/06, David TV wrote: Something keeps on failing... Here's the

How to clear up blanks when converting an array to a hash

2006-03-21 Thread Paul Rousseau
Hello, I run an executable that returns a small array of data. my @ans = qx {myexec}; @ans contains the values, Value= 1 Status = 13 Options = 0x0a Quality = 3 I use a map function to convert this array into a hash. my %results = map {(split /=/)} @ans; My questions are: 1.

Re: mimic javascript encryption with Javascript::MD5

2006-03-21 Thread Hon Shi
Thanks. MD5 seems to work just fine. I know this really isn't perl but do I have this right? Seems so simple that it must be wrong! The javascript function simply takes the password and a time stamp (I'm led to believe it's millisec since the 1970 date) and hashes it. This hash is part of the

Re: How to clear up blanks when converting an array to a hash

2006-03-21 Thread Chris Wagner
At 04:22 PM 3/21/2006 -0700, Paul Rousseau wrote: @ans contains the values, Value= 1 Status = 13 Options = 0x0a Quality = 3 my %results = map {(split /=/)} @ans; My questions are: 1. How to I get rid of the blanks on either side of the key and the value? 2. How do I also get rid of

Windows Directory

2006-03-21 Thread nonlin
there are 3 way to get a directory and it dosn't matter if it windows or unix, basen on your example: just: @direc = `dir`;print "@direc";; removing the system sould do the tick, or if you want to use the systm just use system ("dir");; and system will do the printing as well for you: or

Re: How to clear up blanks when converting an array to a hash

2006-03-21 Thread $Bill Luebkert
Chris Wagner wrote: At 04:22 PM 3/21/2006 -0700, Paul Rousseau wrote: @ans contains the values, Value= 1 Status = 13 Options = 0x0a Quality = 3 my %results = map {(split /=/)} @ans; My questions are: 1. How to I get rid of the blanks on either side of the key and the value? 2. How

Re: WWW:Mechanize and Proxies

2006-03-21 Thread David TV
Ok, that worked! Thanks a lot! On 3/22/06, DePriest, Jason R. [EMAIL PROTECTED] wrote: David, You need to change your environment variables for the operating system. If you wanted to do it from within the script you could do something like this: $ENV{HTTP_PROXY} = 'http://username:[EMAIL