Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Using the map function

by Skeeve (Vicar)
on Jul 10, 2013 at 18:27 UTC ( #1043524=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1043524]
help
Chatterbox?
[toolic]: what does your input look like?

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (12)
As of 2017-02-23 19:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (351 votes). Check out past polls.