Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re (2): Optimization for readability and speed (discussion)

by deprecated (Priest)
on Apr 30, 2001 at 22:24 UTC ( #76694=note: print w/ replies, xml ) Need Help??

in reply to Re: Optimization for readability and speed (code)
in thread Optimization for readability and speed (code)

However, the developers who are going to be maintaining code like this are not perl developers and feel that perl is "part of the problem" because the CGI's on the site (which I had no hand in) are misbehaving. It almost reminds me of C code, and I wanted to make sure that others were able to read it. It is readable, if not very perlful, imho.


Laziness, Impatience, Hubris, and Generosity.

Comment on Re (2): Optimization for readability and speed (discussion)
Replies are listed 'Best First'.
Re: Re: Re: Optimization for readability and speed (discussion)
by merlyn (Sage) on Apr 30, 2001 at 22:26 UTC
    I'm again going to disagree. What you've written is neither C nor Perl, and something kinda awful in between. Perl experts will wince, and C experts will lack the Perl understanding to pick it up.

    Either make it native Perl, or don't write it in Perl.

    It's also broken as Perl. You return from the middle of the subroutine that sets $", but you don't reset it! That breaks the rest of the program. Use this instead (if you must):

    local $" = '';
    Then no matter what exit you take, the caller's value of $" is preserved.

    -- Randal L. Schwartz, Perl hacker

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://76694]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (14)
As of 2015-11-30 09:02 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (766 votes), past polls