Re: perl flawed or my fault



"paul" <betterdie@xxxxxxxxx> writes:

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


Really?

lawrence@hummer - /tmp % cat clpm
#!/usr/bin/perl
use strict;
use warnings;

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

my $note_whom = 'szmuzu\'mi';

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

print "$note_whom \n $otherthing \n";
lawrence@hummer - /tmp % perl clpm
singapore
paul

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - lawrenabae@xxxxxxxxxxxxx s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them into the correct order.
.



Relevant Pages

  • Re: perl flawed or my fault
    ... John W. Krahn wrote: ... use strict; ... The result is: singapore ... to $otherthing. ...
    (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: 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)
  • Re: Is Singapore to boring ?
    ... million tourist spent less than 2 days here! ... In addition, due to the relax control on media industry by their authorities, cable and satellite TV programme are cheap and plentiful 24 hours a day, and there are also many different kinds of newspapers and magazines available to him to read, including many foreign publications and newspapers not allowed to be sold in Singapore. ... He also said whatever Singapore entertainment industry provided to locals and foreigners here, in his own country, it is much more exciting and vibrant than what Singapore have at the moment. ... But he constantly feel Singapore is a little too strict and restrictive, too many fines, too many rules and regulations, and constant heavy punishment for small crimes shown in the press that his country justice system would never take action to that extend, such as jail or caning by Singapore government. ...
    (soc.culture.singapore)