Re: AW: Count the number of elements in an array
Johannes Gamperl wrote: > what about $#filelist ... :-) .. which is usually going to be off by one. Unless you have mucked about with the special variable $[ {and I sincerely hope you haven't}, $#filelist will be one more than the quantity scalar @filelist . David -- David Cassell, OAO Corp. [EMAIL PROTECTED] Senior computing specialist mathematical statistician ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Win32::API -- keybd_event
I've got a script that uses Win32::API to send an Esc key command to the application with the focus. Because API.pm is not included in the standard release of ActivePerl, I'd rather not have to use it. Is there another way to accomplish this? The goal is to automatically release a message box from a running application. mike rafala rafala m at cadmus com ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: mkdir Error question - Continued
I've read through the persec on taint I am lost as to where the taint checking is coming from. I am not using the -T switch within the script itself. The code I included with my last email is the complete code. Is there a place in the perl config files themselves where the taint checking might be turned on? If so, how can I get rid of it. I have 2 servers. One running IIS4 and the other running IIS5 and this only happens on the IIS5 server. Both running the same version of ActiveState Perl. I don't get this error on the IIS4 server. The docs say this: "Perl automatically enables a set of special security checks, called taint mode, when it detects its program running with differing real and effective user or group IDs. The setuid bit in Unix permissions is mode 04000, the setgid bit mode 02000; either or both may be set." Wouldn't this be ignored on Win2000 server? The above reads as if it applies to Unix only. Or am I just way off here? Troy -Original Message- From: Ron Grabowski [mailto:[EMAIL PROTECTED]] Sent: Friday, February 02, 2001 4:01 PM To: Troy Sniff Cc: Perl-Win32-Users Subject: Re: mkdir Error question - Continued > Insecure dependency in mkdir while running with -T switch at > d:\internet\root\www\domain\cgi-bin\test.pl line 777. A search for "taint" on www.perl.com lead me to this: http://www.perl.com/pub/doc/manual/html/pod/perlsec.html which is also included with every installtion of Perl as perldoc perlsec - Ron ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: mkdir Error question
Troy Sniff wrote: > Cna someone tell me what exactly this message means... > > "Insecure dependency in mkdir while running with -T switch" > > My mkdir command is normal such as: > > mkdir ("d:\path\to\dir", 0755); Always look up errors in the perldiag manpage. Here's yours. Insecure dependency in %s (F) You tried to do something that the tainting mechanism didn't like. The tainting mechanism is turned on when you're running setuid or setgid, or when you specify -T to turn it on explicitly. The tainting mechanism labels all data that's derived directly or indirectly from the user, who is considered to be unworthy of your trust. If any such data is used in a ``dangerous'' operation, you get this error. See the perlsec manpage for more information. I'll speculate that your path is being supplied via a variable which has not yet been 'untainted'. See the perlsec manpage to see how to do this. [Basically, just convince Perl you're not letting the user work in any place you don't want them to.] David -- David Cassell, OAO Corp. [EMAIL PROTECTED] Senior computing specialist mathematical statistician ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: undefing Ole object without closing the application ?
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 31, 2001 6:12 PM > To: [EMAIL PROTECTED] > Subject: RE: undefing Ole object without closing the application > ? > > Test if Excel is already running, and if not start it. Since you are > connecting to > an active application, Excel won't close when perl exits. > > use Win32::OLE; > > # Test if Excel is already running > eval {$Excel = Win32::OLE->GetActiveObject('Excel.Application')}; > die "Excel not installed" if $@; > if (defined $Excel) { > print "Excel Running\n"; > } else { > system('start Excel'); > # Give Excel time to start, -- you can use a while loop or > something to > # be a little more robust. > sleep(5); > eval {$Excel = > Win32::OLE->GetActiveObject('Excel.Application')}; > print "Excel Started and Running\n" if defined $Excel; > } > > Similar to what I thought and got in private mail. Another possibilty > (Ramon, Mike: Thanks again!) is supplying an empty destructor at the > object creation time, although I id not yet have the time to test it > unfortunately; I'll report afterwards, particulary I'm wondering if > the memory used by the ole object is returned afterwards, during other > tests a couple of times after killing perl during a debug session that > memory remained allocated even if perl and excel were not running > anymore (this is nt4ws). > > > BTW, there is an autofit method to automatically resize the column > Columns("A:B")->EntireColumn->AutoFit(); > > Very nice, don't know why I didn't catch it with object browser. > Thanks > Heiko > > -- > -- PREVINET S.p.A.[EMAIL PROTECTED] > -- Via Ferretto, 1 ph x39-041-5907073 > -- I-31021 Mogliano V.to (TV) fax x39-041-5907087 > -- ITALY > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Version Number of Package
Title: RE: Version Number of Package ppm query DBI -Original Message- From: Purcell, Scott [mailto:[EMAIL PROTECTED]] Sent: January 31, 2001 02:06 PM To: '[EMAIL PROTECTED]' Subject: Version Number of Package How does one get the version of a installed package? EG. If I want to know which version of the DBI I have, what do I do? Thanks, Scott Purcell ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Count the number of elements in an array
$element_cnt = @filelist; If I understand you correctly, the syntax above will return the number of elements of the filelist array. Dan. Daniel Abner Configuration Manager Winfire,Inc. Voice: (949) 567-5248 Fax:(949) 724-4839 [EMAIL PROTECTED] www.winfire.com -Original Message- From: Gamperl Johannes [mailto:[EMAIL PROTECTED]] Sent: Friday, February 02, 2001 6:46 AM To: '[EMAIL PROTECTED]' Subject: AW: Count the number of elements in an array what about $#filelist ... :-) -Ursprüngliche Nachricht- Von: Plunkett, Matt [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 2. Februar 2001 15:43 An: 'MOTTER, JEFFREY D. (SBMS)'; Perl-Win32-Users Betreff: RE: Count the number of elements in an array $length = @filelist; -Original Message- From: MOTTER, JEFFREY D. (SBMS) [SMTP:[EMAIL PROTECTED]] Sent: Friday, February 02, 2001 9:39 AM To: Perl-Win32-Users Subject:Count the number of elements in an array How do I count the number of elements in an array? Example: @filelist=`dir c:\\tmp\\*.doc`; I trying to get a count of files, with a certain pattern, from a directory. Thanks Jeff ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: button images
Like so...? use Tk; $mw=tkinit; $mw->Button( -image=> $mw->Photo(-file=> Tk->findINC('Camel.xpm')) )->pack; MainLoop; Jack > -Original Message- > From: Marcus [mailto:[EMAIL PROTECTED]] > Sent: February 1, 2001 2:05 PM > To: [EMAIL PROTECTED] > Subject: PTk: button images > > > > I could use some help settings background images for buttons with > Perl/Tk. The image attribute only works for me with the built in > bitmaps, like so: > -bitmap => '@' . Tk->findINC('demos/images/noletters'), > > How do I get the following image though? > > -image =>'d:/ptk/Camel.xpm', > > > I also tried this, but I don't think it's correct, is it. > > $button_26->Photo(-file =>("d:/ptk/Picture8.ppm")); > > > Thanks for any help, > > Marcus Friedlaender > > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: undefing Ole object without closing the application ?
Ok, an empty destructor does seem to work perfectly: eval {$excel = Win32::OLE->GetActiveObject('Excel.Application')}; die "Excel not installed" if $@; unless (defined $excel) { $excel = Win32::OLE->new('Excel.Application','') or die "Oops, cannot start Excel"; } and doesn't seem to create problems, at least I have not been able to produce memory leaks killing perl or excel or both with ole objects of 60+MB hanging around. Thanks guys! Heiko -- -- PREVINET S.p.A.[EMAIL PROTECTED] -- Via Ferretto, 1 ph x39-041-5907073 -- I-31021 Mogliano V.to (TV) fax x39-041-5907087 -- ITALY ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: Count the number of elements in an array
> @filelist=`dir c:\\tmp\\*.doc`; Remember that backticks return information as a scalar. So doing this @filelist = `dir /w c:\\`; would break your logic. > I trying to get a count of files, with a certain > pattern, from a directory. Philip's suggestion of using glob() grep() is the right way to go about this. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: mkdir Error question - Continued
> Insecure dependency in mkdir while running with -T switch at > d:\internet\root\www\domain\cgi-bin\test.pl line 777. A search for "taint" on www.perl.com lead me to this: http://www.perl.com/pub/doc/manual/html/pod/perlsec.html which is also included with every installtion of Perl as perldoc perlsec - Ron ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: mkdir Error question - Continued
Just for further info, the server is running IIS 5.0 and Perl Version 5.006. Troy ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
AW: Count the number of elements in an array
Title: RE: Count the number of elements in an array what about $#filelist ... :-) -Ursprüngliche Nachricht-Von: Plunkett, Matt [mailto:[EMAIL PROTECTED]]Gesendet: Freitag, 2. Februar 2001 15:43An: 'MOTTER, JEFFREY D. (SBMS)'; Perl-Win32-UsersBetreff: RE: Count the number of elements in an array $length = @filelist; -Original Message- From: MOTTER, JEFFREY D. (SBMS) [SMTP:[EMAIL PROTECTED]] Sent: Friday, February 02, 2001 9:39 AM To: Perl-Win32-Users Subject: Count the number of elements in an array How do I count the number of elements in an array? Example: @filelist=`dir c:\\tmp\\*.doc`; I trying to get a count of files, with a certain pattern, from a directory. Thanks Jeff ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: Mail::Sender
Title: Re: Mail::Sender Hello, I would like to pass this by you all and perhaps someone out there has also experienced this. When I send an e-mail with Mail::Sender, sometimes the repepiant receives an e-mail and at other times they do not??? I have been looking at the code and find nothing wrong with it, I am sure I am missing something. Here's the code: EMBLOCK: { my ($ra_success) = shift; my ($ra_failure) = shift; my ($ra_fdl) = shift; my $debug; my $fname0 = "c:/Perl/Remote/haulierlog.txt"; my $logdate; $emailerr1=0; $emailerr2=0; my $sender = new Mail::Sender { from => '[EMAIL PROTECTED]', smtp => '194.129.120.69'} or $emailerr1=1; if ($emailerr1 == 1) { open(LFILE, ">>$fname0"); $logdate = getlogdate(); print LFILE "$logdate Error($sender) : $Mail::Sender::Error\n"; close(LFILE); last EMBLOCK; } $sender->Open({to => '[EMAIL PROTECTED], [EMAIL PROTECTED]', subject => 'Email Notification on Haulier Run'}); $sender->SendLine("Morning,"); $sender->SendLine; $sender->Send(<<'*END*'); Overall Success / Failure Haulier Log = *END* $logdate = getlogdate(); $sender->SendLine("File generated as of $logdate"); $sender->SendLine; $sender->Send(<<'*END*'); Successfull Hauliers *END* my $c = 1; for (my $ii = 0; $ii < $c; $ii++) { $sender->SendLine("$ra_success->[$ii]\n"); last if substr($ra_success->[$ii], 0, 1) ne 'H'; } $sender->SendLine; $sender->Send(<<'*END*'); Failed Hauliers === *END* for (my $ii = 0; $ii < $c; $ii++) { $sender->SendLine("$ra_failure->[$ii]\n"); last if substr($ra_failure->[$ii], 0, 1) ne 'H'; } $sender->SendLine; $sender->Send(<<'*END*'); Hauliers with a file date > run date *END* for (my $ii = 0; $ii < $c; $ii++) { $sender->SendLine("$ra_fdl->[$ii]\n"); last if substr($ra_fdl->[$ii], 0, 1) ne 'H'; } $sender->SendLine; $sender->Close() or $emailerr2=1; if ($emailerr2 == 1) { open(LFILE, ">>$fname0"); $logdate = getlogdate(); print LFILE "$logdate Error : Could not send e-mail.\n"; close(LFILE); print("Error : Could not send e-mail.\n") if $debug; last EMBLOCK; } else { open(LFILE, ">>$fname0"); $logdate = getlogdate(); print LFILE "$logdate Email : Sent Successfully.\n"; close(LFILE); print("Email : Sent Successfully.\n") if $debug; } print("End of mail module\n") if $debug; } # end EMBLOCK Many thanks, Jonathan
Blank browser
Well, I "solved" the problem by regressing the server to good old build 5.19. I didn't need any new stuff anyway. I've been using the 5xx builds intensively for two years, and only recently switched to the 6xx series... and I'm regretting it now. Browsing the bug reports, it looks like it's been a rough ride. I submitted the bug, it looks like it's related to a long series of bugs which have been allegedly fixed several times. Beware. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Win32::ChangeNotify not working on NT
HI, try useing my $path = 'C:\Timothymarsch\SHARE'; instead of, my $path = "C:Timothymarsch\\SHARE"; is \\ I dont know if there are different versions, or if it matters but mine says the variable name is $WatchSubTree not $subtree eg. $notify = Win32::ChangeNotify->new($Path,$WatchSubTree,$Events); john > -Original Message- > From: David Prowak [SMTP:[EMAIL PROTECTED]] > Sent: Tuesday, 30 January 2001 5:07 > To: [EMAIL PROTECTED] > Subject: Win32::ChangeNotify not working on NT > > Hi, > I have a simple program using Win32::ChangeNotify that > works on my Win98 machine but does not work on the > same > machine when booted as a Win NT Server. > > The error message indicates a problem with the $path. > If I change the $path to "C:" under Win NT, it runs, > but acts "funny". By "funny" I mean that it does not > stop the monitoring when I place a file in "C:". > (No error message is displayed, is just says > "monitorDir.pl die on line 14".) > Meanwhile, once again, on a Win98 machine, everything > works. Help!!! What the heck is wrong? > > use strict; > use Win32::ChangeNotify; > # Look for any changes in the watched Dir. > # Changes include renames, deletions and creations. > my $filter = "FILE_NAME"; > > my ($notify); > my $path = "C:Timothymarsch\\SHARE"; > > my $subTree = 1; > my $retValue;# return value > > $notify = Win32::ChangeNotify->new($path, $subTree, > $filter) || die $!; > $retValue = $notify -> wait or die "Something failed: > $!\n"; > > if ($retValue == 1) { > print "hip, hip horaay!\n"; > } else { > print STDERR "$notify\n"; > } > > TIA, > Dave > > > > > > __ > Do You Yahoo!? > Yahoo! Auctions - Buy the things you want at great prices. > http://auctions.yahoo.com/ > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > > ## Disclaimer If this e-mail has been sent to you in error, please notify Océ-Australia Limited immediately and delete this e-mail from your system. Any views expressed in this e-mail are those of the individual sender and may not necessarily reflect the views of Océ-Australia Limited. ## ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: Titlebar color, Window icons
This is a system-wide setting in Control Panel|Display on the Appearance tab. > > From: Marcus [mailto:[EMAIL PROTECTED]] > > > > 1) Is it possible to change the colour of the title bar on Win32 from > > the standard blue? > > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
mod_perl SSI issue
(This was resent already, but when it didn't appear, and a test posting did, I decided to try again. All apologies if anyone has seen this (email me direct if you did)) Hello all, I have successfully used the exec type of Server Side Include but as I had rebuilt my server with mod_perl, I thought to test using the
RE: Disk Space and Free Space
Very Cool script. -Original Message- From: $Bill Luebkert [mailto:[EMAIL PROTECTED]] Sent: Friday, February 02, 2001 6:26 PM To: Asif Kaleem Cc: [EMAIL PROTECTED] Subject: Re: Disk Space and Free Space Asif Kaleem wrote: > > Hello Community: > > Is there a way to find out how big the hard drive is and > how much free space is available using Perl on Win32 platform? One way using API module: use strict; use Win32::API; my $v = 0; # set to 1 for verbose sub DRIVE_UNKNOWN { 0; }# The drive type cannot be determined. sub DRIVE_NO_ROOT_DIR { 1; }# The root directory does not exist. sub DRIVE_REMOVABLE { 2; } # The drive can be removed from the drive. sub DRIVE_FIXED { 3; } # The disk cannot be removed from the drive. sub DRIVE_REMOTE { 4; } # The drive is a remote (network) drive. sub DRIVE_CDROM { 5; } # The drive is a CD-ROM drive. sub DRIVE_RAMDISK { 6; }# The drive is a RAM disk. my $GetDriveType = new Win32::API("kernel32", "GetDriveType", ['P'], 'N') or die Win32::FormatMessage(Win32::GetLastError()); my $GetDiskFreeSpace = new Win32::API("kernel32", "GetDiskFreeSpace", ['P','P','P','P','P'], 'N') or die Win32::FormatMessage(Win32::GetLastError()); foreach ('A'..'Z') { my $Drive = "$_:\\"; my $ret = $GetDriveType->Call($Drive) or die "GetDriveType: ", Win32::FormatMessage(Win32::GetLastError()); if ($ret == DRIVE_CDROM) { print "$_:CD-ROM\n"; next; } next if ($ret == DRIVE_UNKNOWN); next if ($ret == DRIVE_NO_ROOT_DIR); if ($ret == DRIVE_REMOVABLE) { print "$_:Removeable\n"; next; } $Drive = "$_:\\\0"; my $SecsPerCluster = pack ("I", 0); my $BytesPerSec = pack ("I", 0); my $FreeClusters = pack ("I", 0); my $TotClusters = pack ("I", 0); $ret = $GetDiskFreeSpace->Call($Drive, $SecsPerCluster, $BytesPerSec, $FreeClusters, $TotClusters) or print "GetDiskFreeSpace $_: ", Win32::FormatMessage(Win32::GetLastError()); my $SPC = unpack ("I", $SecsPerCluster); my $BPS = unpack ("I", $BytesPerSec); my $FC = unpack ("I", $FreeClusters); my $TC = unpack ("I", $TotClusters); if ($ret) { printf "%-2.2s %9.3f\n\tSecsPerCluster=%u\n\tBytesPerSec=%u\n", $Drive, $SPC * $BPS * $FC / (1024 * 1024), $SPC, $BPS if $v; printf "\tFreeClusters=%u\n\tTotClusters=%u\n", $FC, $TC if $v; printf "%-2.2s %9.3f MB\n", $Drive, $SPC * $BPS * $FC / (1024 * 1024); } } __END__ -- ,-/- __ _ _ $Bill Luebkert ICQ=14439852 (_/ / )// // DBE Collectibles http://www.todbe.com/ / ) /--< o // // Mailto:[EMAIL PROTECTED] http://dbecoll.webjump.com/ -/-' /___/_<_http://www.freeyellow.com/members/dbecoll/ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: Disk Space and Free Space
Asif Kaleem wrote: > > Hello Community: > > Is there a way to find out how big the hard drive is and > how much free space is available using Perl on Win32 platform? One way using API module: use strict; use Win32::API; my $v = 0; # set to 1 for verbose sub DRIVE_UNKNOWN { 0; }# The drive type cannot be determined. sub DRIVE_NO_ROOT_DIR { 1; }# The root directory does not exist. sub DRIVE_REMOVABLE { 2; } # The drive can be removed from the drive. sub DRIVE_FIXED { 3; } # The disk cannot be removed from the drive. sub DRIVE_REMOTE { 4; } # The drive is a remote (network) drive. sub DRIVE_CDROM { 5; } # The drive is a CD-ROM drive. sub DRIVE_RAMDISK { 6; }# The drive is a RAM disk. my $GetDriveType = new Win32::API("kernel32", "GetDriveType", ['P'], 'N') or die Win32::FormatMessage(Win32::GetLastError()); my $GetDiskFreeSpace = new Win32::API("kernel32", "GetDiskFreeSpace", ['P','P','P','P','P'], 'N') or die Win32::FormatMessage(Win32::GetLastError()); foreach ('A'..'Z') { my $Drive = "$_:\\"; my $ret = $GetDriveType->Call($Drive) or die "GetDriveType: ", Win32::FormatMessage(Win32::GetLastError()); if ($ret == DRIVE_CDROM) { print "$_:CD-ROM\n"; next; } next if ($ret == DRIVE_UNKNOWN); next if ($ret == DRIVE_NO_ROOT_DIR); if ($ret == DRIVE_REMOVABLE) { print "$_:Removeable\n"; next; } $Drive = "$_:\\\0"; my $SecsPerCluster = pack ("I", 0); my $BytesPerSec = pack ("I", 0); my $FreeClusters = pack ("I", 0); my $TotClusters = pack ("I", 0); $ret = $GetDiskFreeSpace->Call($Drive, $SecsPerCluster, $BytesPerSec, $FreeClusters, $TotClusters) or print "GetDiskFreeSpace $_: ", Win32::FormatMessage(Win32::GetLastError()); my $SPC = unpack ("I", $SecsPerCluster); my $BPS = unpack ("I", $BytesPerSec); my $FC = unpack ("I", $FreeClusters); my $TC = unpack ("I", $TotClusters); if ($ret) { printf "%-2.2s %9.3f\n\tSecsPerCluster=%u\n\tBytesPerSec=%u\n", $Drive, $SPC * $BPS * $FC / (1024 * 1024), $SPC, $BPS if $v; printf "\tFreeClusters=%u\n\tTotClusters=%u\n", $FC, $TC if $v; printf "%-2.2s %9.3f MB\n", $Drive, $SPC * $BPS * $FC / (1024 * 1024); } } __END__ -- ,-/- __ _ _ $Bill Luebkert ICQ=14439852 (_/ / )// // DBE Collectibles http://www.todbe.com/ / ) /--< o // // Mailto:[EMAIL PROTECTED] http://dbecoll.webjump.com/ -/-' /___/_<_http://www.freeyellow.com/members/dbecoll/ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
How to install the source perl on win2k?
Hello, I have get the latest perl source (AP623_source.zip) from http://www.activestate.com/download/ActivePerl/src/5.6/AP623_source.zip I have VC6.0 installed and have modified the Makefile to INST_DRV= c: INST_TOP= \perl but I failed to nmake first I got message that cannot find some .pm.pm file, so I copy all the .pm files to .pm.pm files(more that 200), but then I also got fatal error say some io failure. I wonder if anyone has succeeded compiling it. --http://www.eyou.com --Îȶ¨¿É¿¿µÄÃâ·Ñµç×ÓÐÅÏä ÓïÒôÓʼþ Òƶ¯ÊéÇ© ÈÕÀú·þÎñ ÍøÂç´æ´¢...ÒÚÓÊδ¾¡ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Disk Space and Free Space
Hello Community: Is there a way to find out how big the hard drive is and how much free space is available using Perl on Win32 platform? Thanks = Thanks a Mil-¥en, --Asif Kaleem __ Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: mkdir Error question - Continued
Here is the script I am using: - &ReadParse; $0=~m#^(.*)\\#; $dir = "$1/$in{id}"; mkdir ($dir); print "Content-type: text/html\n\n"; print "\n"; print "$dirDone\n"; exit; sub ReadParse { my ($pair, @pairs, $buffer); @pairs = split(/&/, $ENV{'QUERY_STRING'}); foreach $pair (@pairs) { my ($name, $value) = split(/=/, $pair, 2); $value =~ s/\+/ /g; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $in{$name} = $value; } } This results in the error message: -- CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: Insecure dependency in mkdir while running with -T switch at d:\internet\root\www\domain\cgi-bin\test.pl line 777. I've found that it has to do with the $in{id}. When I call the script as: test.pl?id=test I will get the error. However, if I hard code $in{id}='test'; the error will not occur and everything works fine. Any ideas as to what the ReadParse may be doing to cause this error? Troy -Original Message- From: $Bill Luebkert [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 01, 2001 4:55 PM To: Troy Sniff Cc: Perl-Win32-Users Subject: Re: mkdir Error question Troy Sniff wrote: > > Can someone tell me what exactly this message means... > > "Insecure dependency in mkdir while running with -T switch" > > My mkdir command is normal such as: > > mkdir ("d:\path\to\dir", 0755); 1) Are you sure that there is no vrbl involved? 2) You need to either escape your \'s, change them to /'s or use '' instead of "". 3) You should check for errors on the call by adding ' or ...'. -- ,-/- __ _ _ $Bill Luebkert ICQ=14439852 (_/ / )// // DBE Collectibles http://www.todbe.com/ / ) /--< o // // Mailto:[EMAIL PROTECTED] http://dbecoll.webjump.com/ -/-' /___/_<_http://www.freeyellow.com/members/dbecoll/ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Titlebar color, Window icons
1) I don't' know if there is any way to change the color of the title bar. 2) There is a small amount of control over the right hand corner buttons. The 'overridedirect' function will remove them completely (like a splash screen), and the 'transient' function will remove the minimize and maximize buttons and leave you with a small close button (like a dialog box). wantor > -Original Message- > From: Marcus [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 02, 2001 8:25 AM > To: [EMAIL PROTECTED] > Subject: Tk: Titlebar color, Window icons > > > > The designer doing a GUI for me made a few changes to the standard > Windows look and created a few challenges for me, so a few more Tk > questions. > > 1) Is it possible to change the colour of the title bar on Win32 from > the standard blue? > > $top->title("framed test"); > > Only takes text doesn't it. > > 2) Also, can you change the look of the standard Windows "Maximize", > Minimize" and "Close" icons in the top right hand corner? > > Thanks again, > > Marcus Friedlaender > > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users