Re: Programming Contests...

2006-04-20 Thread Hugh Loebner
Well, I sponsor the Loebner Prize. You might check it out. There have been a number of talented programmers who have entered. HL On 4/20/06, bruce <[EMAIL PROTECTED]> wrote: > Hi.. > > Has anyone heard of compaines who hold programming contests as a way of > finding potential programming talent

Re: Re: breaking out of a for/foreach loop...

2006-04-18 Thread Hugh Loebner
() # statement after loop Hugh Loebner On 4/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Its "last" what you are looking for. This will break out of the inner-most > loop. Optionally, you can put a label at the start of your loop and exit it > by name, like:

Re: I am using **split** incorrectly?

2005-11-06 Thread Hugh Loebner
Initialize $j = 0 ; $textcomplete="Mary has a little lamb\nMary has a little lamb which is black!"; $i=0; @textinlines=split(/\n/,$textcomplete); foreach(@textinlines){ print "$i:$textinlines[$i]\n"; @textinchars=split(//,$textinlines[$i]); $j = 0 ; foreach(@textin

Re: How can split this data

2005-11-06 Thread Hugh Loebner
Assume $line has one line of data $line =~ /( .{28} )( .{27} )( .*$)/ ; $1 will have first 28 characters $2 will have next 27 character $3 will have the rest of the characters to end of line HL On 11/6/05, RIG <[EMAIL PROTECTED]> wrote: > Hi everybody: > > I need to split a line that contains

Re: Creating a grid control

2005-08-03 Thread Hugh Loebner
Try the following short program ;-) use strict ; use Tk ; my $mw = MainWindow -> new() ; my $logw = $mw -> Scrolled('ROText') -> pack ; my %cell ; for my $col (0 ..3){ for my $row (0 .. 5){ $cell{$col}{$row} = $logw -> Label( -text => "*$col $row*" ,

Re: Creating a grid control

2005-08-03 Thread Hugh Loebner
Sorry, the end was truncated. Here's the whole program #--- use strict ; use Tk ; my $mw = MainWindow -> new() ; my $logw = $mw -> Scrolled('ROText') -> pack ; my %cell ; for my $col (0 ..3){ for my $row (0 .. 5){ $cell{$col}{$row} = $logw -> Label( -text =>

Re: Need help with Perl GUI

2005-08-02 Thread Hugh Loebner
I meant to conclude with:: I usually use "grid" with a "Scrolled Pane" rather than the gibberish that Lidie and Walsh present for having one scrollbar with multiple widgets. pp 147-148.. On 8/2/05, Hugh Loebner <[EMAIL PROTECTED]> wrote: > What parts of Tk are you

Re: Need help with Perl GUI

2005-08-02 Thread Hugh Loebner
make some simple ideas unnecessarily complex. A few suggestions: I almost always use "form" rather than "pack" for positioning an object - it's much more powerful and, for me, more logical. "Grid" is also very useful for presenting tabular material. I us

Re: Change in "goto" behavior

2005-07-13 Thread Hugh Loebner
On 7/13/05, Michael Erskine <[EMAIL PROTECTED]> wrote: > On Wednesday 13 July 2005 13:30, Hugh Loebner wrote: > > Why on earth are you using a goto statement? They are pernicious. > > On the contrary, a goto is often most appropriate in expressing clear program > flow. > &

Re: Change in "goto" behavior

2005-07-13 Thread Hugh Loebner
I doubt this. Please provide an example. HLOn 7/13/05, Michael Erskine <[EMAIL PROTECTED]> wrote: On Wednesday 13 July 2005 13:30, Hugh Loebner wrote:> Why on earth are you using a goto statement? They are pernicious.On the contrary, a goto is often most appropriate in express

Re: Change in "goto" behavior

2005-07-13 Thread Hugh Loebner
Why on earth are you using a goto statement?  They are pernicious. HLOn 7/12/05, Dave Ressler <[EMAIL PROTECTED]> wrote: I have noticed a change in behavior in "goto" statements recently. Whereas a statement like "goto PLACE;" would work fine no matter where "PLACE:" was in my code, I've

Why is this a problem?

2005-07-01 Thread Hugh Loebner
    open  ( $fh{$fhkey}, ">$fhkey" )  ;    }                 foreach my $fhkey ( keys %fh ){     print { $fh{$fhkey} }  "xxx $fhkey xxx \n" ;    # note file handle $fh{$fhkey} has to be in a block    } ; foreach my $fhkey ( keys %fh ){    

Thanks to all - Re: Finding current directory

2005-06-27 Thread Hugh Loebner
My thanks to all for their prompt and very helpful replies. Hugh LoebnerOn 6/27/05, Hugh Loebner <[EMAIL PROTECTED]> wrote: Hello all, How do I get the path name of the current directory? In other words, how can I find out the name of the folder in which a program is executing? Thanks,

Finding current directory

2005-06-27 Thread Hugh Loebner
Hello all, How do I get the path name of the current directory? In other words, how can I find out the name of the folder in which a program is executing? Thanks, Hugh ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsu

Re: Ppm and Crypt::SSleay

2005-06-10 Thread Hugh Loebner
Don't all the internet browsers use these routines?  Does this mean that it will be forever impossible for a Canadian company to offer for download  a secure Canadian produced web browser? If so, this seems like a good lever to change the law. Eg. "Canada will forever be a backwater of internet d

Re: Ppm and Crypt::SSleay

2005-06-10 Thread Hugh Loebner
However... I get the message I mentioned:    "No suitable installation target found for Crypt::SSleay" What does this mean? Chuck -Original Message-From: Hugh Loebner [mailto:[EMAIL PROTECTED]] Sent: Friday, June 10, 2005 11:45 AMTo: Charles MaierCc: Perl-Win32-Users

Re: Ppm and Crypt::SSleay

2005-06-10 Thread Hugh Loebner
Jeff, why not get permission from the govt? HughOn 6/10/05, jeff griffiths <[EMAIL PROTECTED]> wrote: On Fri, Jun 10, 2005 at 10:18:10AM -0400, Charles Maier wrote:> I am having some problems getting hold of and installing Crypt::Ssleay.> I found the Winnipeg repository has the module and Activest

Re: Ppm and Crypt::SSleay

2005-06-10 Thread Hugh Loebner
I had exactly the same problem and questions a week ago.  Mathieu Longtin was kind enough to post the solution. I added the winnipeg site as a repository.  It took two steps 1. ppm  To start ppm 2. add rep "http://theoryx5.uwinnipeg

Re: Ppm and Crypt::SSleay

2005-06-10 Thread Hugh Loebner
Sorry, neglected the last step: 3.  install Crypt-SSLeayOn 6/10/05, Hugh Loebner <[EMAIL PROTECTED]> wrote: I had exactly the same problem and questions a week ago.  Mathieu Longtin was kind enough to post the solution. I added the winnipeg site as a repository.  It took two steps

Re: simple if?

2005-03-03 Thread Hugh Loebner
How about using a hash?: use strict ; my $x; my %wanted ; foreach (qw( word1 word2 whatever this that the-other) ){ $wanted{$_}= 1; } ; $x = 'the-other' ; if( $wanted{$x} ){ print "found $x\n" ; } else{ print "can't find $x\n" ; } ; $x = 'no-go' ; if( $wanted{$x} ){

Success: Printing a text file

2004-03-30 Thread Hugh Loebner
ork. "The system can not find the path specified" error. HL --- Andrew Timberlake-Newell <[EMAIL PROTECTED]> wrote: > > On 29 Mar 2004 at 9:03, Hugh Loebner wrote: > > > > > I can get perl to write a text file 'xyz.txt' to disk with > > no pro

RE: Printing a text file

2004-03-29 Thread Hugh Loebner
oft Windows XP [Version 5.1.2600] > (C) Copyright 1985-2001 Microsoft Corp. > > C:\>print /? > Prints a text file. > > PRINT [/D:device] [[drive:][path]filename[...]] > >/D:device Specifies a print device. > > > > > > -Original M