import-bot (20211) [Avatar] Offline
#1
Re: pg. 28 example code - curly brackets
[Originally posted by leegold]

I see, it'd help if I used curly brackets in the sub.
I think { vs. ( is a little hard to tell w/some fonts.
Works fine now.
import-bot (20211) [Avatar] Offline
#2
[Originally posted by leegold]

Hi,
If anyone could help. Thanks.
When I run tax_calc I get the error message:

A:>perl tax_calc.pl
Undefined subroutine &main::get_price_input called at tax_calc.pl line 19.

And here's what i typed, line 19 to the prog. end:

.....snip.....
$price = get_price_input();
$sales_tax = int ( $sales_tax_rate * $price );
$total_price = ($price + $sales_tax ) / 100;

print "Total price is $total_price
";

sub get_price_input (
return 1015; # dummy function for example only
)