in reply to Converting pascal code to perl

How about we combine all of the answers given and try this:
# perl -w; use strict; sub roll1 { return ((0,1,2,3,4,5,6)[abs(6-abs($_[0]-7))])/36; } print roll1($_),$/ for (2..12);
I checked this out on my Win32 machine and it produces:

C:\>perl pascal.pl
0.0277777777777778
0.0555555555555556
0.0833333333333333
0.111111111111111
0.138888888888889
0.166666666666667
0.138888888888889
0.111111111111111
0.0833333333333333
0.0555555555555556
0.0277777777777778

just like everyone elses code. Hope that helps some...

Theodore Charles III
Network Administrator
Los Angeles Senior High
4650 W. Olympic Blvd.
Los Angeles, CA 90019
323-937-3210 ext. 224
email->secon_kun@hotmail.com
perl -e "map{print++$_}split//,Mdbnr;"