http://www.perlmonks.org?node_id=1043524


in reply to Using the map function

Here is a version that's not easy to read but was fun to write ;)
#!/usr/bin/perl use strict; use warnings; my (@data, @temperature, @status); @temperature= grep { /\d/ or push(@status, $_) and undef } @data= grep !/^\s*$/, <DATA>; print "Temperature:\n"; print @temperature; print "Status:\n"; print @status; __DATA__ CPU Temp = 30 GFX Temp = 45 RAM Temp = 40 CPU Status = OK GFX Status = OK RAM Status = OK

s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e