in reply to Re^3: Pulling first 10 characters out of string?
in thread Pulling first 10 characters out of string?
Any of them work, so use whichever style you like most (personally, I think I prefer the last one).$x =~ s/^(.{10}).*/$1/; ($x) = $x =~ /^(.{10})/; $x = substr($x, 0, 10); susbstr($x, 10) = '';
|
|---|