What is the error in this code

2010-03-31 Thread Vincent Cannavale
#open a text file for reading, since opening for writing wipes the file open(INFILE, ", "\n"); close(INFILE); open(OUTFILE, ">perlfile.txt"); $variable =~ s/0/zero/g ; $variable =~ s/1/one/g ; $variable =~ s/2/two/g ; $variable =~ s/3/three/g ; $variable =~ s/4/four/g ; $variable =~ s/5/five/g ;

Re: What is the error in this code

2010-03-31 Thread Jim Gibson
At 10:59 PM -0400 3/31/10, Vincent Cannavale wrote: You should have the following at the beginning of your program so Perl will help you find the errors: use strict; use warnings; #open a text file for reading, since opening for writing wipes the file open(INFILE, " You should use the 3-arg

Re: What is the error in this code

2010-04-01 Thread Shawn H Corey
Jim Gibson wrote: At 10:59 PM -0400 3/31/10, Vincent Cannavale wrote: You should have the following at the beginning of your program so Perl will help you find the errors: use strict; use warnings; #open a text file for reading, since opening for writing wipes the file open(INFILE, " You s