Rotate Cartesian coordinates. Write a program rotates some Cartesian coordinates through an angle about the origin (0.0,0.0). The angle and coordinates will be read from a single line of stdin in the following format:

angle x1,y1 x2,y2 x3,y3 ...


eg.

3.14159265358979 1.0,0.0 0.0,1.0 1.0,1.0 0.0,0.0  


The results should be printed to stdout in the following format:

x1',y1' x2',y2' x3',y3' ...


eg.

-1.0,-3.23108510433268e-15 -3.23108510433268e-15,-1.0 -1.0,-1.0 -0.0,-0.0
Perl, 112 80 78
 
s/\S*//;$c=cos$&amp;;$s=sin$&amp;;s/([^ ,]*),(\S*)/($1*$c-$2*$s).&quot;,&quot;.($1*$s+$2*$c)/ge

Run on command-line as perl -pe 'code here', p option counted in code size.
For reference, here's my previous approach.  But regexes are too damn powerful.
split/[ ,]/,&lt;&gt;;$_='A;Y,print$x*cos($a)-$y*sin$a,&quot;,&quot;,$x*sin($a)+$y*cos$a,$&quot;whileX';s/[AXY]/\$\l$&amp;=shift\@_/g;eval