in reply to Style: Passing the same value for multiple DBI placeholders

You could say:
... ($message -> {'userid'}) x 2, ...
But it's fine the way you have it. I would think about doing it the way I have it above if I needed a variable number or large number of the same arguments in a row.

Replies are listed 'Best First'.
Re^2: Style: Passing the same value for multiple DBI placeholders
by diotalevi (Canon) on Feb 07, 2003 at 02:38 UTC

    I'd classify that as an obfuscated usage. There were one or two moments where I almost wrote it that way except that it's ugly. Of course... if as you say there were a "large number of the same arguments in a row" then it makes sense. But then I'd have to wonder whether the SQL call was written sanely. (which is neither here nor there).

    Thanks for the suggestion though.


    Seeking Green geeks in Minnesota

Re: Re: Style: Passing the same value for multiple DBI placeholders
by bart (Canon) on Feb 08, 2003 at 00:59 UTC
    You could say:
    ... ($message -> {'userid'}) x 2, ...
    or even
    ... map({ $_, $_ } $message->{'userid'}) ...