RE: Free Memory

2001-12-11 Thread Peter Guzis

Exactly how much memory is your program using?  How much memory does your
server have?  How are your scripts executed? (CGI, ASP, PerlIS, PerlEx, etc)


Peter Guzis
Web Administrator, Sr.
ENCAD, Inc.
email: [EMAIL PROTECTED]
www.encad.com 

-Original Message-
From: Mauricio Lairet P. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 11, 2001 2:59 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED];
[EMAIL PROTECTED]; Perl Web
Subject: Free Memory


Hi!

I have created a store that uses SQLserver to handle data and I see my perl
app is consuming too much memory. When you spend some time adding things to
the shoping cart, buying or administering the app the server starts to slow
down. Is it normal? Is there a way to free some memory using perl?

Thanks in advance,
Mauricio


If you wish to unsubscribe, send an e-mail to:
[EMAIL PROTECTED]

==^
This email was sent to: [EMAIL PROTECTED]

EASY UNSUBSCRIBE click here: http://topica.com/u/?bz8Qae.bAgGSx
Or send an email to: [EMAIL PROTECTED]

T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
==^
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl + win2k install problems

2001-12-11 Thread Dean Theophilou



Why do 
you need to install it from the command prompt? It's an MSI file. Go 
to http://www.activestate.com/Products/Download/Get.plex?id=ActivePerl
and 
download it again and then see what happens.

DeanTheophilou


  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of 
  Susan WolakSent: Tuesday, December 11, 2001 10:50 
  AMTo: [EMAIL PROTECTED]Subject: 
  Perl + win2k install problems
  Hello,
  
  Our server that was running on NT, had O'reilly's 
  website pro version 1.0 and extensions for Frontpage98 on ithas 
  crashed.
  
  Our I.S. Dept. put in new hard drive, installed 
  win2k, IIS and now I need to install a version of PERL so my scripts will work 
  (again).
  
  When I downloaded PERL before, I got it to 
  install without a problem on this older machine and also on another one 
  running win2k with Lotus Notes' Domino's web server.
  
  However - I am having problems getting PERL to 
  install now on this rebuilt harddrive. I downloaded PERL 5.6.1 and tried 
  installing it through the command window like it said below to 
do:
  
  
  The installation wizard can also be accessed 
  by opening the command window and entering: c:\directory where the install file is located msiexec.exe/i install fileBut I'm having problems getting it to work.  There was an error with the MSIEXEC file?Any help would be appreciated.Thanks,Susan WolakLongmont[EMAIL PROTECTED]


RE: Permission woes

2001-12-11 Thread Dean Theophilou



Hello:

 Read pp. 88-94 of Win32 Perl 
Scripting--The Administrator's Handbook, by Dave Roth.Also, Dave 
Roth's2nd edition of Win32 Perl Programming--The Standard Extensions is, 
in my opinion, an absolutely necessary reference for Perl on Win32 
platforms.

Be 
that as it may, I don't know why Win32::Perms did not work for you, but perhaps 
you should check that the printer pathname does not end with a backslash. 
If you attempt to reference a printer, and its pathname ends in a backslash, 
then it won't work.


Dean 
Theophilou


-Original Message-From: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]]On Behalf Of Mark 
VeinotSent: Tuesday, December 11, 2001 11:18 AMTo: 
[EMAIL PROTECTED]Subject: Permission 
woes

  I need a way of determining what groups and users 
  have what permissions on a local printer. I tried Win32::Perms, but the 
  listing comes back empty when I know it's not. Any help?
  
  -Put the cat out? I didn't know it was 
  burning!
  
  Mark VeinotNetwork AdministratorLinux 
  Certified Professional
  
  


refferal

2001-12-11 Thread Benjamin Eagle

I wanted to see if any one could hel-p me out...

I want to write a script that would find where a user came from (what
URL)

and if they came from a certain URL redirect them to another...

or if they came from another URL send them to another URL.

but it has to find where they came from can anyone help??

thankx
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: what is this variable/value anyway?

2001-12-11 Thread $Bill Luebkert

Edward G. Orton wrote:

 I dimly remember that there is a function in perl which will
 tell you if a variable is a scalar, array, or hash. I tried
 perldoc, and a number of other things, but can't for the life of
 me remember what it was, or where I used it before.
 
 Suggestions?


Perlfunc man page - function 'ref'

-- 
   ,-/-  __  _  _ $Bill Luebkert   ICQ=14439852
  (_/   /  )// //   DBE Collectibles   Mailto:[EMAIL PROTECTED]
   / ) /--  o // //  http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/__/_/_ Castle of Medieval Myth  Magic http://www.todbe.com/

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: what is this variable/value anyway?

2001-12-11 Thread Thiebaud Richard

Are you thinking of the ref operator, which returns the type
a reference points to?   

 -Original Message-
 From: Edward G. Orton [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, December 08, 2001 6:11 PM
 To: Perl-Win32-Users Mailing List
 Subject: what is this variable/value anyway?
 
 
 I dimly remember that there is a function in perl which will
 tell you if a variable is a scalar, array, or hash. I tried
 perldoc, and a number of other things, but can't for the life of
 me remember what it was, or where I used it before.
 
 Suggestions?
 
 ego
 Edward G. Orton, GWN Consultants Inc.
 Phone: 613-764-3186, Fax: 613-764-1721
 email: [EMAIL PROTECTED]
 
 ___
 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



want to make exe

2001-12-11 Thread thiyag
i have written perl scripts using perl/tk and perl wld someone suggest me how to make exeout of this code so that it can be used in machines which dosent have perl/tk module installed
thanks
regards
thiyag
Get Your Private, Free E-mail from Indiatimes at  http://email.indiatimes.comBuy Music, Video, CD-ROM, Audio-Books and Music Accessories from http://www.planetm.co.in


Net::AIM Help

2001-12-11 Thread A12

I'm trying to get a small Net::AIM script running...I'm snagging this
code from someone that says it works. When I run it, I get this error:

Can't call method add_handler without a package or object reference
at aim_message.pl line 5

1  use Net::AIM;
2  my $nick = motherofperlbot;
3  my $aim = new Net::AIM;
4  $aim-debug(1);
5  my $conn = $aim-newconn(Screenname   = 'motherofperlbot',
6  Password = 'motherofperl')
7  or die Can't connect to AIM server.\n;
8  $conn-add_handler('config',\on_config);
9  $aim-start;
10
11 sub on_config {
12 my ($self, $event) = @_;
13 my ($str) = $event-args;
14 $self-set_config($str);
15 $self-send_im($nick, 'testing...');
16 }

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: want to make exe

2001-12-11 Thread Edward G. Orton


- Original Message -
From: thiyag [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 11, 2001 10:39 PM
Subject: want to make exe


 i have written perl scripts using perl/tk and perl wld someone
suggest me how to make exeout of this code so that it can be
used in machines which dosent have perl/tk module installed


 thanks


 regards



Try PerlApp or Perl2exe

ego
Edward G. Orton, GWN Consultants Inc.
Phone: 613-764-3186, Fax: 613-764-1721
email: [EMAIL PROTECTED]

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: what is this variable/value anyway?

2001-12-11 Thread Edward G. Orton


- Original Message -
From: $Bill Luebkert [EMAIL PROTECTED]
To: Edward G. Orton [EMAIL PROTECTED]
Cc: Perl-Win32-Users Mailing List
[EMAIL PROTECTED]
Sent: Tuesday, December 11, 2001 10:44 PM
Subject: Re: what is this variable/value anyway?


 Edward G. Orton wrote:

  I dimly remember that there is a function in perl which will
  tell you if a variable is a scalar, array, or hash. I tried
  perldoc, and a number of other things, but can't for the
life of
  me remember what it was, or where I used it before.
 
  Suggestions?


 Perlfunc man page - function 'ref'

Yup, that's it. Thanks a bunch. I remembered it as refer or
reference, and couldn't find what I needed from perldoc.

ego
Edward G. Orton, GWN Consultants Inc.
Phone: 613-764-3186, Fax: 613-764-1721
email: [EMAIL PROTECTED]

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: what is this variable/value anyway?

2001-12-11 Thread Toby Stuart

ref() is the beast u require.


 Toby J Stuart
 Senior Web Developer
 Figtree Systems P/L
 http://www.figtreesys.com.au
 mailto:[EMAIL PROTECTED]

 -Original Message-
 From: Edward G. Orton [SMTP:[EMAIL PROTECTED]]
 Sent: Sunday, December 09, 2001 10:11 AM
 To:   Perl-Win32-Users Mailing List
 Subject:  what is this variable/value anyway?
 
 I dimly remember that there is a function in perl which will
 tell you if a variable is a scalar, array, or hash. I tried
 perldoc, and a number of other things, but can't for the life of
 me remember what it was, or where I used it before.
 
 Suggestions?
 
 ego
 Edward G. Orton, GWN Consultants Inc.
 Phone: 613-764-3186, Fax: 613-764-1721
 email: [EMAIL PROTECTED]
 
 ___
 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: want to make exe

2001-12-11 Thread Toby Stuart

www.indigostar.com


 -Original Message-
 From: thiyag [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, December 12, 2001 2:40 PM
 To:   [EMAIL PROTECTED]
 Subject:  want to make exe
 
 i have written perl scripts using perl/tk and perl wld someone suggest me
 how to make exeout of this code so that it can be used in machines which
 dosent have perl/tk module installed
 
 thanks
 
 regards
 
 thiyag
 
   _  
 
 Get Your Private, Free E-mail from Indiatimes at
 http://email.indiatimes.com
 Buy Music, Video, CD-ROM, Audio-Books and Music Accessories from
 http://www.planetm.co.in 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Text based menus on Win32 and *nix

2001-12-11 Thread Thiebaud Richard

Have you looked at pdcurses? http://pdcurses.sourceforge.net/



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, December 08, 2001 3:53 PM
 To: [EMAIL PROTECTED]
 Subject: Text based menus on Win32 and *nix
 
 
 
 Hello all,
 
 I am currently writing an app that needs to be highly 
 portable between Win32
 and all flavors of Unix.  I want to create a text based menu 
 system where
 the user would see stuff like this:
 
 Please select what you want to do:
 
  - 1) Delete the URL
   2) Modify the URL
   3) Keep the URL
 
  (All) So what's it going to be?
 
 I have looked at the possibility of running curses on Win32 
 and that looks
 completely nuts if not impossible.  I came across an article 
 on a Google
 search that says you can compile the curses library on Win32 
 using Cygwin
 but that sounds like it would be a hassle if I want to eventually use
 something like perl2exe and just have one downloadable binary 
 for multiple
 platforms.
 
 Some guy also wrote a promising looking app that creates an 
 abstraction
 layer independent of what platform you are on.  His page is at:
 
 http://www.catseye.mb.ca/perl/cabana.html
 
 The only thing is there are some dead links on his site and I 
 don't think it
 will give me cursor control like my example above needs to be 
 able to do.
 
 So!  Any ideas on what I can try / use that will give me the 
 functionality
 and portability I need between both environments?
 
 Thanks,
 
 John
 
 
 
 ___
 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



(no subject)

2001-12-11 Thread Jack Yang

I tried to upload a huge file through IE5.0.  Since the file is huge, IE5.0
will have connection time out error before the file even gets uploaded.  I
added a ReceiveTimeout key in the registry and set it to be 1 hour, but IE
still gets time out after 15 minutes.  The web server company told me they
had set the time out to be 1 hour on their side, I really don't know why I
still have the time out problem.  Does this have anything to do with the
proxy server that I connects to?

Thanks

Jack


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: Getting Perl to fill in requested data for a dos program

2001-12-11 Thread Nathan Thern

I used to use a product called Macro Scheduler
(http://www.mjtnet.com/). It uses a scripting language
that's no more complex than DOS's batch language.
Despite the name, what it really does is send
simulated key strokes and mouse commands to the
Windows OS (by that, I mean it does EXACTLY what you 
are looking for, as long as the DOS window is the 
selected window). If you don't register, there's a
15 second delay before a script begins (!@#$
shareware). I even wrote a perl script once to 
spit out Macro Scheduler scripts; don't ask me for it,
I can't find it.

I've been looking for something similar in Win32
based perl for years now. I don't think it's out
there.

This can be really powerful stuff. I once wrote a
script that sent a changing sequence of keystrokes
thousands of times to a CAD program and generated a
complex multi-layered electronic circuit. It would
have taken days by hand. Even so, I could have
written the script 10 times faster in perl than it
took me to do it in Macro Scheduler's hamstrung
language. Any of you gurus out there have an idea
how to implement something like this?

NT

--- [EMAIL PROTECTED] wrote:
 
 
 Hi,
 
 I'm trying to get perl to give input to a dos program.  Here's a description of
 what I want it to do:
 
 1. I want to have perl kick off a dos program that doesn't accept command line
 parameters.
 2. The Dos program, that perl will have started, will then prompt the user for
 input like Enter Name:
 3.  I want Perl to fill in what the program is asking for on the screen, and
 then send a carriage return.
 
 Any ideas?
 
 Thanks in advance,
 Jeff
 
 
 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users


__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: sorting sub

2001-12-11 Thread Carl Jolley

On Mon, 10 Dec 2001, James S. Martin wrote:

 Hello,

 I'm having problems with this subroutine I'm working.  What it is supposed to
 do is find the newest file (the date stamp from the file, collected in a
 different sub) from a list of files with the same name.  My logic is to go
 through the listing of files, and for each item in the array, compare it to
 every item in the array (using the second foreach).  If the name and
 architecture matches, then I want to compare the date strings, find which one
 is newer and remove the old ones out of the array instantly.  What I've
 realized is that splicing elements from the array does actually happen until
 the loop is over, so I'm looping through elements that I don't want to.  Can
 anyone fix my brain/logic?  Thanks,

 James



 sub find_newest {

 my (@patchlist)=@_;

 my $n=0;
 my $x=0;


 foreach $item(@patchlist) {


 #print $item\n;

   ($name1,$date1,$arch1,$file1)=split(/,/,$item);

  foreach $item2(@patchlist) {

 ($name2,$date2,$arch2,$file2)=split(/,/,$item2);

 if ( (($name1.$arch1) eq ($name2.$arch2))  ($date1  $date2)) {


  print $name1-$date1  $name2-$date2.\n;
  splice(@patchlist,$x,1);


 }

 elsif  ( ( ($name1.$arch1) eq ($name2.$arch2) )  ($date1  $date2)) {

 print $name2-$date2  $name1-$date1.\n;
 splice(@patchlist,$n,1);
 }

   $x++;

   }

   $n++;

 }



Note, there is not much value in comparing an item to itself so
you could add this line to your inner loop:

$x++, next if $x==$n;

Also since when the name.archs are equal you elininate an item unless
the dates are equal so you don't really need two separate if statements
to do that. You could just say:

if (name1.arch1 eq name2.arch2  $date1 != $date2) {

Of course if you eliminate the $n item then you don't need to compare
the rest of the items to it. Sigh...

But keep in mind that when you eliminate an entry by splicing it
out, you've altered the number of elements in @patchlist so incrementing
over the element won't work. I suggest you maintain a separate hash
of elements to eliminate like:

if ( (($name1.$arch1) eq ($name2.$arch2))  ($date2  $date1)) {
$cutlist{$x}) = 1;
}

then after the loops are done, copy elements from @patchlist unless there
is a corresponding %cutlist entry, e.g.

$x=0;
foreach $element (@patchlist) {
   push(@newlist,$element) unless $cutlist{$x};
   $x++;
}
@patchlist=@newlist;

As a substantal enhancement to the speed note that if
you compare element 2 to element 3 then there is not much
value in comparing element 3 to element 2. Especially if
one or both of them have been eliminated. I would recode the
two loops like:


OUTER:
for ($n=0;$n=$#patchlist-1;$n++) {
   next if $cutlist{$n};
   ($name1,$arch1,$date1,$file1)=split(/,/,$patchlist[$n]);
   for ($x=$n+1,$x=$#patchlist,$x++) {
   next if $cutlist{$x};
   ($name2,$arch2,$date2,$file2)=split(/,/,$patchlist[$x]);
   next unless $name1 eq $name2;
   next unless $arch1 eq $arch2;
   if ($date2  $date1) {
  $cutlist{$x}=1;
  next;
   }
   if ($date1  $date2) {
  $cutlist($n}=1;
  next OUTER;
   }
  }
}

$x=0;
foreach $element (@patchlist) {
   push(@newlist,$element) unless $cutlist{$x};
   $x++;
}
@patchlist=@newlist;


 [EMAIL PROTECTED] Carl Jolley
 All opinions are my own and not necessarily those of my employer 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users