Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by kordaff

  1. kordaff

    TK - How to update Window automatically

    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 }
  2. kordaff

    perk/tk text area

    Your subroutine never returns to the Tk event loop. You'll need to add $mw->update; inside the while loop to refresh the text widget. -- Kordaff
  3. kordaff

    Start Tk-application with window maximized

    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
  4. kordaff

    newbie perl ldap question

    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...
  5. kordaff

    Asynchronous Callback Web Services in Perl

    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
  6. kordaff

    Asynchronous Callback Web Services in Perl

    Have you looked at CGI::Ajax? Kordaff
  7. kordaff

    Sound in perl?

    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...
  8. kordaff

    perl newbie trying to get just one word

    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
  9. kordaff

    Sound in perl?

    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
  10. kordaff

    About Class::ObjectTemplate

    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...
  11. kordaff

    Can't open writable file in append mode

    Hmm, /tmp frequently is setup on its own partition. Hitting a quota limit on the web directory's partition?
  12. kordaff

    Can't open writable file in append mode

    Yeah, it's possible that the filesystem is full. #!/usr/bin/perl print "Content-type: text/html\n\n"; print `df`;
  13. kordaff

    Can't open writable file in append mode

    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...
  14. kordaff

    Can't open writable file in append mode

    What are the permissions on /var/www/cgi-bin itself?
  15. kordaff

    Function to return the next number

    After a while, they all sound like school assignments =)

Part and Inventory Search

Back
Top