Thread: Random Quest
View Single Post
  #7  
Old 04-23-2019, 04:41 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

Seeing the answer without knowing the question was bugging me.

There are always several ways to do something in Perl (using grep instead of the smart matching operator, for example).

Something similar to the example provided would be less error prone, especially if you ever intend to change the items that are required.
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
Reply With Quote