Sunday, August 2, 2009

Perl Programming, Im trying to write a basic-ish perl program asking for customer details?

I am stuck on doing the 'customer title', how do i specify that a user must insert a certain input. ie. the %26lt;STDIN%26gt; must be Mr, Mrs, Ms, Miss..etc. I have tried putting the titles in an array, but cant call them to match the %26lt;STDIN%26gt;. I no this may seem a bit vague as i am very new to perl but any help would be VERY grateful.


Thanks

Perl Programming, Im trying to write a basic-ish perl program asking for customer details?
maybe a regular expression will help.





while(%26lt;STDIN%26gt;){


print /^(Mr.|Mrs.|Ms.)/ ? 'ok' : 'NOT OK', ' - ';


print $_;


};


No comments:

Post a Comment