RE: interpolating $obj->varname in strings

2001-02-22 Thread Andrew Hamm
hmmm - and I'm guilty of not reading your message properly! Laughing at myself... -Original Message- From: Bennett Haselton [mailto:[EMAIL PROTECTED]] HUH? $res->code is not a variable, it's a call to a method. Is that what you mean? Because if you really mean a variable, than it should

RE: interpolating $obj->varname in strings

2001-02-22 Thread Andrew Hamm
-Original Message- From: Bennett Haselton [mailto:[EMAIL PROTECTED]] >I like being able to write > >print "Value of var is: $var\n"; > >but with variable names like or $res->code, if you try to do > >print "Value of code is: $res->code\n"; HUH? $res->code is not a variable, it's a call t

RE: Trouble with lookbehind in regular expression using File::Find

2001-02-06 Thread Andrew Hamm
> Thanks. That worked great. Next time I will post the entire code, > sorry about that. > I have a question about: > return if $file !~ /\.html?$/i; > I do not understand the use of ?$. I thought ? means one or more > times and $ means end of line. ? actually means 0 or 1 times. * means 0 or

RE: Help understanding Read on closed filehandle error

2001-01-14 Thread Andrew Hamm
Most likely the file has failed to open. You should do something like: open($A, $database) or die "cannot open $database: $!\n"; Perhaps your process is not in the directory you expect it to be. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http:

RE: Prototyping problem?

2001-01-02 Thread Andrew Hamm
-Original Message- From: Joel Ricker [mailto:[EMAIL PROTECTED]] I'm runing into a prototype problem. I've prototyped a function to take no arguments like this: sub Buildmap() { } and calling it just like this: Buildmap; And I get the warning: Prototype mismatch: sub Sfb::buildmap v

RE: precendence issue

2000-12-10 Thread Andrew Hamm
Guys, guys, guys! You are all assuming that the language should work from left to right, fully executing each side effect (the ++ or --) AND STUFFING THE RESULT OF THE SIDE EFFECT BACK INTO THE VARIABLE before moving on to the next part of the expression. THIS IMAGINARY RULE DOES NOT HELP OPTIMI

RE: comparing numbers

2000-12-06 Thread Andrew Hamm
abs($closest - $value) } # If ! definer $closest then the @numbers array is empty If your rule for closest is slightly more complicated (one replier questioned whether you want the closest from above or below or something like that) then you merely need to change the rule on the right-hand side of t