in reply to trimming space from both sides of a string
$ perl -wE '$_ = " - - "; s/^\s*\b(.*)\b\s*$/$1/g; say qq["$_"]' " - - "
In general I prefer working over interesting solutions :-). Mine:
use v6; say ' - - '.trim.perl;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: trimming space from both sides of a string
by yorfeix (Novice) on Oct 12, 2010 at 12:13 UTC | |
by muba (Priest) on Oct 12, 2010 at 12:42 UTC | |
|
Re^2: trimming space from both sides of a string
by szabgab (Priest) on Oct 12, 2010 at 12:04 UTC |