Re: First perl program

2008-06-19 Thread Dr.Ruud
Thomas Bätzler schreef: > #!/usr/bin/perl -w Read perllexwarn. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

RE: First perl program

2008-06-19 Thread Thomas Bätzler
Hi, Jason B <[EMAIL PROTECTED]> wrote: > I'm really new to programming and this is my first perl prog. > I'm looking for any advice or comments on this script. Enable warnings and "use strict;". That'll help you to write better code. > > #!/usr/bin/perl #!/usr/bin/perl -w use strict; > #

Re: First perl program

2008-06-19 Thread Dr.Ruud
"Jason B" schreef: > #!/usr/bin/perl Missing: use strict; use warnings; > #Name:circumf > #Date:Jun19/08 > #Author:Bornhoft, J > #Purpose:to calculate the circumference of a circle > > print "Hi. I'm going to help you calculate the circumference of a > circle\n"; Alternative: print <

Re: First perl program

2008-06-19 Thread Rob Coops
Hi Jason, To start with you are going to get quite a few replies that will tell you to use strict and enable warnings because that is what good perl programers do. :-) #!/usr/bin/perl use strict; use warnings; #Name:circumf Strict basically forces you to scope your variables, there is a lot of