Ok, so I'm trying to make my own markup language [for a class, I know it's dumb] and I'm having a lot of trouble getting it run. It seems to get stuck (just pauses and I assume is caught in a loop.) as soon as I add the text that causes the arraySplitter function to be called. I can provide information and output if you'd like. This seems like a simple error, as I am rather new to perl.
#JokeCode -> HTML
use strict;
use warnings;
use Getopt::Std;
my %opts=();
theFunctionThatActuallyParsesTheNonsense($opts{i});
my $questionCounter;
my $tempVar;
my @arrayForSplit;
my @goodArray;
my $curLine;
sub theFunctionThatActuallyParsesTheNonsense
{
my $outputF = $_[0];
$questionCounter= 0;
while (<LINES>)
{
      $curLine= $_;
        if($curLine =~ m/&&url/)
    {
        @arrayForSplit = split(/ /,$_);
        $curLine =~ s/$arrayForSplit[1]//;
        $curLine =~ s/$arrayForSplit[2]//;
        $curLine =~ s/&&url/<a href="$arrayForSplit[1]">$arrayForSplit[2]/;
        $curLine =~ s/url&&/<\/a>/;
        print @arrayForSplit;
    }
    $curLine =~ s/\&\&b /<b>/;
    $curLine =~ s/ b\&\&/<\/b>/;
    $curLine =~ s/&&i /<i>/;
    $curLine =~ s/ i&&/<\/i>/;
    $curLine =~ s/&&u /<u>/;
    $curLine =~ s/ u&&/<\/u>/;
    $curLine =~ s/&&tt/<tt>/;
    $curLine =~ s/tt&&/<\/tt>/;
    $curLine =~ s/&&grn/<span style="color:#00ff00">/;
    $curLine =~ s/grn&&/<\/span>/;
    $curLine =~ s/&&red/<span style="color:#ff0000">/;
    $curLine =~ s/red&&/<\/span>/;
    $curLine =~ s/&&blu/<span style="color:#0000ff">/;
    $curLine =~ s/blu&&/<\/span>/;
    $curLine =~ s/&&ex/<pre class="code">/;
    $curLine =~ s/ex&&/<\/pre>/;
    if($curLine =~  m/&&tf/)
    {
        $curLine =~ s/&&tf/<form><br><input type="text" name="$questionCounter"><\/form>/;
        $curLine =~ s/tf&&//;
        $questionCounter++;
    }
    print "even here?";
    if($curLine =~ m/&&mc/)
    {
        print "How bout now?";
        @goodArray = arraySplitter($curLine);
        foreach (@goodArray)
        {
            $curLine =~ s/&&mc/<input type="radio" name="$questionCounter" value="$_"> $_ <br>/;
        }
        $curLine =~ s/&&mc/<br>/;
        $curLine =~ s/mc&&/<input type="radio" name="questionCounter" style="display: none;"\/>/;
        $questionCounter++;
    }   
    print OUT $curLine;
    print OUT "\n";
}
sub arraySplitter
{
print "Are you still there?";
my @retArray;
my $arrayPlace = 0;
my @mcArray = split(/ /,$_[0]);
print @mcArray;
    if(scalar(@mcArray)-1 < 1)
    {
    print "The size of the array is 0";
    exit 1;
    }
while ($arrayPlace < scalar(@mcArray)-1)
{
    $retArray[$arrayPlace] = $mcArray[$arrayPlace];
}
print @retArray;
return @retArray;
}
}
 
    