Re: Sufficient effort

2004-12-02 Thread Tagore Smith
y dealing with people who know their way around. Anyway, I know this thread is supposed to be dead, but since it refuses to die, I felt like putting in my two cents- sorry, admin, and everyone who wants it to go away. Tagore Smith -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: find the lowest number?

2002-08-30 Thread Tagore Smith
covers this and other questions that get asked a lot and aren't in the Perl faq :). Tagore Smith -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Tail call optimization

2002-06-03 Thread Tagore Smith
t of view) to use iterative constructs even in places where recursion is more natural, but tail-call optimization would be required? Thanks Tagore Smith -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Is there a good Perl way for a validation subroutine?

2002-05-28 Thread Tagore Smith
n value is use it in a sql statement it would be reasonable to write a subroutine that returned a piece of that sql statement as a string (which would be a little (but maybe not much) more complicated than just concatenating the fieldnames), since that's all you will need. Tagore Smith -- To

Tail call optimization

2002-05-28 Thread Tagore Smith
ure how you would do this in Perl. Thanks Tagore Smith -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: complementing a scalar

2002-05-25 Thread Tagore Smith
in the set. The d means to delete any characters for which you haven't given a translation (and in the tr above you aren't giving any translations). So your tr means delete any characters in $name that aren't in the set of characters given between the first two / characters. I think

Re: Parsing formdata from one CGI script to the next.

2002-04-08 Thread Tagore Smith
ou subscribed to beginners-cgi? It is specifically for cgi (in Perl). Tagore Smith -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: HTML whine

2002-04-02 Thread Tagore Smith
but I agree that it is good form to close the tags. Since recent web servers and browsers increasingly use compression, and repeated elements compress well, bandwidth is becoming less of an issue. Tagore Smith -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Checking against an assosiative array...

2002-04-01 Thread Tagore Smith
If that's the case the following checks to see if the key $user exists and then gets the values in the associated hash. if (defined(%{$users{$user}})){ while((my $key, my $value)=each(%{$users{$user}})){ print "$key: $value\n"; } } else { print "No match for $user."; } Tagore Smith -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re:client side authentication link

2002-03-28 Thread Tagore Smith
pdf. You can find it at: http://cookies.lcs.mit.edu/ Sorry for posting twice, but I think this is worth reading if you are doing user authentication, and it's pretty entertaining as well. Tagore Smith -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

Re: Creating a Unique Key

2002-03-28 Thread Tagore Smith
hentication well. One of the things it talks about is the weakness of the authentication scheme at the Wall Street Journal's web page caused by a misunderstanding of how crypt works. They do propose a stronger authentication scheme. Tagore Smith -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: How to thread in Perl?

2002-03-25 Thread Tagore Smith
Ahmed Moustafa wrote: > Tagore Smith wrote: > > > Ahmed Moustafa wrote: > > > > > >>So, how can a new different process by forked? Or, how a function be > >>called and the next step execute without waiting for the previous > >>function to te

Re: How to thread in Perl?

2002-03-25 Thread Tagore Smith
use exec to execute another process which is not a "clone" of the parent. See perldoc -f fork and perldoc -f exec. Out of curiosity, why do you want to do this? Tagore Smith -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: breaking a string into chunks (was Re: help with my parser program?)

2002-03-09 Thread Tagore Smith
Jeff 'japhy' Pinyan wrote: > > $string =~ s/(.{1,78})\s/$1\n/g; > I played around with this a bit and came up with something similar: $line=~ s/(.{1,78})(\Z|\s)/$1\n/g; I think $string =~ s/(.{1,78})\s/$1\n/g; assumes that the string ends in whitespace. Tag

Re: help with perl/Tk

2002-03-07 Thread Tagore Smith
new MainWindow; > $menubar= $main->Frame(-relief=>"raised", >-borderwidth=>2); > > $filebutton=$menubar->Menubutton;(-text="File", > -underline=>0); You have a semicolon betwen Menubutton and (-text etc.), and the = should be =>. Also,

Re: multidimensional hashes

2002-03-03 Thread Tagore Smith
21; my $shortdescription='short sleeved t-shirt'; $products{$short}= { number => $shortnum, description => $shortdescription, }; There are, of course, other ways to write this. What's going on is that each value in %products is a reference to an anonymous hash. Perl doesn't really have hashes of hashes- it has hashes of references to hashes. Tagore Smith -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: help with first Perl application (repost w/ better subject line)

2002-03-03 Thread Tagore Smith
he playedCards select box. > > open (PLAYED,"played.txt"); > @playedCards = ; > close PLAYED; > > if (playedCardsCheckbox){ > > print param("playedCardsCheckbox"); > foreach my $item (param("playedCardsCheckbox")){ > print @pl

Re: finding max value

2002-02-13 Thread Tagore Smith
Jeremy Vinding wrote: > duh... thx > of course, the results still favor sort: > > Benchmark: timing 100 iterations of for 10_000 elems, for 20 elems, sort > 10_000 elems, sort 20 elems... > for 10_000 elems: 7 wallclock secs ( 5.11 usr + 0.02 sys = 5.13 CPU) @ > 194931.77/s (n=100) > f