Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^7: Perl tk - How to integrate external scripts

by chessgui (Scribe)
on Jan 30, 2012 at 13:45 UTC ( #950771=note: print w/ replies, xml ) Need Help??


in reply to Re^6: Perl tk - How to integrate external scripts
in thread Perl tk - How to integrate external scripts

Make $open a global variable and use it instead of 'datafile.name':

-command => [ \&get_statistics , $open ]
Variables are global by default - if you don't understand this just take care never to declare it with 'my' ( don't write "my $open='foo';" just "$open='foo';" ). Set the value for $open with your file selection widget and the bind will call the get_statistics routine with the appropriate value ('value of the $open global variable at the time of the button click') as an argument for you.


Comment on Re^7: Perl tk - How to integrate external scripts
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-07-26 09:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls