Help for this page

Select Code to Download


  1. or download this
    # build a regex to match just your keys
    my $removers = "^(?:" . join ("|", map { quotemeta $_ } @text_remove) 
    +. ") ";
    ...
    
    # strip the patterns from the beginning of each line.
    @xlate_data = map { s/$remove//; $_; } @xlate_data;
    
  2. or download this
    # use whatever delimiter makes sense here.  I'm assuming
    # you don't have newlines at the ends of the elements already.
    ...
    
    # back to an array
    @xlate_data = split/\n/, $full_string;