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

Re^3: Remove blank lines from REGEX output

by Laurent_R (Parson)
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-12-25 22:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls