in reply to Convert split to regex
Shorter code does not necessarily mean faster code. If you need to compose a username from first, last names and date of birth, you can have:
use strict; my $bday = "8/16/97"; my $firstname = "Benjamin"; my $lastname = "Biederman"; my $uname = lc(substr($firstname,0,1) . substr($lastname,0,1)) . sprintf("%02d"x3, split m|/|, $bday); print $uname;
Is that what you want ?
|
|---|