Re: A little off topic.

2001-08-08 Thread Rex Arul
Please visit http://www.activestate.com . They have PerlApp and PerlCOM tools as part of the Perl Development Kit. With PerlApp you can generate free running EXEs and with PerlCOM you can create DLLs which can be invoked by any VB/VBScript/JScript code. - Original Message - From: "Mich

Re: problem in knowing session variables .

2001-10-03 Thread Rex Arul
Rahul -- The Server sets the ASPSessionID if you have enabled the Session state for your web server. To access the collection of session variables and the corresponding values, you might need to write some code as follows: foreach $key (in $Session->Contents){ $Response->Write(qq{ Session Var

Re: index of an array element

2001-10-03 Thread Rex Arul
Will this be sufficient? my($array) = ['a=1', 'b=2', 'c=3', 'd=4']; my($str) = 'd=43'; my($index) = indexOf($array,$str); print ("Index of $str in the array is = $index"); sub indexOf{ my($arr) = shift; my($val) = shift; for(my $i=0; $i < @{$arr}; $i++){ return($i) if($arr->[$i] eq $val);

Re: index of an array element

2001-10-03 Thread Rex Arul
But that would work only for key=value type of situations. If @list = (2,'a',100,'cat') then you cannot rely on Hashes because order cannot be preserved. At such instances, you might need to code a custom function as shown in my previous mail. Right? -- Rex - Original Message - From:

Re: encrypt, decrypt module suggestions

2001-10-03 Thread Rex Arul
Use Crypt::RC4 module, to encrypt and decrypt values. It uses the RC4 Symmetric encryption which is fairly robust. It depends on a symmetric key which you will use for encryption as well as decryption. You can download the latest Crypt::RC4 module through PPM. (Activestate Perl). http://aspn.act

Re: Compression

2001-10-05 Thread Rex Arul
Try Archive::Zip (to zip it into Zip format) or Compress:Zlib (GZip or deflate/inflate compression schemes). They are available from http://www.activestate.com and please use your PPM to download the same. - Original Message - From: "Zhe Hong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>

Re: Interact with microsoft Excel

2001-10-22 Thread Rex Arul
You can take a look at this beautiful article: http://www-106.ibm.com/developerworks/library/l-pexcel/ -- Rex S. Arul - Original Message - From: "Kelvin Ng Chee Hoong" <[EMAIL PROTECTED]> To: "nafiseh saberi" <[EMAIL PROTECTED]> Cc: "perl_beginners" <[EMAIL PROTECTED]> Sent: Monday, Oct

Maintaining Order of Keys in a Hash

2001-10-22 Thread Rex Arul
Hello Friends, Without resorting to any additional lists/arrays, how can I maintain the order of the keys in a hash? Is there a "package/module" that would redress this issue? I would like to access data, the same order I added to the hash in the first instance. Thanks, Rex -- To unsubscrib

Re: Maintaining Order of Keys in a Hash

2001-10-23 Thread Rex Arul
oth are not going to lose their already sorted order from the database. Please shed some ideas as to how this is would be construed as mismodelling. Thanks in advance, --Rex - Original Message - From: "Peter Scott" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "R

Re: undef function

2001-10-23 Thread Rex Arul
$val=undef; #undef is more like a value here. undef ($objRS); #undef is more of a function here undef(%hash); #and here too -- Rex - Original Message - From: <[EMAIL PROTECTED]> To: "nafiseh saberi" <[EMAIL PROTECTED]> Cc: "perl" <[EMAIL PROT

Re: no luck pie charts and perl

2001-10-25 Thread Rex Arul
If you declare the pragma, "use strictl" then you should declare all variables as my: my($im, $red, $blue); - Original Message - From: "tom poe" <[EMAIL PROTECTED]> To: "zentara" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, October 25, 2001 7:10 PM Subject: Re: no luck pie c

Re: Stupid question...

2001-10-26 Thread Rex Arul
Daniel, If your OS is Windows, then try the Perl Development Kit of Activestate Corp, which enables you to produce EXEs, DLLs, etc http://www.activestate.com - Original Message - From: "Daniel Falkenberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 26, 2001 8:28 P

Re: Stupid question...

2001-10-26 Thread Rex Arul
Daniel, If your OS is Windows, then try the Perl Development Kit of Activestate Corp, which enables you to produce EXEs, DLLs, etc http://www.activestate.com - Original Message - From: "Daniel Falkenberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 26, 2001 8:28 P

Re: Stupid question...

2001-10-26 Thread Rex Arul
Daniel, If your OS is Windows, then try the Perl Development Kit of Activestate Corp, which enables you to produce EXEs, DLLs, etc http://www.activestate.com - Original Message - From: "Daniel Falkenberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 26, 2001 8:28 P

Re: Stupid question...

2001-10-26 Thread Rex Arul
Daniel, If your OS is Windows, then try the Perl Development Kit of Activestate Corp, which enables you to produce EXEs, DLLs, etc http://www.activestate.com - Original Message - From: "Daniel Falkenberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 26, 2001 8:28 P

Re: Stupid question...

2001-10-26 Thread Rex Arul
Daniel, If your OS is Windows, then try the Perl Development Kit of Activestate Corp, which enables you to produce EXEs, DLLs, etc http://www.activestate.com - Original Message - From: "Daniel Falkenberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 26, 2001 8:28 P

Spam

2001-10-26 Thread Rex Arul
Dear Friends, My email server has gone crazy, as it is keeping on sending an email that I had sent just once! I am very sorry for a spam that is happening without my knowledge and control. Sorry, Rex - Original Message - From: "Rex Arul" <[EMAIL PROTECTED]> To: &q

Re: sort

2001-10-29 Thread Rex Arul
$a and $b are built-in variables used for 'comparison criteria' during the sort process. The statement you have posited means that the contents of @files be sorted alphabetically. The sorting criterion is spelled by $a cmp $b statement. What this does is to return a 0 if both the candidates are a

Re: newbie : how to find the latest file in a directory

2001-10-29 Thread Rex Arul
Stefan, The 'Schwartzian Transform' usually is a good approach for such cases. It is not very difficult as it seems to be (Thanks to http://5sigma.com of Joseph Hall). Please follow the comments and it should be pretty straightforward: Cheers, Rex #!/usr/bin/perl use strict; my(@listOfFiles) =

Persisting Values Across Method Calls

2001-10-29 Thread Rex Arul
Friends, How can I persist values across method calls, without using Global Variables? IS there kind of "static" variables and if so can any of you provide a simple code example to prove the point? Thanks in advance, Rex -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: Activ state Perl Dev Kit

2001-11-09 Thread Rex Arul
Yes, I do. I have created many EXEs and DLLs using Perl Dev Kit. However, for some standalone exes, it was kludgy. But most other times, it was fine. The other problem with building freestanding EXEs using PDK is the large size of the EXE, which on the average amounts to 1.6-1.8 MB for a simple Pe

Re: calling Win32 API???

2001-11-09 Thread Rex Arul
I am sorry for not being clear. The main API you need to interface with Win32API is the Win32 Module. To deal with Windows Registry, you have to use Win32::TieRegistry module. To deal with Windows Services, you have to use Win32::Service module. If you want to perform Windows NT network admini

Re: Duplicates in 2D Array

2001-11-09 Thread Rex Arul
Andrea, Even if you do have commified strings, it should still work. Right? ### use strict; my(@array, @unique, %seen); $array[0] = ["apples","oranges","plums", "Arul, Rex", "Holstein, Andrea", "Clinton,Bill"]; $array[1] = ["asparagus", "corn","peas"]; $array[2] =

To Objects or Not is the Question

2001-11-10 Thread Rex Arul
Dear Friends, I was just going through Object Oriented Programming in Perl by Damian Conway in the bookstore yesterday. In the introductory pages, Damian had noted that empirically it is noticed that subroutines invoked in Objects are 20-50% sluggish than normally written Perl subroutines. Of cou

Re: sub-routine help needed.

2001-11-16 Thread Rex Arul
Or even just putting "$count" as the last statement should do the trick as that is the last scalar assignment in a subroutine that automatically gets returned. -- Rex - Original Message - From: "Jos I. Boumans" <[EMAIL PROTECTED]> To: "MerryChristmas!" <[EMAIL PROTECTED]>; <[EMAIL PROTE

Re: get current dir

2001-11-16 Thread Rex Arul
Quick Reply: If you are in Windows OS, this would work: perl -e "use Win32; print Win32::GetCwd();" - Original Message - From: "Pradeep Sethi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 16, 2001 8:23 PM Subject: get current dir > what is the function in perl

Re: get current dir

2001-11-16 Thread Rex Arul
This is what I get. Is there a function Cwd? C:\WINDOWS>perldoc -f Cwd No documentation for perl function `Cwd' found - Original Message - From: "Michael Fowler" <[EMAIL PROTECTED]> To: "Pradeep Sethi" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, November 16, 2001 8:34 PM

Re: problem in the #/usr/local/bin line

2001-11-17 Thread Rex Arul
1) The shebang line of #!usr/local/bin/perl has nothing to do with your woes. 2) If you had installed ActiveState Perl, it would have automatically installed the PerlScript plugins and other ISAPI filters that you might need to code your ASP Pages in Perl. 3) If you want to run your Perl Scripts

Re: problem in the #/usr/local/bin line

2001-11-17 Thread Rex Arul
Windows Does not care for the shebang line. Personal Web Server / IIS 4.0 / IIS 5.0 / Standalone Perl Scripts in Windows -- They all don't care what the shebang line is. They just ignore it. The only place that I know the shebang line does matter in Windows is that if you use APACHE Server to se

Re: Win32::OLE, or maybe POP3Client Module??

2002-01-23 Thread Rex Arul
Try Mail::POP3Client module, available from the PPM Repository of Activestate. - Rex - Original Message - From: "Chris Zampese" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 23, 2002 10:49 PM Subject: Win32::OLE, or maybe POP3Client Module?? > Hello everyone! >

Re: sending email - Mail::Sender and Mail::Sendmail

2002-01-25 Thread Rex Arul
> Well I'm just wondering if there is much difference between Sender and > Sendmail: > I guess, the simplicity of sending mail attachments is laudable with Mail::Sender, whereas you have to work out a bit more in Mail::Sendmail to make attachments work! The same reason behooves well for sending