Re: Perl "expert" [Was: Re: Attentipn Please!! Need...]

2009-08-17 Thread Raymond Wan
Hi Steve, Steve Bertrand wrote: Raymond Wan wrote: I, myself, am as much an expert in Perl as Uri is. Let's not look too deeply into my comments and extrapolate something that was never there... :-) My apologies... I read in too deeply. I've been entrenched with a lot lately, and it seems

Re: Perl "expert"

2009-08-17 Thread Raymond Wan
Hi all, Uri Guttman wrote: especially when he admitted he was weak in perl. the situation of the blind leading the blind can be very dangerous and i was trying to head that off in this case. i have seen it lead to very bad situations where the total newbie is suckered in to bad coding by someo

Re: Perl "expert"

2009-08-17 Thread Uri Guttman
> "RW" == Raymond Wan writes: RW> Forgive me in being harsh, but if your humble opinion reflects those RW> on this list, then I would be a bit surprise... I did not realize RW> that this Perl mailing list was made up of two classes: an exclusive RW> club of "experts" and everyone el

Re: Perl "expert" [Was: Re: Attentipn Please!! Need...]

2009-08-17 Thread Steve Bertrand
Raymond Wan wrote: > Steve Bertrand wrote: >> I don't know if we should argue with the 'teaching' techniques of those >> who have exemplary skills and long-term interest in the subject. >> >> imho, there are others here who are very, very qualified to light Uri up >> if he's "doing it wrong". > >

Re: Perl "expert" [Was: Re: Attentipn Please!! Need...]

2009-08-17 Thread Raymond Wan
Hi Steve, Steve Bertrand wrote: I don't know if we should argue with the 'teaching' techniques of those who have exemplary skills and long-term interest in the subject. imho, there are others here who are very, very qualified to light Uri up if he's "doing it wrong". My comments, which I s

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in the file(lLDIF format)

2009-08-17 Thread Steve Bertrand
Ian wrote: >>> Uri Guttman [...snip...] > As far as "top posting" ... it makes a lot of sense not to do that. > I will cultivate new posting habits on this list and propagate them to the > other lists I belong to. It will greatly improve their readability. ...and garner you some respect which wi

Re: Perl "expert" [Was: Re: Attentipn Please!! Need...]

2009-08-17 Thread Steve Bertrand
Raymond Wan wrote: > > Hi all, > > > Paul Johnson wrote: >> On Mon, Aug 17, 2009 at 04:09:34PM -0400, Uri Guttman wrote: "I" == Ian writes: >>> I> Unfortunately I'm not an expert. I just read a few books and >>> this list etc. >>> >>> a couple of things. it is good that you are offe

Re: Precedence, and the ||= op again...

2009-08-17 Thread Steve Bertrand
John W. Krahn wrote: > Steve Bertrand wrote: >> What I want to know, is if someone could place parens to help me better >> understand the precedence order in the last two lines. I know they are >> legal as they do work, but I don't know how the interpreter is >> interpreting them: >> $user_re

Perl "expert" [Was: Re: Attentipn Please!! Need...]

2009-08-17 Thread Raymond Wan
Hi all, Paul Johnson wrote: On Mon, Aug 17, 2009 at 04:09:34PM -0400, Uri Guttman wrote: "I" == Ian writes: I> Unfortunately I'm not an expert. I just read a few books and this list etc. a couple of things. it is good that you are offering to help but as you claim not to be an expert, i

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in the file(lLDIF format)

2009-08-17 Thread Ian
>>Uri Guttman Thank you for the code pointers Uri, It's much appreciated. >a couple of things. it is good that you are offering to help but as you >claim not to be an expert, it can hurt more than help. there are plenty >of experts on this list who can help and fixing up weak code offered >from b

Re: Precedence, and the ||= op again...

2009-08-17 Thread John W. Krahn
Steve Bertrand wrote: Hi all, Before chasing down and fixing an undef var earlier on in a trace path, I had the following code. I've finally gathered that fixing bugs and validating data upstream is far better than writing code to fix it later (of course, I had to write code to find out what was

Re: Precedence, and the ||= op again...

2009-08-17 Thread Steve Bertrand
Uri Guttman wrote: >> "SB" == Steve Bertrand writes: > > SB> $user_ref->{$username}{payment} += $payment ||= $payment; > SB> $user_ref->{$username}{amount} += $amount ||= $amount; > > assuming no entries in payment or amount, you don't need the ||= at > all. > perl does all s

Re: Precedence, and the ||= op again...

2009-08-17 Thread Uri Guttman
> "SB" == Steve Bertrand writes: SB> $user_ref->{$username}{payment} += $payment ||= $payment; SB> $user_ref->{$username}{amount} += $amount ||= $amount; assuming no entries in payment or amount, you don't need the ||= at all. += will work on an undef (or non-existing hash) val

Precedence, and the ||= op again...

2009-08-17 Thread Steve Bertrand
Hi all, Before chasing down and fixing an undef var earlier on in a trace path, I had the following code. I've finally gathered that fixing bugs and validating data upstream is far better than writing code to fix it later (of course, I had to write code to find out what was happening). The last t

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in the file(lLDIF format)

2009-08-17 Thread Steve Bertrand
Uri Guttman wrote: >> "I" == Ian writes: > > I> Unfortunately I'm not an expert. I just read a few books and this list > etc. > > a couple of things. it is good that you are offering to help but as you > claim not to be an expert, it can hurt more than help. there are plenty > of experts

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in the file(lLDIF format)

2009-08-17 Thread Paul Johnson
On Mon, Aug 17, 2009 at 04:09:34PM -0400, Uri Guttman wrote: > > "I" == Ian writes: > > I> Unfortunately I'm not an expert. I just read a few books and this list > etc. > > a couple of things. it is good that you are offering to help but as you > claim not to be an expert, it can hurt mo

Re: Consulting Advice (WAS: Need A Perl script to read the UIDs from two...)

2009-08-17 Thread Shawn H. Corey
Bob goolsby wrote: The Perl Beginners list is not a 'Scripts on Demand' service. If some one wishes to write code for practice, they certainly may. But you do not need to feel any obligation beyond pointing the direction to go to sort the problem; let them do their own home work. Alternatively

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in the file(lLDIF format)

2009-08-17 Thread Uri Guttman
> "I" == Ian writes: I> Unfortunately I'm not an expert. I just read a few books and this list etc. a couple of things. it is good that you are offering to help but as you claim not to be an expert, it can hurt more than help. there are plenty of experts on this list who can help and fixi

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in the file(lLDIF format)

2009-08-17 Thread Uri Guttman
> "I" == Ian writes: you asked for some code review earlier and here it is. I> use strict; use warnings ; I> my $inpf = 'student.txt'; I> my $uidf = 'uidf.txt'; I> open (DATA, $inpf) or die "Can't open file $inpf!\n"; don't use the DATA handle for your own files. DATA is the stan

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in the file(lLDIF format)

2009-08-17 Thread Bob goolsby
The Perl Beginners list is not a 'Scripts on Demand' service. If some one wishes to write code for practice, they certainly may. But you do not need to feel any obligation beyond pointing the direction to go to sort the problem; let them do their own home work. Alternatively, a good response is

Which blowfish? Can it run from lib in user's account?

2009-08-17 Thread Danjo Creations
My script is working fine one our dev server, but I've run into a problem with client server with missing modules. No root access, so I did upload 2 other missing modules into a 'lib' in the account, and they're fine. No such luck with Blowfish. my $cipher=Crypt::CBC->new( { cipher => '

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in the file(lLDIF format)

2009-08-17 Thread Ian
Replace this line : if ($line =~ /^dn:\s+uid=(s\d{2}-\d{1}-\d{1}-\d{1,3})/) { With this line.(It will work for both the s06-1-3-048 and the arup etc.) if ($line =~ /^dn:\s+uid=(s\d{2}-\d{1}-\d{1}-\d{1,3}|\w+)/ ) { Unfortunately I'm not an expert. I just read a few books and this list etc. At

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in th

2009-08-17 Thread Jenda Krynicky
From: Ian > This is how I would do it. > > To every one else, please feel free to critique my perl programming skills. > I'm a Mainframe Assembler programmer and still learning perl. Any critique > will just help to improve my skills. The script is fine, the fact that you wrote it for free for s

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in the file(lLDIF format)

2009-08-17 Thread Ian
This will do it. I don't exactly know what you mean by "neatly written" but your email may mangle the formatting of the program. Can't do anything about that. The results will be in uidf.txt. _ use strict; my $inpf = 'student.txt'; my $ui

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in the file(lLDIF format)

2009-08-17 Thread Ian
This is how I would do it. To every one else, please feel free to critique my perl programming skills. I'm a Mainframe Assembler programmer and still learning perl. Any critique will just help to improve my skills. use strict; > use Data::Dumper; > my $inpf = 'student.txt'; > open (DATA, $inpf) o

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in the file(lLDIF format)

2009-08-17 Thread Jarrod Henry
Read the DN's into a hash using a pattern, the UID being the key and the DN being the value. Then order the UID's via a sort. Then foreach over the sorted keys. Jarrod On Mon, Aug 17, 2009 at 10:11 AM, Jyotishmaan Ray wrote: > Dear All, > > I have to read the uid from this file for each studen

Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in the file(lLDIF format)

2009-08-17 Thread Jyotishmaan Ray
Dear All, I have to read the uid from this file for each student entry, which is itself a LDIF file, and extract it in another file, in a serial order. Can you provide me the simplest way to do it. Thanks, Jyotishmaan Ray Moderator Of Spirituality-Paradise Group http://yahoogroups.com/g

Re: delete 20 000 records in oracle from perl

2009-08-17 Thread Chas. Owens
On Mon, Aug 17, 2009 at 02:00, luke devon wrote: > Hi > > I wanted to delete some unwanted data in one of my oracle > database.20 000 of records are there. This is actually on production . > manually to delete  a record , it takes 2 mins of time. > > So now i decided to write a perl script to do th

AW: delete 20 000 records in oracle from perl

2009-08-17 Thread Thomas Bätzler
luke devon asked: > Since i have more binary data to be deleted in the requested query , i > have to use a external script/program to satisfy the deletion. So thats > why i wanted to know , how can we implement multi threading for the > situation. You said that CPU load is high when deleting the

Re: delete 20 000 records in oracle from perl

2009-08-17 Thread luke devon
Hi Since i have more binary data to be deleted in the requested query , i have to use a external script/program to satisfy the deletion. So thats why i wanted to know , how can we implement multi threading for the situation. Thanks Luke From: Raymond Wan