[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Please don't Laugh at me...



At this point, this is just to prove to myself that I DO know what I'm 
talking about, mind you:

#!perl -w

use strict;
my($input);

print 'Please type something: '; 

$input = <STDIN>;

chomp($input);

if ($input =~ /^pauline$/i) {
    print "Hola amigo\n";
   }
   else
   {  
   print "I don't know you\n";
}

__END__

This does it ALL!  It chomps the input.  It matches "Pauline", "pauline", 
"PAULINE" or even "PaUlInE" and "pAuLiNe", or any combination "pauline" 
in any case, but nothing else.  It insists that the input begin with 
Pauline and end with Pauline.  It (for example) doesn't know 
SaintPaulInEphesus! It's a fairly good match to what's laid out in 
perstyle.pod.  It slices. It dices. It even makes julienne fries! It's an 
adorable shade of mauve (because I routinely set my default text 
background to interesting pastels in BBEdit!). I will have to order out 
for the willow switch.  It's been a slow day.  ;-)

Jorge:  If you're still there, consider the problem well and truly SOLVED!

--B

# Fungal Parataxonomy                   Mycology Information (Mycoinfo)
# Webmaster, Staff Writer      **The World's First Mycology E-Journal**   
# <mailto:webmaster@mycoinfo.com>            <http://www.mycoinfo.com/> 
#
# First they ignore you. Then they laugh at you. Then they fight you.
# Then you win.                                     --Mohandas Gandhi


===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org