Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Comment on

( #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);
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

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

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [Discipulus]: good morning nuns and monks, even if rainy

    How do I use this? | Other CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (7)
    As of 2018-03-19 07:58 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (236 votes). Check out past polls.