Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Perl: remove whitespace of a String

Perl: remove whitespace of a String
{filelink=13225}

sub trim
{
    my @out = @_;
    for (@out) {
        s/^s+//;
        s/s+$//;
    }
    return @out == 1
              ? $out[0]
              : @out;
}
print trim('Welcom to home  ');

Users who found this page were searching for:

  • python creating a button
  • perl strip duplicate spaces
  • selection structure examples in perl
  • perl using external program
  • perl trim whitespace
  • perl iterate over two lists
  • java gui attributes
  • removing whitespace from a string in perl
  • create forms with swing
  • java swing underline text

No comments yet.

Leave a Comment