CGI Cookies on IE7.0, somewhat OT
I've written a CGI that used to work on IE6 but does not on IE7. That is, there is a form that writes a cookie which a second page then uses for processing. With IE7 the cookie comes up blank (but still works with Firefox and used to work with IE6). Has anyone played with IE7 and seen this problem? If so, is there a fix or workaround? ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Quick Q
At 11:40 PM 4/16/2006 -0400, Ng, Bill wrote: Actually ... If I'm looking just for a list of directories, I pass /ad and /b to my dir command. Bill opendir DIR, $path; @dirs = grep {-d} readdir DIR; That gives u all the directories in the current directory $path. -- REMEMBER THE WORLD TRADE CENTER ---= WTC 911 =-- ...ne cede malis 0100 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Non-blocking IO?
Hi folks, I'm using the HTTP::Daemon module. Is there any way to do non-blocking IO with that? Thanks. -- Lyle Kopnicky Software Project Engineer Veicon Technology, Inc. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Quick Q
Yah I guess I missed the recursive bit. So then just stick something like I mentioned below into a subroutine, pass in the initial directory path, when you do the -d test push the directory into a global array and make a callback to the same routine passing the new directory path. - Original Message - From: Ng, Bill [EMAIL PROTECTED] To: Trevor Joerges [EMAIL PROTECTED]; perl-win32-users@listserv.ActiveState.com Sent: Sunday, April 16, 2006 11:40 PM Subject: RE: Quick Q Actually ... If I'm looking just for a list of directories, I pass /ad and /b to my dir command. Bill -Original Message- From: Trevor Joerges [mailto:[EMAIL PROTECTED] Sent: Friday, April 14, 2006 4:40 PM To: Ng, Bill; perl-win32-users@listserv.ActiveState.com Subject: Re: Quick Q --- open (DIR, dir c:\\some\\directory |); while (DIR) { chomp $_; push (@subDirs, $_); } close DIR; --- Anyone got any clues for me. Not looking for code, just for the correct function or module. Thanks. Just use the file test -d operator within you opendir and maybe with a little Swartzsian Transform like: my $dir = 'C:/'; opendir(DIR, $dir) or die can't opendir $dir: $!; my @dirs = map { $_\n } # you probably won't need this. Just added so it prints better grep { -d $dir/$_ } # find directories only grep { !/^\./ } # omit those pesty . and .. directories on Windows readdir(DIR); closedir(DIR); print @dirs; Hth, --Trevor. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Quick Q [-d test with unicode/wide directory names]
A quick word of caution about the -d directory operator under Win32 (and -e and opendir and ...). If the Win32 directory name contains unicode / wide characters, the -d operator will always return false. As I understand it, Win32 Perl uses the A (ansi) version of the Win32 API directory calls -- which don't work with file and directory names that include unicode characters. So even if you pass -d a string variable in Windows native UTF16LE format that correctly matches the directory name (with unicode characters) on disk, if will return false. Same goes for the -e file existence test -- for filenames that contain unicode characters. opendir suffers from the same problem. And even if you do something like the following, the -d and -e tests will always return false (under Win32) when the filename / directory name contains unicode / wide characters. my $dir = 'c:/some directory name that contains files and/or directories with unicode characters/'; my @files = split /\n/, `dir \$dir\ /b`; foreach my $file (@files) { print testing $file...; if (-d $dir . $file) { print directory\n; } elsif (-e $dir . $file) { print exists\n; } else { print does not exist\n; } } The dir command will return the file / directory names in ANSI format -- which will create filenames like the following when the filename contains unicode/wide characters. testing ??_HostID_2006-01-19_213218.xls...does not exist testing ??_HostID_2006-01-19_214358.xls...does not exist testing ??_HostID_2006-01-19_214424.xls...does not exist Apparentlly, there was a USING_WIDE macro / switch in the Perl source that attempted to deal with Win32 file and directory names that contain unicode characters (that would make Perl use the Win32 API W version directory calls) but it was disabled with Perl 5.8. See: http://aspn.activestate.com/ASPN/Mail/Message/perl5-porters/2933666 [Yes, there are workarounds to this problem... all of which involve not using Perl's built-in directory functions.] Question for ActiveState / Jan Dubois are there any plans to update Win32 Perl to support built-in directory and file operators that work with Win32 directory names and filenames that contain unicode characters? Regards, ... Dewey [EMAIL PROTECTED] wrote on 04/17/2006 02:46:56 PM: Yah I guess I missed the recursive bit. So then just stick something like I mentioned below into a subroutine, pass in the initial directory path, when you do the -d test push the directory into a global array and make a callback to the same routine passing the new directory path. - Original Message - From: Ng, Bill [EMAIL PROTECTED] To: Trevor Joerges [EMAIL PROTECTED]; perl-win32-users@listserv.ActiveState.com Sent: Sunday, April 16, 2006 11:40 PM Subject: RE: Quick Q Actually ... If I'm looking just for a list of directories, I pass /ad and /b to my dir command. Bill -Original Message- From: Trevor Joerges [mailto:[EMAIL PROTECTED] Sent: Friday, April 14, 2006 4:40 PM To: Ng, Bill; perl-win32-users@listserv.ActiveState.com Subject: Re: Quick Q --- open (DIR, dir c:\\some\\directory |); while (DIR) { chomp $_; push (@subDirs, $_); } close DIR; --- Anyone got any clues for me. Not looking for code, just for the correct function or module. Thanks. Just use the file test -d operator within you opendir and maybe with a little Swartzsian Transform like: my $dir = 'C:/'; opendir(DIR, $dir) or die can't opendir $dir: $!; my @dirs = map { $_\n } # you probably won't need this. Just added so it prints better grep { -d $dir/$_ } # find directories only grep { !/^\./ } # omit those pesty . and .. directories on Windows readdir(DIR); closedir(DIR); print @dirs; Hth, --Trevor. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
stop a Windows application from within a Perl script
Hi all, I have a very simple script that pings the outside world and reboots a router when it gets no answer to the ping anymore; on top of that I need to stop and start again a windows application. I know how to start the app and I know how to stop it if it were unix - to stop the app, just kill the associated process ... How does one do this in Windows? Thanks a bunch, Dan __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
breaking out of a for/foreach loop...
ok.. i'm embarassed.. how does one break out of a for/foreach loop?? i thought it was exit/break... pointers? thanks -bruce ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: breaking out of a for/foreach loop...
last? bruce wrote: ok.. i'm embarassed.. how does one break out of a for/foreach loop?? i thought it was exit/break... pointers? thanks -bruce ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: stop a Windows application from within a Perl script
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Jablonsky Sent: April 17, 2006 8:00 PM To: perl-win32-users@listserv.ActiveState.com Subject: stop a Windows application from within a Perl script Hi all, I have a very simple script that pings the outside world and reboots a router when it gets no answer to the ping anymore; on top of that I need to stop and start again a windows application. I know how to start the app and I know how to stop it if it were unix - to stop the app, just kill the associated process ... How does one do this in Windows? If you start the application using Win32::Process you would just kill it using the pid (similar to unix) Win32::Process::KillProcess($pid) J. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Non-blocking IO?
Win sockets on Win32? not really, the only choice you have is IO::Select. :) John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Lyle Kopnicky Sent: Tuesday, April 18, 2006 12:22 AM To: Perl-Win32-Users@listserv.ActiveState.com Subject: Non-blocking IO? Hi folks, I'm using the HTTP::Daemon module. Is there any way to do non-blocking IO with that? Thanks. -- Lyle Kopnicky Software Project Engineer Veicon Technology, Inc. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Non-blocking IO?
Lyle Kopnicky wrote: Hi folks, I'm using the HTTP::Daemon module. Is there any way to do non-blocking IO with that? Thanks. Should work if it's inherited from IO::Handle : $sock-blocking(0) ... You could try (not sure if it works) : setsockopt $sock, IPPROTO_TCP, TCP_NODELAY, 1 or die setsockopt: $!; obj version might also work if the object is inherited from IO::Socket $sock-setsockopt(...) or die ... Another thing to try: use constant FIONBIO = 0x8004667E; my $tmp = pack 'L', 1; my $ret2 = $sock-ioctl(FIONBIO, $tmp) or die ioctl FIONBIO: $! ($^E); ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs