Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Syntax error using Tk

by benn (Priest)
on Feb 16, 2004 at 15:54 UTC ( #329333=note: print w/ replies, xml ) Need Help??


in reply to Syntax error using Tk

Just a quick addendum to the fine answers given above...

I think it would have been helpful for you to try to eliminate the Tk aspect, at which point you may have spotted that the problem was (as Perl told you) a basic syntax error, and nothing to do with Tk itself. As you knew that the error was in line 17, cutting and pasting the relevant code portion into another file (or simply commenting out the surrounding bits) would have given you...

my @buttons = ( '9','8','7','6','5','4','3','2','1','0'); for (my $i = 9; $i >= 0; $i--) { my $button{$i} = $buttons[$i]; # for instance }
...which would produce the same syntax error, but would be easier to disect. In addition, playing with just this portion of the code may give you ideas on other ways of producing the results you require. (For instance, it's possible to eliminate the @buttons array completely, should you wish...)

Cheers,
Ben.


Comment on Re: Syntax error using Tk
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://329333]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2014-09-18 17:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (120 votes), past polls