fork(3) download
  1. $a='
  2. some- text!!
  3.  
  4. for testing?
  5. ';
  6.  
  7. for (split(/\n/, $a)) {
  8. s/((?<= )\s*)|[^a-zA-Z0-9\s]|(\s*$)|(^\s*)//g;
  9. print $_,"\n";
  10. }
  11.  
Success #stdin #stdout 0s 4552KB
stdin
Standard input is empty
stdout
some text

for testing