Perl and web pages

I would like to make a web page with perl.
In this page I want to include a table with results.
So First I want to create the procedures
I create a file.pl wich includes 3 generic procedures.

sub Create_table
sub Create_line
sub Close_table

example
Create_table(2,50)

$NL="<P>\n";

sub create_table {
    local($border,$ancho)=@_;
    print "<table border=\"$border\"  width=\"$ancho%\"> ";    
print "$NL";
}

Create_line(50,Hello)

sub create_line {
    local($ancho,$texto)=@_;
    print "<tr>\n";
    print "<td width=\"$ancho\%">$texto</td>\n";
    print "</tr>\n";
}

sub close_table {
    print "</table>";
print "$NL";
}

This Sub doen't works because of the " character, can antybody tell me how to correct this code.
LVL 1
PampaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

spiegeiCommented:
Just a couple suggestions.

Make sure that you are calling the subs in the same case. I think this could prevent it from being recognized.

so if the sub is sub create_line

call it with create_line() not Create_line()

Perhaps make sure to call the function after it is defined.

Try
                sub create_line {
                    local($ancho,$texto)=@_;
                    print "<tr>\n";
                    print "<td width=\"$ancho\%">$texto</td>\n";
                    print "</tr>\n";
                }

create_line(50,Hello)

Good Luck.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ozoCommented:
create_line(50,"Hello");
sub create_line {
    local($ancho,$texto)=@_;
    print "<tr>\n";
    print "<td width=\"$ancho%\">$texto</td>\n";
}
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Perl

From novice to tech pro — start learning today.