Re: Still pondering working with hashs

2010-05-04 Thread Philip Potter
On 3 May 2010 22:06, Harry Putnam wrote: > Philip Potter writes: > > [...] > > Both you and Uri are right to a degree.  I have to respect Uris' > experience, but in fact I have presented goals at every step in this > thread.  Uri just doesn't want to recognize them. > > 1) how to find what files

Re: Teaching Perl

2010-05-04 Thread Shlomi Fish
On Monday 03 May 2010 19:39:35 Samuel Williams wrote: > Dear Shlomi, > > Are you able to write a version that uses a function called "doors"? > I've already written two versions which I've posted to the list in a different post (and which I, and other people, can testify for their quality). The

Directory sizes

2010-05-04 Thread HACKER Nora
Hi list, Maybe someone can help me with this, I have two strange directory size calculating issues: I do a my ( $rc2, $backupsizetrans ) = rexec( $backuphost, 'du -k ' . "$backupdir\/$backdir2"

RE: Still pondering working with hashs

2010-05-04 Thread Bob McConnell
From: Uri Guttman >> "HP" == Harry Putnam writes: > > HP> "Uri Guttman" writes: > >> nope. been doing this for 35 years and it is solid advice. you can't do > >> a proper program unless you have a proper goal which is what the > >> specification is. > > HP> Some of it looks suspi

Re: Still pondering working with hashs

2010-05-04 Thread Philip Potter
On 4 May 2010 13:45, Bob McConnell wrote: > From: Uri Guttman > >>> "HP" == Harry Putnam writes: >> >>   HP> "Uri Guttman" writes: >>   >> nope. been doing this for 35 years and it is solid advice. you > can't do >>   >> a proper program unless you have a proper goal which is what the >>   >

Re: Still pondering working with hashs

2010-05-04 Thread Akhthar Parvez K
On Tuesday 04 May 2010, Philip Potter wrote: > On 3 May 2010 22:06, Harry Putnam wrote: > > That is the kind of `always true' thing one might say.  I forgot what > > the term is but it means its fairly meaningless and mainly sounds > > good. But none the less true. > > A tautology? No, it's not.

RE: Still pondering working with hashs

2010-05-04 Thread Bob McConnell
From: Philip Potter > On 4 May 2010 13:45, Bob McConnell wrote: >> From: Uri Guttman >> "HP" == Harry Putnam writes: >>> >>>   HP> "Uri Guttman" writes: >>>   >> nope. been doing this for 35 years and it is solid advice. you >> can't do >>>   >> a proper program unless you have a proper

Re: Still pondering working with hashs

2010-05-04 Thread Dr.Ruud
Harry Putnam wrote: Yes, files that exist on multiple paths, but there are also many matched names that are not actually the same file. Then use md5, or a similar tool. -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org

Re: Still pondering working with hashs

2010-05-04 Thread Dr.Ruud
Harry Putnam wrote: But could I have started there not a chance. So please engage some shred of common sense before routinely posting constant karping and even seriously wrong headed advice like this. You are very wrong here. Just put in a sentence what you really try to achieve. Not th

Re: Still pondering working with hashs

2010-05-04 Thread Harry Putnam
Philip Potter writes: > haven't explained *why* you are doing this comparison in this thread. > [You might have done elsewhere, but I don't read every thread.] Uri actually did (most of) it for me at one point in a recent post on this thread. Message-ID: <87mxwgbvyo@quad.sysarch.com> on

Re: about substr

2010-05-04 Thread Petr Šabata
On Sat, 28 Nov 2037 10:04:37 +0800, billy wrote: > when i user substr,i find "Tab" key is calculated as 1,but i want to set > it as 8,what will i do? thks. Tab doesn't mean a fixed space between the content before and after it on a line. If you want that, use spaces instead. -- Petr -- To un

Re: Still pondering working with hashs

2010-05-04 Thread Harry Putnam
"Bob McConnell" writes: > I would expect his short range goals to be adjusted as he learns what is > possible and what it takes to accomplish it. That does require some Thank you sir for a decent summary of how this has gone so far. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org F

Re: Still pondering working with hashs

2010-05-04 Thread Harry Putnam
Philip Potter writes: > You have to start with *some* goal. Even in agile, you start with > stories to work out in what direction you are headed. You formalise > your requirements into tests and then you start coding. Yes, you > revise your stories, requirements and tests as you learn more about

RE: beginners Digest 4 May 2010 07:42:13 -0000 Issue 3941

2010-05-04 Thread FRASER, KAREN R.
How do I unsubscribe from this? I've sent at least three emails to beginners-digest-unsubscr...@perl.org following the instructions in "Administrivia: To subscribe to the digest, e-mail: To unsubscribe from the digest, e-mail: To post to the list, e-mail: " -Ori

Re: Still pondering working with hashs

2010-05-04 Thread Philip Potter
On 4 May 2010 15:19, Harry Putnam wrote: > Philip Potter writes: >> haven't explained *why* you are doing this comparison in this thread. >> [You might have done elsewhere, but I don't read every thread.] > Uri actually did (most of) it for me at one point in a recent post on > this thread.  Mess

Re: beginners Digest 4 May 2010 07:42:13 -0000 Issue 3941

2010-05-04 Thread Jeff Pang
2010/5/4 FRASER, KAREN R. : > How do I unsubscribe from this? > I've sent at least three emails to beginners-digest-unsubscr...@perl.org > following the instructions in > If you want to quit from this list (perl beginners) you should write a message to: beginners-unsubscr...@perl.org HTH. -- T

how to denote the like symbol % in perl program

2010-05-04 Thread Pam Wampler
How do you add the % sign in a perl program, if you are doing an oracle query in the program? Example select date, name from my_table where name like upper(?)% The question mark would allow the user to enter the name - and I need to append the % sign so that oracle will know to do a like

Re: how to denote the like symbol % in perl program

2010-05-04 Thread Steve Bertrand
On 2010.05.04 11:21, Pam Wampler wrote: > How do you add the % sign in a perl program, if you are doing an oracle > query in the program? > > Example select date, name from my_table where name like upper(?)% > > > > The question mark would allow the user to enter the name - and I need to

RE: how to denote the like symbol % in perl program

2010-05-04 Thread Pam Wampler
Here's the code -- I'm just learning perl so any help is greatly appreciated It will work if I have the user input something like pam% with the percent sign...but I really just want the user to have to enter pam and have the program append the %percent sign #!/usr/bin/perl -w use DBI; pr

Re: how to denote the like symbol % in perl program

2010-05-04 Thread Steve Bertrand
On 2010.05.04 12:11, Pam Wampler wrote: > Here's the code -- I'm just learning perl so any help is greatly > appreciated > > It will work if I have the user input something like pam% with the > percent sign...but I really just want the user to have to enter pam and > have the program append the %p

RE: how to denote the like symbol % in perl program

2010-05-04 Thread Pam Wampler
That worked Thank you so very much...I have been beating my head against the wall on this one. Thanks for helping while I am trying to learn perl!!! Have a great day! Pam -Original Message- From: Steve Bertrand [mailto:st...@ipv6canada.com] Sent: Tuesday, May 04, 2010 12:19 PM

Perl LWP::Simple

2010-05-04 Thread Tony Esposito
Cheers! New to LWP and downloading file/copying file from Web to local box.  Had a go at it and failed horribly...  On Solaris 10 with Perl 5.10. #!/usr/bin/perl -w use strict; use LWP::Simple qw($ua get); my $webpage ="https://www.mywebpage.com/Documents.zip";; $ua->timeout(20); my $content = ge

Re: Perl LWP::Simple

2010-05-04 Thread Shawn H Corey
Tony Esposito wrote: Cheers! New to LWP and downloading file/copying file from Web to local box. Had a go at it and failed horribly... On Solaris 10 with Perl 5.10. #!/usr/bin/perl -w use strict; use LWP::Simple qw($ua get); my $webpage ="https://www.mywebpage.com/Documents.zip";; $ua->timeou

Re: Perl LWP::Simple

2010-05-04 Thread Tony Esposito
Bravo!  I am in ... but I need to traverse many links over multiple pages to get to the one that points to the file I want to download.  Would follow_link() be the answer? Cheers!! From: Shawn H Corey To: Tony Esposito Cc: Beginners Perl Sent: Tue, 4 May,

Re: Still pondering working with hashs

2010-05-04 Thread Dermot
On 3 May 2010 19:47, Dr.Ruud wrote: > Harry Putnam wrote: > >> Yes, files that exist on multiple paths, but there are also >> many matched names that are not actually the same file. > > Then use md5, or a similar tool. Seconded. If you want to find duplicate files you will need to use MD5 or a S

Re: Perl LWP::Simple

2010-05-04 Thread C.DeRykus
On May 4, 9:46 am, tony1234567...@yahoo.co.uk (Tony Esposito) wrote: > Cheers! > > New to LWP and downloading file/copying file from Web to local box.  Had a go > at it and failed horribly...  On Solaris 10 with Perl 5.10. > #!/usr/bin/perl -w > use strict; > use LWP::Simple qw($ua get); > my $web

Array, foreach problem

2010-05-04 Thread Paul Fontenot
Hi, I'm stuck on using an array to determine the out come of a foreach loop. The script is below. #!/usr/bin/perl # @conditions = ("NET", "eth"); $hostname = (`/bin/hostname`); $logfil

Re: Array, foreach problem

2010-05-04 Thread Jim Gibson
On 5/4/10 Tue May 4, 2010 4:52 PM, "Paul Fontenot" scribbled: > Hi, > > I'm stuck on using an array to determine the out come of a foreach loop. > The script is below. > -- > -- > #!/usr/bin

Re: Array, foreach problem

2010-05-04 Thread Shawn H Corey
Jim Gibson wrote: You need to reset LOGFILE to the beginning for subsequent iterations over the @conditions array. As written, the nested foreach will never be executed except for the first condition. Add the indicated seek call. The actual command is seek. See `perldoc -f seek` or http://per

Re: Array, foreach problem

2010-05-04 Thread Paul Fontenot
Thank you very much On 5/4/2010 6:12 PM, Shawn H Corey wrote: Jim Gibson wrote: You need to reset LOGFILE to the beginning for subsequent iterations over the @conditions array. As written, the nested foreach will never be executed except for the first condition. Add the indicated seek call.

Re: Perl LWP::Simple

2010-05-04 Thread Shawn H Corey
Tony Esposito wrote: Bravo! I am in ... but I need to traverse many links over multiple pages to get to the one that points to the file I want to download. Would follow_link() be the answer? Yes, but it's up to you to figure out how to navigate them. :) -- Just my 0.0002 million dolla

Re: Array, foreach problem

2010-05-04 Thread Uri Guttman
> "JG" == Jim Gibson writes: JG> On 5/4/10 Tue May 4, 2010 4:52 PM, "Paul Fontenot" JG> scribbled: JG> You need to reset LOGFILE to the beginning for subsequent JG> iterations over the @conditions array. As written, the nested JG> foreach will never be executed except for the fi

Re: Still pondering working with hashs

2010-05-04 Thread Harry Putnam
"Dr.Ruud" writes: > Harry Putnam wrote: > >> But could I have started there not a chance. So please engage >> some shred of common sense before routinely posting constant karping >> and even seriously wrong headed advice like this. > > You are very wrong here. Just put in a sentence what yo

Re: about dispatch tables

2010-05-04 Thread Harry Putnam
A mock up of dispatch table. No dispatching done here... only a test of passing values. What am running into here? one sub function called (dispt('hello',@ar); ) containing a dispatch table. A third sub function is called in the dispatch table ( N(@_); ) but the variables don't survive to be use

Re: about dispatch tables

2010-05-04 Thread Uri Guttman
> "HP" == Harry Putnam writes: HP> A third sub function is called in the dispatch table ( N(@_); ) but HP> the variables don't survive to be use there. there are no variables to survive in a sub, just passed arguments in @_ HP> The output from the script below: HP> Shows 6 elements

WG: Directory sizes

2010-05-04 Thread HACKER Nora
Hi, > my ( $rc2, $backupsizetrans ) = > rexec( > $backuphost, > 'du -k ' >. "$backupdir\/$backdir2" >. ' |tail -1 |awk \'{ print $1 }\'' > ); > > to get t

AW: Directory sizes

2010-05-04 Thread Thomas Bätzler
HACKER Nora asked: > Unfortunately, this does not explain the difference between the local > du and the one via rexec on a remote machine. Any help appreciated. When you're getting different results then you're doing something differently ;-) For one thing, you're using just "du" to call the bi