$_ = "Ipod batteries for Apple Ipod PDAs. Replacement batteries from Laptops for Less.com.url"; print substr ($_, 0, 20); /^(.{0,20})/; print $1;