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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  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 =)
  16. kordaff

    Display line by line - desperate

    Try this: open(GFILE,"<$config{'basepath'}/games/games.txt"); while(<GFILE>) { print } close(GFILE);
  17. kordaff

    Check local UNIX inactive logins

    How about a file with hosts you want to run this on named hosts.txt. Then do this: for i in in `cat hosts.txt` do ssh $i ~/find-inactive # where find-inactive is the script # that you're using which is installed at ~/ on each host # in that hosts.txt file done I've used something...
  18. kordaff

    rc=65535

    Do you have a sort() operation earlier in your program? Aren't $a and $b reserved for sort() operations? Might be changing in that sort, if there is one...
  19. kordaff

    issue a sudo command inside a automated SSH session

    Since your RSA key is installed for the user you wish to sudo to, you could try something like this: $HOST="myhost.com" $USER="anotherUser" ssh $HOST <<END_SCRIPT_PART1 mv testfile.pl /tmp exit END_SCRIPT_PART1 ssh -l $USER $HOST <<END_SCRIPT_PART1 # sudo -H -u anotherUser bash cd...
  20. kordaff

    Pgre DB Crashes consistently

    Have you tested it with Perl using DBD::Pg/DBI to see if it have the same type of crash as JBoss? There is a new version of postgresql out now, 8.1. It may be a recent bug fix there. What sort of table structure / query fingerprint are we talking about? What's the insert to query ratio...

Part and Inventory Search

Back
Top