perlquestion
Anonymous Monk
<p>Hello Monks,</p>
<p>I am pretty new to Perl. Kindly answer me if any of you can... :)</p>
<p>I have 2 questions today,</p>
<p>Question #1:</p>
<code>
$check = "a";
$check++;
print $check;
exit;</code>
<p> </p>
<p>This will give me answer as "b", but what should i do to get "d" or "e" (I mean to pass over 3 or 4 alphabets).</p>
<hr/>
<p>Question #2:</p>
<p>I have a string which have 2 alphabets, I need to trim it to 1 alphabet, ie, I only want the right alphabet, the left one should be trimmed out.</p>
<p>Example</p>
<code>
$input= "ab";
$output = "b";</code>
<p> The alphabets can be any, not just "ab", it can be "cd" or "sp", In that case output should be "d" & "p" resp.</p>
<p>Thank you, Monks.</p>
9