Hoffmann schreef:
> Could some one explain how, in the example below, $name and $goodguy
> are equal numerically?
> 
> $name = 'Markkkk';
> 
> $goodguy = 'Tony';
> 
> if ($name == $goodguy) {
>         print "Hello, Sir.\n";
> } else {
>         print "Begone, evil peon!\n";
> }

Try also with something like 

#!/usr/bin/perl
  use strict;
  use warnings;

  my $name    = '1Markkkk';
  my $goodguy = '2Tony';


  if ($name eq $goodguy) {
      print "Hello, Friend.\n";
  }
  elsif ($name == $goodguy) {
      print "Hello, Anyone.\n";
  }
  else {
      print "Begone, evil peon!\n";
  }

__END__

-- 
Affijn, Ruud

"Gewoon is een tijger."

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


Reply via email to