Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2019-04-20 07:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I am most likely to install a new module from CPAN if:
















    Results (108 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!