Re: syntax differences and performance

2004-10-25 Thread Brian Gerard
ying to ameliorate a performance problem, you want to look for the part of your script where it's spending the most time. HTH- Brian PS - $query-param('price') should be $query-param{'price'} - curly brackets for hashes, parens for subroutines. /

Re: File Size Calculator

2004-08-10 Thread Brian Gerard
And the clouds parted, and Brian Gerard said... > > [1] http://www.alcyone.com/max/reference/physics/binary.html > -anyone remember offhand the URL to the /. story on these, btw? > ...never mind. Found it. (uncaught typo on my first google query... DOH!) http://slashdot.org

Re: File Size Calculator

2004-08-10 Thread Brian Gerard
l -anyone remember offhand the URL to the /. story on these, btw? [2] I'm a little rushed at the moment, so I don't have time to fill in any details of how it works. Let me know if you want/need an explanation and I'll be happy to provide one. :) /

Re: E-mail Parsing

2004-08-04 Thread Brian Gerard
the headers and body and it works like a charm! HTH- Brian /~~~~~~~~~~\ | Brian Gerard Duct tape is like the Force. It has | | First initial + 'lists' a light side and a dark side and

Re: Favorite email parser?

2004-06-29 Thread Brian Gerard
Forgot to mention the platform. This will be on a FreeBSD system, and the emails will be in the standard flat file format (mbox). Didn't want anyone going too deep on the M$/Exchange side of the house. :) /~~\ |

Favorite email parser?

2004-06-29 Thread Brian Gerard
ers to any or all of the above gratefully received! aTdHvAaNnKcSe- Brian /~~~~~~\ | Brian Gerard O'Reilly is to a system administrator| | First initial + 'lists' as a shoulder

Re: matching hypenated strings

2003-11-25 Thread Brian Gerard
're absolutely correct. Thanks for the correction. :) /~~~~~~~~~~\ | Brian GerardCrime does not pay... as well as politics. | | First initial + 'lists'

Re: matching hypenated strings

2003-11-25 Thread Brian Gerard
x-r.test.net moon-bs-d.test.net moon-bt-321.test.net ## end ## Its output is : ksh$ ./mchname tibor mars moon-bx-r moon-bs-d moon-bt-321 ksh$ HTH- Brian /~~\ | Brian Gerard

Re: regexp matching- real simple!

2003-11-13 Thread Brian Gerard
oblem? > > if ($diff > 0) { ... } > Bah. That's the trouble with starting a reply, getting otherwise occupied before completing it, and then sending it in late. What he said. <:) /~~~~~~\ | Brian G

Re: regexp matching- real simple!

2003-11-13 Thread Brian Gerard
;ve stated that $diff should be a number. That being said, the pattern you were trying for would probably be: \A-\d+\Z Which says: "At the beginning of the string, match a single dash, followed by one or more digits, followed by the end of the string." HTH- Brian /

Re: Why is parsing your own form data a bad idea?

2003-11-05 Thread Brian Gerard
e code. Brian /~~~~~~\ | Brian GerardI'm sorry, are the voices | | First initial + 'lists' in my head bothering you?

Re: Training in the Middle and Far East

2003-11-04 Thread Brian Gerard
hat I accept as a rigorous definition (with cites from a well known authority on the English language, Merriam-Webster). Regardless of whether you have corresponding citations, I would be interested to know what you consider "science" to be. Clearly, you rate mathematics, physics, a

Re: Training in the Middle and Far East

2003-11-04 Thread Brian Gerard
spectfully, Brian [1] http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=science Definition 3a. [2] http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=scientific+method [3] http://www-cs-staff.stanford.edu/~knuth/index.html /~~~

Re: What is my name

2003-10-31 Thread Brian Gerard
plies to regex metacharacters ('.', '*', '+', etc). When perl looks for the pattern to match it looks for everything up to the first matching delimiter before trying to compile it. So when you said m/([^/]+)$/ perl tried to use ([^ as its regex, which isn't v

Re: What is my name

2003-10-30 Thread Brian Gerard
t in the above terms: my $this_scripts_name_is = who_am_I(); sub who_am_I { my $PROGNAME; ($PROGNAME = $0) =~ s|(\.?\.?(/[^/]+)*/)?([^/]+)|$3|; return $PROGNAME; } HTH- Brian /~~\ | Brian Ger

Re: initialising a list of variables

2003-10-30 Thread Brian Gerard
pirit of TMTOWTDI... map {$_=""} my ($fred, $ginger); :) /~~~~~~\ | Brian Gerard Do not taunt Happy Fun Ball.| | First initial + 'lists'

Re: script to test a file.

2003-10-29 Thread Brian Gerard
oesn't exclude RFC1918 reserved addresses (10/8, 172.16/12, and 192.168/16), or multicasts. * It doesn't take netmasks into account. 1.2.3.255/16 is a valid host address, while 1.2.3.255/24 is not (it's a broadcast). Taking these sorts of things into account could make for a