Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Remove blank lines from REGEX output

by Laurent_R (Abbot)
on Feb 05, 2014 at 22:28 UTC ( #1073620=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (<$IN>) {
         chomp;
    ...
         next unless /^.{3}\d{4}/; # lines of interest have 4 digits from 
    +position 4 to 7
         # now the real processing ...
    }
    
  2. or download this
    while (<$IN>) {
         chomp;
         next if /^#/ or /^\s*$/ or length < $min_useful_length or  /^REM/
    + or not /^.{3}\d{4}/ ...
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1073620]
help
Chatterbox?
[erix]: they should lean to gnash their teeth a bit instead of writing more ^Re:NN-nodes :)
[erix]: *learn
[erix]: comic relief: how to start a riot and a fortune at the same time
[beech]: :) thats too generous to jdporter, don't start none won't be none -- there is about two decades (rounding up) worth of "ineffective" node titles -- leave the pope alone :p
[erix]: infallibility breeds inquisition

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2017-01-17 23:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (159 votes). Check out past polls.