Re: Gurus Wanted!!

2001-06-08 Thread Mathew Hennessy
"Randal L. Schwartz" wrote: > > > "Jeff" == Jeff Yoak <[EMAIL PROTECTED]> writes: > > Jeff> At 11:50 PM 6/7/01 +, scott lutz wrote: > >> I have a this fancy bit of recursive search and replace code that I > >> picked up somewhere, but I would greatly appreciate it if one of the > >> guru

Re: the ENV command? parameter?

2001-06-08 Thread Mathew Hennessy
Aha! No gratuitous perl alternatives list is complete without map! map {print "$_: $ENV{$_}\n"} keys %ENV; Hee hee :) - Matt Aaron Craig wrote: > > At 12:13 07.06.2001 -0400, you wrote: > >Progress!! now I understand what the 'QUERY_STRING' is! > > > >and a little > > > >foreach(@key = keys(

Re: Printing a hash - weird behavior

2001-06-08 Thread Mathew Hennessy
"Randal L. Schwartz" wrote: > > > "jbarry" == jbarry <[EMAIL PROTECTED]> writes: > > jbarry> /(.*?),/; #pattern matching. Grabs everything up to the first comma. > jbarry> (The material number) > jbarry> $key = $1; > > NEVER use $1 unless it's in the context of a conditiona

Re: i'm warning you, this is a toughie!

2001-06-04 Thread Mathew Hennessy
Nichole Bialczyk wrote: > > The problem is that I don't know exactly what the problem is. I can write > to the logfile when I run it in Unix, but not when I try to access it > from the web. He says that it is more secure to write to our server than > it is to write to afs. But I can't make it wor

Re: Find the number of elements in a hash.

2001-06-04 Thread Mathew Hennessy
Doug Johnson wrote: > > Is there a similar way to find the number of keys in a hash without cycling > through them and without assigning the hash to an array? Dunno if you can avoid counting them, but $keycount = keys(%hash) will do what you want. Hopefully there's an optimization somew

Re: Beginners Training books

2001-06-04 Thread Mathew Hennessy
Carl Barnes wrote: > > To beginners community > > What book(s) do you consider the best for gaining > experience in using Perl. > I have been a visual basic programmer, and dabbled > with C++, but Perl seems to pull the best of all of Hi, I would recommend O'Reilly's _Learning Perl_ who

Re: Regular Expression

2001-06-04 Thread Mathew Hennessy
Satheesh Ramakrishnan wrote: > > All, > > How do I assign 1298b to some scalar variable from the string below. > > context_config_file = "1298b"; this is probably a cookbook, but ## require 5; # for (.*?) rege

Re: testing null strings for form field values

2001-06-04 Thread Mathew Hennessy
[EMAIL PROTECTED] wrote: > > if ( $formdata{view_name} ne "" ) { > $view = $formdata{view_name}; > $viewtag = "1"; > } > > is there a special method for testing against a null string for a form > field's value? i am using the above data, but it seems to always return exists() will t

Re: flock

2001-06-04 Thread Mathew Hennessy
Paul wrote: > > One option is to rename the logfile temporarily. Have the script call > it something like LogTemp$$ or something ($$ is the PID of the current > job). Then it doesn't *exist* in it's previous name. Move it back to > the original filename when you're done. If you have admi