Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Imputation of data

by choroba (Cardinal)
on Jan 25, 2016 at 15:41 UTC ( [id://1153582]=note: print w/replies, xml ) Need Help??


in reply to Imputation of data

So, you just want to grep lines that don't contain 9?
#! /usr/bin/perl use warnings; use strict; use Data::Dumper; use List::Util qw{ none }; my @rows; while (<DATA>) { my @row = split ' '; push @rows, \@row; } print 'before: ', Dumper(\@rows); @rows = grep { none { '9' eq $_ } @$_ } @rows; print 'after: ', Dumper(\@rows); __DATA__ 2 2 0 1 0 2 2 0 2 1 0 2 1 1 0 0 1 1 1 0 2 2 0 0 0 2 9 0 2 1 0 2 0 1 0 2 2 0 9 0
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1153582]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-20 04:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found