
japhy
Enthusiast
Feb 17, 2000, 4:09 AM
Post #2 of 3
(251 views)
|
Embrace the substr() function: <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR> $first_two = substr $string, 0, 2; $second_two = substr $string, 2, 2; $last_three = substr $string, -3; $second_to_last = substr $string, -2, 1; </pre><HR></BLOCKQUOTE> PerlArchive has the perl docs if you don't, so read up on substr().
|