Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
In Russia, a middle name is always a father's name with gender endings. For instance, my father's name is Aleksandr, so my Father, hence middle, name is Aleksandrovich, on the other hand, if I was a girl, my father name would be Aleksandrovna. In addition to ovich and ovna endings, there is a variation evich, evna, depending on which name is used. This is just a fun brainstorm, so I, to be quick, only did ovich, ovna. In context with english names:
@Michael = ('Michaelovich', 'Michaelovna);
or
my @genderEnding = ('ovich', 'ovna'); my @genderType = ('Male', 'Female'); my $genderSelected = 1; my $fathersName = &promptConsole("What's your father's name"); my $gender = &promptConsole("What's your gender"); for my $gen (qw{m male man boy}){ $genderSelected = 0 if(lc($gender) eq $gen); } print "Since, you are $genderType[$genderSelected], your father (middl +e) name is $fathersName$genderEnding[$genderSelected]\n"; sub promptConsole{ print shift, ": "; my $in = <>; $in =~ s/[\r\n\cM]+$//; return $in; }
:)
Pardon me, I've wrote this script after voting without testing as a fun brainstorm :) and I've made a couple of bugs. People messaged me, saying that it's not working, so I've fixed it. I've misspelled sub call to $fathersName and I used <INPUT> instead of <>. I got it mixed up with an other programming language. I don't even remember which one, but here we go, the fixed version.

In reply to Re^2: Do you have a middle name? by igoryonya
in thread Do you have a middle name? by ambrus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-20 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found