Re: Standard input errors



Elite Elite wrote:
here my code.I not sure what i did wroung here.

1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 my $street='Wright';
7 print "$street\n";
8 $street='Washington';
9 print "$street\n";
10 print "One major street in madison is Washington\n";
11 print "enter your address"/n";
12 my $address
13
14 $name =<>;
15 print "\nPerl has received your address\n";


As others respondents pointed out there are several errors in this. I
added line numbers just to make it easier to discuss the program. It
will not run with line numbers.

It was already pointed out that there were the 2 problems with line 11.
In addition line 12 needs a semicolon to terminate it.

I might suggest you find a text editor that does context color coding
(in linux gedit has a perl module) in the windows world the text editor
from IndigoStar called PerlEdit also does context color coding. This
makes it much easier for you to find situations where you have left off
a quote or added an unneeded one, etc.

PerlEdit is free for non-commercial users and can be found at:
http://www.indigostar.com/perledit.html

There is both a Windows and a Linux version

.