Re: Standard input errors




On Tue, 26 Sep 2006, elite elite wrote:



Here are my error:


[syntax@localhost ~]$ perl hello.pl
String found where operator expected at hello.pl line
15, near "print ""
(Might be a runaway multi-line "" string starting on
line 11)
(Missing semicolon on previous line?)
Backslash found where operator expected at hello.pl
line 15, near "print "\"
(Do you need to predeclare print?)
Backslash found where operator expected at hello.pl
line 15, near "address\"
String found where operator expected at hello.pl line
15, at end of line
(Missing semicolon on previous line?)
syntax error at hello.pl line 15, near "print ""




Did you read the error message?

Did you look for a missing semicolon near line 15?







Global symbol "$address" requires explicit package
name at hello.pl line 11.
Global symbol "$name" requires explicit package name
at hello.pl line 11.
Can't find string terminator '"' anywhere before EOF
at hello.pl line 15.



here my code.I not sure what i did wroung here.

#!/usr/bin/perl

use strict;
use warnings;

my $street='Wright';
print "$street\n";
$street='Washington';
print "$street\n";
print "One major street in madison is Washington\n";
print "enter your address"/n";
my $address

$name =<>;
print "\nPerl has received your address\n";










Owen

.



Relevant Pages

  • Re: Standard input errors
    ... elite elite wrote: ... String found where operator expected at hello.pl line ... (Missing semicolon on previous line?) ... Backslash found where operator expected at hello.pl ...
    (perl.beginners)
  • Re: gfortran diagnostics and so on
    ... Well, in f0003, backslash is part of the standard Fortran character set. ... Because the backslash is part of the standard Fortran character set, the default behavior should be the printable character, **NOT** some kind of magic introductory character that transforms the interpretation of following character. ... The one I like best is to use one of the popular extensions to designate a particular literal string according to the C language. ...
    (comp.lang.fortran)
  • Re: Double backslashes \ in strings
    ... and the single backslash isn't ... The simplest way to specify a string is to enclose it in single quotes. ... echo ''; ...
    (comp.lang.php)
  • Re: Convert to /
    ... |> Why is it so hard to convert backslashes to forward slashes in java? ... | character immediately after the colon would be the tab ... | get a backslash character into a string literal in Java ...
    (comp.lang.java.help)
  • Re: Raw String Question
    ... backslashes are left in the string. ... backslash as the last character of a string without doubling it". ... regular expressions without doubling all the backslashes. ...
    (comp.lang.python)