On Fri, Nov 19, 1999 at 10:10:07AM -0800, Jeffrey Baker wrote:
if (defined @foo_in) {
Generally using defined() on aggregates is a bad idea.
Tim.
Randal L. Schwartz wrote:
"if (@foo) {...}" is *idiomatic* Perl for "are there any elements in
@foo, and if so, do this". If you don't understand the idioms, please
choose a more familiar language. :)
Don't you think this is a rather nasty response, smiley notwithstanding? Normally I
enjoy
On Fri, 19 Nov 1999, Jeffrey Baker wrote:
I don't care whether Perl has allocate memory or not. All I care about
is whether or not there are any defined entries in the list, which I
think is most clearly expressed as 'if (defined $list[0])'. What is
more clear than that? 'if (@list)'
Cliff Rayman wrote:
`perldoc -f defined` yields a couple of sentences:
You may also use Cdefined() to check whether a subroutine exists, by
saying Cdefined func without parentheses. On the other hand, use
of Cdefined() upon aggregates (hashes and arrays) is not guaranteed to
produce
On Fri, 19 Nov 1999, Jeffrey Baker wrote:
1) Visit /yoururl
2) Visit /yoururl?foo=barfoo=baz
3) Visit /yoururl as many times as you have Apache child processes
httpd -X
--
Matt/
Details: FastNet Software Ltd - XML, Perl, Databases.
Tagline: High Performance Web Solutions
Web Sites:
[EMAIL PROTECTED] (Jeffrey Baker) wrote:
Cliff Rayman wrote:
`perldoc -f defined` yields a couple of sentences:
You may also use Cdefined() to check whether a subroutine exists, by
saying Cdefined func without parentheses. On the other hand, use
of Cdefined() upon aggregates (hashes and
"Jeffrey" == Jeffrey Baker [EMAIL PROTECTED] writes:
Jeffrey Yeah. I guess the reason I do the latter is b/c I want the code to
Jeffrey reflect what I am actually trying to test. I don't really want to test
Jeffrey the trueness of @foo, I want to test for it's existence. But in perl
Jeffrey
On Fri, 19 Nov 1999, Matt Sergeant wrote:
httpd -X
good production solution.