Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to trim string variable in Perl?

Status
Not open for further replies.

vovan1415

Programmer
Dec 6, 2001
50
0
0
US
How to trim string variable in Perl?
 
for ($string) {
s/^\s+//;
s/\s+$//;
}

( I shamelessly copied this from perlfaq4.html [pipe] ) ---
cheers!
san.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top