Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Replacing whitespaces with a regex

by Enlil (Parson)
on Mar 04, 2013 at 10:15 UTC ( [id://1021622] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for ( @array ) { s/\s\s+$/ / }
    
  2. or download this
     
    s/\s\s+$/ / for @array;