perl flawed or my fault



Hello all,

please help me the check the following code

use strict;

my $something = 'phal';
my $otherthing = 'paul';

my $note_whom = 'szmuzu\'mi';

defined($something) ? $note_whom = $something : $otherthing =
'singapore';

print "$note_whom \n $otherthing \n";

The result is: singapore
singapore

I don't know why the scalar $note_whom get the value that is assigned
to $otherthing.

Please give me the explaination, and thank you.

.



Relevant Pages

  • Re: perl flawed or my fault
    ... use strict; ... my $otherthing = 'paul'; ... The result is: singapore ... sort them into the correct order. ...
    (comp.lang.perl.misc)
  • Re: perl flawed or my fault
    ... paul wrote: ... use strict; ... The result is: singapore ... to $otherthing. ...
    (comp.lang.perl.misc)
  • Re: perl flawed or my fault
    ... paul wrote: ... The result is: singapore ... to $otherthing. ... use strict 'refs'; ...
    (comp.lang.perl.misc)
  • Re: perl flawed or my fault
    ... John W. Krahn wrote: ... use strict; ... The result is: singapore ... to $otherthing. ...
    (comp.lang.perl.misc)
  • Re: Is Singapore to boring ?
    ... s'pore isn't really boring as such to many foreigners. ... >>>and newspapers not allowed to be sold in Singapore. ... >>>But he constantly feel Singapore is a little too strict and restrictive, ...
    (soc.culture.singapore)