Re: Howto Dynamically Combine Multiple Array in HoA

2005-05-03 Thread Wijaya Edward
Thanks so much, Xavi. - Original Message - From: Xavier Noria <[EMAIL PROTECTED]> Date: Wednesday, May 4, 2005 4:42 am Subject: Re: Howto Dynamically Combine Multiple Array in HoA > Is that what you wanted? Yes it works just as I wanted. This is my final subroutine using your suggestio

Re: opening a list of files to process error

2005-05-03 Thread John W. Krahn
S E wrote: Hello, Hello, I've been using the following snippet of code to create a list of files (received from external clients) to be processed, interrogate the files for the client's id, confirm the id against the database and then rename the files with using the client id in a unix environment.

Re: Search through two arrays for differences

2005-05-03 Thread John W. Krahn
david cateron wrote: Subject: Search through two arrays for differences This is explained in the FAQ: perldoc -q "How do I compute the difference of two arrays" I have put information in two arrays as follows: Element(0) - File Name Element(1) - Field Name Both arrays are set up this way. I'd

RE: Search through two arrays for differences

2005-05-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
david cateron wrote: > I have put information in two arrays as follows: > > Element(0) - File Name > Element(1) - Field Name > > Both arrays are set up this way. I'd like to search through both > arrays and if the File name is the same in both (there will be about > 10 different file names--file

Search through two arrays for differences

2005-05-03 Thread david cateron
I have put information in two arrays as follows: Element(0) - File Name Element(1) - Field Name Both arrays are set up this way. I'd like to search through both arrays and if the File name is the same in both (there will be about 10 different file names--file names in the first array should

Re: regular expression

2005-05-03 Thread John W. Krahn
Chris Devers wrote: On Tue, 3 May 2005, John W. Krahn wrote: On Tue, 3 May 2005, Greg Sheridan wrote: $dose_density =~ s/[A-Za-z\/ ]//g; The slash is not a "metacharacter". It has to be escaped because the substitution operator is using a slash as the delimiter. If you change the delimiter to a

Re: passwords in perl: crypt() vs mds5_hex()

2005-05-03 Thread JupiterHost.Net
if(crypt($mypass, $crypted_original_pass) eq $crypted_original_pass) { ... vs. use Digest::MD5 qw(md5_hex); ... if(md5_hex($mypass) eq $md5_hex_of_original_pass) { ... If you use short/easy to guess passwords, such as words found in a dictionary, then the hash you use is irrelevant. If you use g

Re: passwords in perl: crypt() vs mds5_hex()

2005-05-03 Thread John W. Krahn
JupiterHost.Net wrote: Hello list, Hello, I'm working on a script that manages passwords in a database. Does anyone see any benefits/downfalls [in]securities of using crypt() vs. an MD5 sum via Digest::MD5? Like so: if(crypt($mypass, $crypted_original_pass) eq $crypted_original_pass) { ... vs. us

Re: populating a hash with % used as the key and F string as the value

2005-05-03 Thread DBSMITH
John, I am a lotus user so my top-down reply is default ...sorry. I think all looks good, but I have to ask why are you initializing an array to hold values of a hash with keys? This could be written the long way (but now to be read topdown): my @keys=keys %lookup;

Cannot get CPAN module working - cannot install

2005-05-03 Thread Chris Charley
Hope someone may know how to fix this, :-) (The cpan run is pasted in below) cpan> force install List::PowerSet Running install for module List::PowerSet Running make for N/NI/NIKC/List-PowerSet-0.01.tar.gz Checksum for \.cpan\sources\authors\id\N\NI\NIKC\List-PowerSet-0.01.tar.gz ok List-PowerSe

passwords in perl: crypt() vs mds5_hex()

2005-05-03 Thread JupiterHost.Net
Hello list, I'm working on a script that manages passwords in a database. Does anyone see any benefits/downfalls [in]securities of using crypt() vs. an MD5 sum via Digest::MD5? Like so: if(crypt($mypass, $crypted_original_pass) eq $crypted_original_pass) { ... vs. use Digest::MD5 qw(md5_hex); ...

Re: regular expression

2005-05-03 Thread Chris Devers
On Tue, 3 May 2005, John W. Krahn wrote: > The slash is not a "metacharacter". It has to be escaped because the > substitution operator is using a slash as the delimiter. If you > change the delimiter to another character then it does not have to be > escaped. Sorry, I was taking "metachara

Re: help on stdin

2005-05-03 Thread John W. Krahn
Zuromski, Brian wrote: hi, Hello, I'm trying to write a short perl script that takes stdin as a command line option and executes it with the command I'm using in the script. I don't want the stdin to be visible when entering it in. Any assistance would be appreciated. perldoc -q "How do I a

Re: Howto Dynamically Combine Multiple Array in HoA

2005-05-03 Thread Xavier Noria
On May 3, 2005, at 13:39, Edward WIJAYA wrote: Hi, What I intend to do here is to append the corresponding array from all the possible combination of the keys in the given HoA. The number of hash maybe varying from HoA to HoA (>10 hashes/HoA). Size of array is fixed for each HoA. My question i

Re: regular expression

2005-05-03 Thread John W. Krahn
Chris Devers wrote: On Tue, 3 May 2005, Greg Sheridan wrote: $dose_density =~ s/[A-Za-z\/ ]//g; This is a substitution: s/// is the usual syntax for this. Substutions take a match between the first delimiters, and replace each instance of it with whatever is found in the second delimiters. There

help on stdin

2005-05-03 Thread Zuromski, Brian
hi, I'm trying to write a short perl script that takes stdin as a command line option and executes it with the command I'm using in the script. I don't want the stdin to be visible when entering it in. Any assistance would be appreciated. here is what I have so far... -

Re: regular expression

2005-05-03 Thread John W. Krahn
Greg Sheridan wrote: Hi everyone, Hello, I'm new to this list and I have a very basic question about regular expressions. Perl provides some documentation on regular expressions that should be installed on your hard drive. perldoc perlrequick perldoc perlretut perldoc perlre Also, documentation on

Re: regular expression

2005-05-03 Thread Chris Devers
On Tue, 3 May 2005, Greg Sheridan wrote: > $dose_density =~ s/[A-Za-z\/ ]//g; This is a substitution: s/// is the usual syntax for this. Substutions take a match between the first delimiters, and replace each instance of it with whatever is found in the second delimiters. Therefore, it matche

RE: regular expression

2005-05-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Greg Sheridan wrote: > Hi everyone, > > I'm new to this list and I have a very basic question about > regular expressions. > > I inherited a Perl script, and I'm trying to figure out what a > specific line does. > > Here's the line: > > $dose_density =~ s/[A-Za-z\/ ]//g; [] inidicates

regular expression

2005-05-03 Thread Greg Sheridan
Hi everyone, I'm new to this list and I have a very basic question about regular expressions. I inherited a Perl script, and I'm trying to figure out what a specific line does. Here's the line: $dose_density =~ s/[A-Za-z\/ ]//g; Any help would be greatly appreciated. Thanks, Greg

opening a list of files to process error

2005-05-03 Thread S E
Hello, I've been using the following snippet of code to create a list of files (received from external clients) to be processed, interrogate the files for the client's id, confirm the id against the database and then rename the files with using the client id in a unix environment. open(FILE_LI

Re: problem using regular expressions

2005-05-03 Thread Offer Kaye
On 5/3/05, Ing. Branislav Gerzo wrote: > > CD>my $address = '[EMAIL PROTECTED]'; > CD>my ( $domain = $address ) =~ m/@(.*)/; > > uff, I think you write this in hurry, this simply won't work. For completeness, you really should write what *will* work. Here's a correct version: my $add

Howto Dynamically Combine Multiple Array in HoA

2005-05-03 Thread Edward WIJAYA
Hi, What I intend to do here is to append the corresponding array from all the possible combination of the keys in the given HoA. The number of hash maybe varying from HoA to HoA (>10 hashes/HoA). Size of array is fixed for each HoA. My question is how can I construct a dynamic way to combine

Re: problem using regular expressions

2005-05-03 Thread Ing. Branislav Gerzo
Chris Devers [CD], on Tuesday, May 3, 2005 at 10:58 (-0400 (EDT)) thoughtfully wrote the following: >> I use BayesIt in The Bat, works well. CD> Is it written in Perl ? I don't think so :) CD> Part of the reason I suggested SpamAssassin -- aside from it being an CD> effective tool in its own rig

Re: problem using regular expressions

2005-05-03 Thread Chris Devers
On Tue, 3 May 2005, Ing. Branislav Gerzo wrote: > Chris Devers [CD], on Tuesday, May 3, 2005 at 10:16 (-0400 (EDT)) > typed: > > CD>my $address = '[EMAIL PROTECTED]'; > CD>my ( $domain = $address ) =~ m/@(.*)/; > > uff, I think you write this in hurry, this simply won't work. Sorry, ye

Re: propagated error reporting

2005-05-03 Thread Wiggins d'Anconia
Peter Rabbitson wrote: > Hello everyone, > My question is - is this too simple to be true? I suspect this is probably > not thread-safe (not that I know much about threads anyway), but are there > any other obvious shortcommings that I am missing? Maybe there is a well > developed framework to

Re: problem using regular expressions

2005-05-03 Thread Ing. Branislav Gerzo
Chris Devers [CD], on Tuesday, May 3, 2005 at 10:16 (-0400 (EDT)) typed: CD>my $address = '[EMAIL PROTECTED]'; CD>my ( $domain = $address ) =~ m/@(.*)/; uff, I think you write this in hurry, this simply won't work. You have already declared $address so it will make exception, and also wi

Re: convert image sizes

2005-05-03 Thread JupiterHost.Net
ImageMagick is good, but it's huge, and a little overcomplicated. Imager is smaller and simpler. If you're just starting out with image manipulation in Perl, you might

Re: problem using regular expressions

2005-05-03 Thread Chris Devers
On Tue, 3 May 2005, gavin mc auley wrote: > I am new to perl and regular expressions. I am trying to write a > simple spam filter. There's your first mistake! :-) This is a slippery slope. Your simple filter isn't going to be as effective as you want, so you'll want to tweak it. The second d

Re: problem using regular expressions

2005-05-03 Thread Ing. Branislav Gerzo
gavin mc auley [gma], on Tuesday, May 03, 2005 at 15:03 (+0100) has on mind: gma> is [EMAIL PROTECTED], I want to extract hotmail.com. This is here is 2 ways how to do that: (my $domain = '[EMAIL PROTECTED]') =~ s/[EMAIL PROTECTED]@//; or my $domain = $1 if '[EMAIL PROTECTED]' =~ /@(.*)/; there

problem using regular expressions

2005-05-03 Thread gavin mc auley
I am new to perl and regular expressions. I am trying to write a simple spam filter. for part of this program I want to extract all characters after the @ character. i.e. if the email is [EMAIL PROTECTED], I want to extract hotmail.com. This is probably a simple task but I am having a problem ac

Re: convert image sizes

2005-05-03 Thread Chris Devers
On Tue, 3 May 2005, Ing. Branislav Gerzo wrote: > Brent Clark [BC], on Tuesday, May 03, 2005 at 13:25 (+0200) wrote > these comments: > > BC> would anyone know of a perl script to convert image resolutions. > BC> But I have a whole host of pics to convert > > look at ImageMagick http://www.image

Re: convert image sizes

2005-05-03 Thread Ing. Branislav Gerzo
Brent Clark [BC], on Tuesday, May 03, 2005 at 13:25 (+0200) wrote these comments: BC> would anyone know of a perl script to convert image resolutions. BC> But I have a whole host of pics to convert look at ImageMagick http://www.imagemagick.org/script/index.php you could convert then from bash, a

convert image sizes

2005-05-03 Thread Brent Clark
Hi would anyone know of a perl script to convert image resolutions. But I have a whole host of pics to convert Kind Regards Brent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: expensive loops

2005-05-03 Thread John W. Krahn
Chris Knipe wrote: Hi, Hello, open (LOG, '<'.LogFile); for (;;) { while () { # Do stuff here } } } This is unfortunately very expensive on my CPU. Are there any better ways to go about this??? tail comes to mind, but I'd prefer to do this all in perl. perldoc -q tail John -- use P