Follow

I hadn't touched for a month, but I hadn't lost my touch! My first line after coming back to a Perl project is this gem:

($e->{name}, $e->{original}) = @{(grep $_->{aid} == $e->{aid}, @{$e->{alias}})[0]}{'name', 'original'};

(It's really nothing special, it just looks so... noisy. It's art! 😆)

Just making sure I still conform to the stereotypical Perl programmer type. I might need to grow a beard, though.

@ayo does this remove the contents of your drive?

@newt Nah, it just reconfigures your /dev/random to alternate between outputting "name" and "original".

@ayo A bit easier to read with
@$e{'name', 'original'} = ...

@choroba Of course! I haven't made much use of hash slices in the past, but they're pretty useful, indeed.

Sign in to participate in the conversation
niu.moe

We are a cute and loving international community O(≧▽≦)O !