Thursday, January 02, 2020

Re: perl popularity inside openbsd community? (Re: Suggestion: Replace Perl ...)

On Thu, Jan 02, 2020 at 12:40:51PM +0100, Marc Chantreux wrote:
> the quoting system
>
> # qw( for a list of barewords )
> my %user = qw(
> login mc
> shell /bin/zsh
> );
> print $user{login};

I wouldn't write it that way

my %user = ( login => 'mc', shell => 'bin/zsh');

is way more readable in that case, I think,
and it does showcase what a *smart* quoting system can do.

No comments:

Post a Comment