[linux-l] perl CPAN
Olaf Radicke
olaf_rad at gmx.de
Fr Feb 8 00:03:43 CET 2002
On Thu, Feb 07, 2002 at 01:46:35PM +0100, Volker Kroll wrote:
> Am Don, 2002-02-07 um 14.21 schrieb Olaf Radicke:
> > #! /usr/bin/perl -w
> >
> > use strict;
> > use Tk;
> > use diagnostics;
> >
> > my $mw =MainWindow->new;
> >
> > my $t = $mw->Text()->pack();
> > my $taste = $mw->Button(-text => "Shitt!",
> > -command => [sub { $t->icursor('end')}]
> > )->pack();
> > MainLoop();
>
> Wo ich das gerade sehe. Kann es sein, daß die Syntax für -command
> nicht ganz richtig ist?
> Probier doch mal:
> my $taste = $mw->Button(-text => "Shitt!",
> -command => \&test
> )->pack();
>
> sub test {
> $t->icursor('end');
> }
>
> Nachher schau ich mal genauer.
>
...Das ist gehoppst, wie gesprung (mit anderen
Worten: das Selbe).
Mehr Informationen über die Mailingliste linux-l