Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Array from list in input file?

by muba (Priest)
on Nov 24, 2015 at 22:39 UTC ( #1148556=note: print w/replies, xml ) Need Help??

in reply to Array from list in input file?

Sounds like a dang fine approach to me.

use strict; use warnings; use feature 'say'; my $minimum = 100; # The threshold. while(<DATA>) { # Read it my ($str, undef, $nr) = split / /; # Split it say $str if $nr >= $minimum; # Say it } __DATA__ Too low 1 Also nope 2 Just fine 100 Not there 3 Hidden hideaway 4 Another one 101 Hiding quierly 5 Also no 6 Perl rocks! 102 Again no 7 Nope nopenope 8 Hacker hackityhack 103 Cracker crackitycrack 9 Hater hatitiyhate 10
Just Another Perl Hacker

It even works, too!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2021-03-02 05:52 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (38 votes). Check out past polls.