Thread: perl question
View Single Post
Old 02-23-2005, 07:23 AM  
darksoul
Confirmed User
 
darksoul's Avatar
 
Join Date: Apr 2002
Location: /root/
Posts: 4,997
chomp by default removes new lines from the end of the string.
anyway this is what you're looking for:

$x =~ s/^\s+//g; for beginning
$x =~ s/\s+$//g; for ending.
__________________
1337 5y54|)m1n: 157717888
BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
Cambooth
darksoul is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote