The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
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
[Originally posted by leegold]

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

Undefined subroutine &main::get_price_input called at line 19.

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

$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