There's an even easier way:
$Sqs = stretcher($S); [download]
In reply to Re^2: Arrgghh! Perl and Matlab (round 2) by ambrus in thread Arrgghh! Perl and Matlab (round 2) by Angharad