Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by Giorgio C (Novice)
on Jan 30, 2012 at 12:03 UTC ( #950754=note: print w/replies, xml ) Need Help??


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

Thanks but in this way i need to know before what is "datafile.name". I wanted instead that this would be the $open variable called with the get_open( that show all my directories). chosed a file with get open in my dir and on that working the get statistic command: get_open => $open => get_statistics on $open Is there a really way ?
  • Comment on Re^6: Perl tk - How to integrate external scripts

Replies are listed 'Best First'.
Re^7: Perl tk - How to integrate external scripts
by chessgui (Scribe) on Jan 30, 2012 at 13:45 UTC
    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://950754]
help
Chatterbox?
[1nickt]: ...modern car. Suggests using TLA+ or other software modeling language to autogenerate code.
1nickt is not sure more and more layers separating the programmer from the program is the right way to go...
[holli]: happy one, shmem ;)
[1nickt]: I had an interview couople of weeks ago, heard from a principal engineer that a friend of his who works at The Google told him that the self-teaching software that determines the dynamic pricing for their adverts...
[1nickt]: ... has become so complex that there is no one at the Goole who knows what it does.
[marto]: William Gibson was right
[moritz]: a classical problem with machine learning
[1nickt]: moritz isn;t the difference today that the machine learning algos are in charge of most stuffs?
[moritz]: depends on what you mean by "most stuff"
[1nickt]: I am sure I don't know about most of the stuff that is no longer controlled by humans. I do know that it's past the point of determining consumer pricing and into things that can kill me with blunt force!

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2017-11-21 13:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (301 votes). Check out past polls.

    Notices?