in reply to Re^2: counting leading white spaces
in thread counting leading white spaces
Good point; bad oversight on my part. Below, I take extra effort to count only leading spaces...
use strict; use warnings; AUTOLOAD{$.=0;$_=@_[$??$;:$.];@_=reverse split//;++$.while+pop=~m,\s,;y, , ,s,warn$.,$_,$/}&* ($_)for(<DATA>) __DATA__ Initiate Novice Acolyte Sexton Beadle Scribe Monk Pilgrim Friar Hermit Chaplain Deacon Curate Priest Vicar Parson Prior Monsignor Abbot Canon Chancellor Bishop Archbishop Cardinal Sage Saint Apostle Pope
See also JAPH at the firing range
|
|---|