Re: [Boston.pm] Variable used only once warning

2004-06-07 Thread Ron Newman
>$grand_total += total1; >$grand_total += total2; >$grand_total += total3; >$grnad_total += total4; > ^^^ > >$grnad_total is used only once and is most likely a tupo. "use strict" should complain about that, even without warnings turned on. Assuming that you never declared $grnad_total, of c

Re: [Boston.pm] Variable used only once warning

2004-06-07 Thread Uri Guttman
> "RN" == Ranga Nathan <[EMAIL PROTECTED]> writes: RN> I keep getting bogus messages like: RN> Name "ams::uscs_trailer_out" used only once: possible typo at RN> /local/bax/test/uscs_client.pl line 137. RN> Name "ams::uscs_header_out" used only once: possible typo at RN> /local/bax/

Re: [Boston.pm] Variable used only once warning

2004-06-07 Thread Kripa Sundar
Dear Chris, > If you define a variable & use it only once, the compiler will complain. No, it won't. At least not the perl "compiler". For perl, an assignment (== definition) is also a use. =begin repeated_example --\/BEGIN-\/-- % perl -

Re: [Boston.pm] Variable used only once warning

2004-06-07 Thread John Saylor
hi ( 04.06.07 13:35 -0700 ) Ranga Nathan: > But why should the compiler care if I used a variable only once? Why does > it suspect it as a typo? I think I need to do something here to satisfy > the compiler. But I am not sure what it is! perldoc perllexwarn -- \js "don't panic" _

Re: [Boston.pm] Variable used only once warning

2004-06-07 Thread Tim Cwik
The compiler doesn't but it thinks you do :-) $grand_total += total1; $grand_total += total2; $grand_total += total3; $grnad_total += total4; ^^^ $grnad_total is used only once and is most likely a tupo. On 2004.06.07 16:35, Ranga Nathan wrote: But why should the compiler care if I used a varia

Re: [Boston.pm] Variable used only once warning

2004-06-07 Thread Chris Devers
On Mon, 7 Jun 2004, Ranga Nathan wrote: But why should the compiler care if I used a variable only once? Because the rest of your program may have $foobar 42 times, but this one line has $foobaz, and the compiler can't be sure that that's a mistake, but chances aren't bad that that odd one out ma

Re: [Boston.pm] Variable used only once warning

2004-06-07 Thread Kripa Sundar
Dear Mike, > To "use a variable" means to have it on the RHS, usually. LHS only counts > as defining it. In computer science, yes. In perl (surprise!) no. --\/BEGIN-\/-- % perl -lwe '$x = "hi";' Name "main::x" used only once: possible typ

Re: [Boston.pm] Variable used only once warning

2004-06-07 Thread Ranga Nathan
But why should the compiler care if I used a variable only once? Why does it suspect it as a typo? I think I need to do something here to satisfy the compiler. But I am not sure what it is! BTW Mike, are you going to YAPC? Mike Burns <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 06/07/2004

Re: [Boston.pm] Variable used only once warning

2004-06-07 Thread Mike Burns
--- Ranga Nathan mumbled on 2004-06-07 11.49.43 -0700 --- > I keep getting bogus messages like: > Name "ams::uscs_trailer_out" used only once: possible typo at > /local/bax/test/uscs_client.pl line 137. > Name "ams::uscs_header_out" used only once: possible typo at > /local/bax/test/uscs_client.p

[Boston.pm] Variable used only once warning

2004-06-07 Thread Ranga Nathan
I keep getting bogus messages like: Name "ams::uscs_trailer_out" used only once: possible typo at /local/bax/test/uscs_client.pl line 137. Name "ams::uscs_header_out" used only once: possible typo at /local/bax/test/uscs_client.pl line 137. even though I have: package ams; .. our $SOH = chr(