Re: mysql....postgres

2001-12-10 Thread iain truskett
* Kiarash Em. ([EMAIL PROTECTED]) [11 Dec 2001 06:29]: > mySQL vs postgreSQL?!?! > check this out > http://www.phpbuilder.com/columns/tim2705.php3?page=1 > ;) Hmm. Seems rather out of date wrt postgres. 8kb rows? Is that of data? Because postgres quite happily has field types that allow

Re: Finding 'probable' duplicate records

2001-12-07 Thread iain truskett
* Carl Rogers ([EMAIL PROTECTED]) [08 Dec 2001 01:54]: [...] > I was hoping that I could find a way to say 'Compare two strings (the > fields within the strings aren't important). If string B has 17 common > characters out of 20 in string A, you might want to consider that a > match'. See the St

Re: FW: Long variable again

2001-12-06 Thread iain truskett
* Carl Rogers ([EMAIL PROTECTED]) [07 Dec 2001 06:34]: [...] > How about this: > $linebreak = "-" x 70; > $string = "\nHELLO WORLD!\n\n". >"To $to, \n\n". >"\n". $linebreak. "\n Hello World ". >"Thank you for using our software.\n\n"; > Not pretty, not elega

Re: OO perl tutorials

2001-12-04 Thread iain truskett
* [EMAIL PROTECTED] ([EMAIL PROTECTED]) [05 Dec 2001 17:45]: > can anyone suggest a good online tutorial to OO perl. i've read > perlboot, perlmod, perlref, and perltoot but am still very confused. http://www.manning.com/mcart/ebook_09_1.html which will allow you to purchase, online, a copy of:

Re: Getopt::Long

2001-07-21 Thread iain truskett
* Bicknell, Frank ([EMAIL PROTECTED]) [21 Jul 2001 08:12]: [...] > Using Getopt::Long, it's possible to watch for negated options: > -nostuff ... and it's possible to alias options "stuff|such" allows > -stuff to be the same as -such. [...] > $ stuff -nosuch > Using Perl Version 5.00404 > Unkno

Re: Updating class variables - object oriented Perl

2001-07-18 Thread iain truskett
* Michael Fowler ([EMAIL PROTECTED]) [18 Jul 2001 18:24]: [...] > _Object Oriented Perl_ gets pretty advanced, but it does have chapters > on basic OO in Perl, and basic OO in general. It would probably be more accurate to say that _Object Oriented Perl_ takes one from knowing not necessarily an

Re: package

2001-06-27 Thread iain truskett
* Jerry Preston ([EMAIL PROTECTED]) [27 Jun 2001 21:21]: > What is the best source to learn to write packages? For standard stuff, see the other post (by David). My recommendation is pick up "Object Oriented Perl" by Damian Conway. Packages are typically best done as objects, and this is the def

Re: Arrow Notation Question

2001-06-27 Thread iain truskett
* Brett W. McCoy ([EMAIL PROTECTED]) [27 Jun 2001 21:22]: > On Wed, 27 Jun 2001, Gross, Stephan wrote: > > I'm using Win32::GUI. I create a text field and call it $TextField. The > > user inputs some text, say "abc". > > If I say > > print "$TextField->Text"; > > I get > > Win32::GUI::T

Re: CVS?

2001-06-27 Thread iain truskett
* Adam Theo ([EMAIL PROTECTED]) [27 Jun 2001 09:21]: > i am looking into setting up some sort of code management system for > my website, and found CVS, but have one problem with it: > is it only for C? i understand it can likely store any code language, > but what about the merging and other fun

Re: Perl Style Question

2001-06-26 Thread iain truskett
* Paul ([EMAIL PROTECTED]) [27 Jun 2001 00:50]: > --- iain truskett <[EMAIL PROTECTED]> wrote: > > * Gross, Stephan ([EMAIL PROTECTED]) [26 Jun 2001 22:16]: [...] > I always used the second in C, but once I started using Perl and Java > I kept finding something happening t

Re: Perl Style Question

2001-06-26 Thread iain truskett
* Gross, Stephan ([EMAIL PROTECTED]) [26 Jun 2001 22:16]: > Why is this style > if ($x) { > do this; > do that; > } > typically preferred over > if ($x) > { >do this; >do that; > } > I like the latter example because it's easier to cut and paste the > braces and everything in b

Re: size of hash?

2001-06-26 Thread iain truskett
* P lerenard ([EMAIL PROTECTED]) [26 Jun 2001 21:48]: > HI, > that's not $#hash, so it is... my $hashsize = keys %hash; i.e. keys %hash returns an array of keys, and arrays used in a scalar context evaluate to the size of the array. Or: print "I have ".(scalar keys %hash)." keys in my hash.\n"

Re: Perl UNIX commands

2001-06-14 Thread iain truskett
* John Joseph Roets ([EMAIL PROTECTED]) [14 Jun 2001 16:34]: > I found a site a while back which detailed a pursuit to develop Perl > commands to replace universal UNIX commands. Thus, providing advanced > benefits/features, such as more full regex matching abilities, etc. > My problem: > I cann

Re: extracting substr

2001-06-09 Thread iain truskett
* William ([EMAIL PROTECTED]) [09 Jun 2001 23:26]: > hi, > i want to be able to read a text file and extract only the valid > ip addresses. however, along with valid ip addresses my code is > grabbing "periods" and invalid ip addresses, e.g., .xxx, > www.xxx.yyy . how can i correct this? It migh

Re: if then else

2001-06-09 Thread iain truskett
* Jos I. Boumans ([EMAIL PROTECTED]) [09 Jun 2001 10:32]: > and for some abbreviation: > $ENV{'HTTP_REFERER'} : $previous = $ENV{'HTTP_REFERER'} ? $previous = "an > unknown site"; [...] > god bless one liners =) Surely you mean: $previous = $ENV{HTTP_REFERER} ? $ENV{HTTP_REFERER} : 'an unknown

Re: one last attempt?

2001-06-05 Thread iain truskett
* Alan F. Larimer, Jr. ([EMAIL PROTECTED]) [06 Jun 2001 02:59]: > > > this is the command line from my index.htm file > > > [...] > --- Peter Cornelius <[EMAIL PROTECTED]> wrote: > > Umm. Don't you need an http header? print "content type: > > text/html\n\n"; before printing anything else out. CG

Re: Sorting a hash by value, and displaying the key

2001-06-02 Thread iain truskett
Rob talked about foreach $value(sort {$a <=> $b} (values(%hash)) { print $value; } vs. foreach $value(sort byNum (values(%hash)) { print $value; } sub byNum { $a <=> $b; } Am I correct in thinking that the anonymous subroutine is vaguely more efficient? -- iain.