>It hurts me to do this when there's even a little bit of data, since it
>ends up spanning lines really quickly. And it's harder to read and
>figure out how everything lines up. Honestly, which is easier to read
>and code?

>print "Thanks, ", $q->param('name'), " for your order of ",
>$q->param('amt'), "\n";

>print "Thanks, $q->param('name') for your order of $q->param('amt')\n";

The non-embedded one is easier to read, of course.  And this "$q->"
crud is a bad choice anyway.  If we're going to be mutating Perl just
to appease the CGI weenies, then we're doing the wrong thing.  Consider:
virtually nobody uses that silly OO style with CGI.pm, you know.  So you
*have* to call

    print "Thanks, ", param('name'), " for your order of ", param('amt'), "\n";

And anyway, that's ugly.  Write that this way if you want it legible:

    printf "Thanks, %s, for your order of %.02f\n", param('name'), param('amt');

or even 

    printf "Thanks, %s, for your order of %.02f\n", 
            param('name'),          param('amt');

>Plus, I notice you ignored my regex example...

I don't know what you want me to do about that.  You can't do it with
backticks either, and for exactly the same reason.  If you consider this
an onerous burden, then I envy that you have nothing better to annoy you.

>-Nate

>P.S. I wrote both the above functions on one line, and let my mailer
>wrap them @ std 72 cols, 

Mailers mail.  They don't wrap.  I suggest you acquire one.

--tom

Reply via email to