Search in LDAP using Perl

2009-08-06 Thread Alpesh Naik
Hello Friends, I m working on Net::LDAP module in perl to manage ldap database, but i dont know how can i get all the uid's and names of the groups, i have try the Search function of Net::LDAP but still not able to get it, if u have any idea about it please help!! Regards, Alpesh Na

Re: iterating over a hash to print it

2009-08-06 Thread Nick Brown
Sorry for the late reply. I actually switched to using: use Finance::OFX::Parse::Simple; http://search.cpan.org/dist/Finance-OFX-Parse-Simple/lib/Finance/OFX/Parse/Simple.pm and this does appear to parse the data. my $ofx_parser = Finance::OFX::Parse::Simple->new; my $ofx_data = $ofx_

Re: Convert Array's into hashes

2009-08-06 Thread Bryan Harris
> How can I recall only certain keys and their corresponding values of hashes > ex : if D_103 then print " D_103 value is 2" > ex :if D_101 then print "D_101 value is 0" You may be looking for this: print "$_ value is $mycoolhash{$_}\n" if exists($mycoolhash{$_}); or more classically: if (

RE: Automating the resetting of Power Options

2009-08-06 Thread Wagner, David --- Senior Programmer Analyst --- CFS
> -Original Message- > From: Kevin Safford [mailto:saffo...@uk.ibm.com] > Sent: Monday, August 03, 2009 04:37 > To: beginners@perl.org > Subject: Re: Automating the resetting of Power Options > > "Wagner, David --- Senior Programmer Analyst --- CFS" wrote: > > So does anyone have a Perl s

Re: Comma operator

2009-08-06 Thread John W. Krahn
Bryan R Harris wrote: A question about the comma operator: (John and Chas deserve a rest from my questions, if they want it =). The binary comma operator in scalar context supposedly "evaluates its left argument, throws that value away, then evaluates its right argument and returns that value

Re: Comma operator

2009-08-06 Thread Chas. Owens
On Thu, Aug 6, 2009 at 12:10, Bryan R Harris wrote: > > > A question about the comma operator: > > (John and Chas deserve a rest from my questions, if they want it  =). > > The binary comma operator in scalar context supposedly "evaluates its left > argument, throws that value away, then evaluates

Re: two questions

2009-08-06 Thread Bryan R Harris
> On Thu, Aug 6, 2009 at 11:54, Bryan R Harris > wrote: > snip >> Now that's just impressive. >> >> For some reason the back of my brain thinks if I knew perl as well as you >> two seem to I could easily make all the money I wanted.  Just between you >> and me =), is that true?? >> >> Thanks for

Re: two questions

2009-08-06 Thread Chas. Owens
On Thu, Aug 6, 2009 at 11:54, Bryan R Harris wrote: snip > Now that's just impressive. > > For some reason the back of my brain thinks if I knew perl as well as you > two seem to I could easily make all the money I wanted.  Just between you > and me =), is that true?? > > Thanks for the responses,

Comma operator

2009-08-06 Thread Bryan R Harris
A question about the comma operator: (John and Chas deserve a rest from my questions, if they want it =). The binary comma operator in scalar context supposedly "evaluates its left argument, throws that value away, then evaluates its right argument and returns that value." So this: $_ = "d

Re: two questions

2009-08-06 Thread Uri Guttman
> "BRH" == Bryan R Harris writes: BRH> For some reason the back of my brain thinks if I knew perl as BRH> well as you two seem to I could easily make all the money I BRH> wanted. Just between you and me =), is that true?? it would be true if you were very good in any language, not jus

Re: two questions

2009-08-06 Thread Bryan R Harris
> On Thu, Aug 6, 2009 at 11:15, Bryan R Harris > wrote: >> According to the FAQ you want to do it like this: s/^\s+//, s/\s+$// for $var; >> >> >> I can't find documentation of this notation anywhere, i.e. the comma between >> statements with a trailing for. >> >> John, where d

Re: Convert Array's into hashes

2009-08-06 Thread jet speed
On Thu, Aug 6, 2009 at 11:49 AM, Telemachus wrote: > On Thu Aug 06 2009 @ 11:19, jet speed wrote: > > @array1 = ( D_101 D_102 D_103 D_104); > > @array2 = (0 1 2 3); > > > > > > How can i convert both of these arrays into %hash, assigining the > > @array1 as keys and @array2 as values. > >use

Re: FW: two questions

2009-08-06 Thread John W. Krahn
Bryan R Harris wrote: According to the FAQ you want to do it like this: s/^\s+//, s/\s+$// for $var; I can't find documentation of this notation anywhere, i.e. the comma between statements with a trailing for. John, where do you find all this cool stuff? This is just something you pick u

Re: FW: two questions

2009-08-06 Thread Chas. Owens
On Thu, Aug 6, 2009 at 11:15, Bryan R Harris wrote: > >>> According to the FAQ you want to do it like this: >>> >>> s/^\s+//, s/\s+$// for $var; > > > I can't find documentation of this notation anywhere, i.e. the comma between > statements with a trailing for. > > John, where do you find all this

Re: better readline?

2009-08-06 Thread Chas. Owens
On Thu, Aug 6, 2009 at 11:14, Bryan R Harris wrote: snip > I've read everything I can find on it, but can't find documentation of the > main feature I'm interested in, i.e. pre-loading the buffer with text.  It > works, I just don't see it documented. snip I didn't see it in the docs either, I jus

FW: two questions

2009-08-06 Thread Bryan R Harris
>> According to the FAQ you want to do it like this: >> >> s/^\s+//, s/\s+$// for $var; I can't find documentation of this notation anywhere, i.e. the comma between statements with a trailing for. John, where do you find all this cool stuff? - Bryan -- To unsubscribe, e-mail: beginner

Re: better readline?

2009-08-06 Thread Bryan R Harris
> On Wed, Aug 5, 2009 at 14:52, Bryan R Harris > wrote: > snip >> I didn't change anything, actually -- it never printed the "8/2 Updated >> database" string.  It prompted with the "Enter a date and note:", I typed >> "Uh." and that was it.  Maybe my version of perl doesn't have a good >> Term::Re

Re: Convert Array's into hashes

2009-08-06 Thread Telemachus
On Thu Aug 06 2009 @ 11:19, jet speed wrote: > @array1 = ( D_101 D_102 D_103 D_104); > @array2 = (0 1 2 3); > > > How can i convert both of these arrays into %hash, assigining the > @array1 as keys and @array2 as values. use warnings; use strict; my @array1 = qw/D_101 D_102 D_103 D_

Re: Convert Array's into hashes

2009-08-06 Thread John W. Krahn
jet speed wrote: Hi, Hello, I have a query on converting arrays into hash.Please could you help me resolve the below. I have 2 arrays as bleow. @array1 = ( D_101 D_102 D_103 D_104); @array2 = (0 1 2 3); How can i convert both of these arrays into %hash, assigining the @array1 as keys and

Re: two questions

2009-08-06 Thread Telemachus
On Thu Aug 06 2009 @ 2:29, sys adm wrote: > I do hate to write s/^\s+|\s+$//g for each and each time,just got tired of it. > So I hope perl can have that a string operator, since many script languages > have that, and it's used universally. Write the subroutine once, and then you won't have to d

Convert Array's into hashes

2009-08-06 Thread jet speed
Hi, I have a query on converting arrays into hash.Please could you help me resolve the below. I have 2 arrays as bleow. @array1 = ( D_101 D_102 D_103 D_104); @array2 = (0 1 2 3); How can i convert both of these arrays into %hash, assigining the @array1 as keys and @array2 as values. How can I

Re: two questions

2009-08-06 Thread sys adm
I have missed a '$' in the original post. I do hate to write s/^\s+|\s+$//g for each and each time,just got tired of it. So I hope perl can have that a string operator, since many script languages have that, and it's used universally. Thanks. --- jwkr...@shaw.ca wrote: From: "John W. Krahn" To