Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Keeping the first occurence of a pattern, and removing the other occurences

by TStanley (Canon)
on Aug 04, 2011 at 15:42 UTC ( #918572=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    ^LSTORE 001
    ===============
    ...
                                                                   EXTEND 
    + MRKDWN   REASON                  EXT. MRKDWN
    ITEM  DESCRIPTION                   SIZE    QTY    WGT  RETAIL RETAIL 
    + RETAIL   CD DESCRIPTION                LOSS   VENDOR
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    
    close $IN;
    close $OUT;
    
  3. or download this
    $_ =~s|DEPT:\s+PRODUCE\n{2,}(\s{63}EXTEND\s+MRKDWN\s+REASON\s+EXT.  MR
    +KDWN\n)|$1|g;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2019-06-27 10:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (111 votes). Check out past polls.

    Notices?