Look at perldoc Tk::after. You can set up a callback to draw the line every few seconds in a subroutine.
my $id = $c1->repeat( 2500, \&draw_line );
MainLoop;
sub draw_line
{
# put the line drawing code here
}
After looking on perlmonks and in the PerlFAQ, i came up with this to force the geometry (works for windowsXP)
#!/usr/bin/perl
use Tk;
my $m=new MainWindow();
my $h=$m->screenheight();
my $w=$m->screenwidth();
$m->geometry($w."x$h+0+0" );
MainLoop;
Heh, fits in a twitter post even.
Kordaff
my $DISTNAME
= 'cn=admin,ou=unit,o=organisation,l=locality,c=country';
open (FILE, "dn") or die "File open failed: $!\n";
while (<FILE>)
{
chomp;
$result = $ldap->modify( $DISTNAME,
add => {uniqueMember => $_} );
$result->code &&
warn "failed to modify entry...
Note: you'll need to get http://search.cpan.org/CPAN/authors/id/B/BC/BCT/CGI-Ajax-0.701.tar.gz to see all the example scripts if you use Windows, as they don't seem to be installed under the version that ppm installs.
Kordaff
If you remember that Tk is not spelled 'use TK;' then you can use Win32::Sound in a not really less trivial example like this:
use strict;
use Tk;
use Win32::Sound;
my $sound="tada.wav";
my $timer_id;
my $mw=new MainWindow();
my %row1=(-side=>'left',-pady=>10,-padx=>10);
my...
True, but that is the difference between these snippets:
@a=(1,2,3);
if ( @a =~ /1/ ) {print "yes!!!\n"}
else {print "oh noes!!!\n"}
$a=[1,2,3];
if ( @$a[0] =~ /1/ ) {print "yes!!!\n"}
else {print "oh noes!!!\n"}
@a is the array, $a is the array ref. OP is missing ^ in regex...
Kordaff
This works on WinXP with last ActiveState(5.10.0, binary build 1002) that I installed:
use strict;
use Win32::Sound;
while()
{
Win32::Sound::Volume('100%');
Win32::Sound::Play("tada.wav");
Win32::Sound::Stop();
sleep 240;
}
Kordaff
The syntax for Class::ObjectTemplate may look different than most object code because that module uses anonymous arrays internally (keeping track of slots in the array emptied out thru deletions and reusing them) It has a nice long section in Advanced Perl Programming by Sriram Srinivasam...
As long as perl -c script isn't showing errors and nothing odd is showing up in the error_log, then it may be a virtual host config problem. Are you running cgi's under suexec? And are the user/group set correctly for the virtual host settings in httpd.conf? S'bout all I can think of at the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.