Odd. I just tried the same code snippet and it worked fine.

You might try putting a space before and after your "=" signs. I don't know if that makes a difference, but it won't hurt.

Marc Sacks
[EMAIL PROTECTED]

D. Bolliger wrote:

elite elite am Montag, 25. September 2006 22:27:
I not sure what i doing wroung.

I'm not sure either :-)

Street="Wright";

This is wrong syntax; "Street" is not a scalar variable, while "$street" would be.

print "$street\n";

$street is undef here, you didn't assign anything to the $street variable.

$street="Washington";

That's ok, but never used.

And i get this output.
Street/[EMAIL PROTECTED] ~]$

Weird, I can't explain that. Your code (is it a snippet from the actual code?) does not even compile on my box and (correctly) emits the error:

 Can't modify constant item in scalar assignment at - line 1,
 near ""Wright";"
 Execution of - aborted due to compilation errors.


- How exactly did you invoke your code?
- What is output if you run the code:

#!/usr/bin/perl

use strict;
use warnings;

my $street='Wright'; # ok, why not :-)
print "$street\n";
$street='Washington';
print "$street\n";

__END__

?


Dani



--
Marc Sacks, Ed.D. | Quality Assurance Manager
Lextranet | 107 Union Wharf | Boston, MA 02109
http://www.lextranet.com
(617) 227-4469 Extension 228 [EMAIL PROTECTED]

THE INFORMATION IN THIS MESSAGE IS INTENDED ONLY FOR THE PERSONAL AND 
CONFIDENTIAL USE OF THE DESIGNATED RECIPIENTS NAMED ABOVE AND MAY CONTAIN 
LEGALLY PRIVILEGED INFORMATION. If the reader of this message is not the 
intended recipient or an agent responsible for delivering it to the intended 
recipient, you are hereby notified that you have received this document in 
error, and that any review, dissemination, distribution or copying of this 
message is strictly prohibited. If you have received this communication in 
error, please notify us immediately by telephone at 617-227-4469 Ext. 228.  
Thank you.



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to