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 strongm 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. gkmccone

    What are the valid resource options names for Tk Widgets

    I was wondering where one finds the names for the X resource options available for a Tk widget. I just recently discovered Tk::CmdLine ( it is amazing what you find when that the time to read the documentation ) and want to modify all my scripts to make use of it ( remove all the hardcoded calls...
  2. gkmccone

    how to bind to specific nic for udp send

    I am starting with the simplest case, $self->{Bind} has the four octet ipaddress assigned to the card as a string value, i.e. XXX.XXX.XXX.XXX. I am passing it a string since the IO::Socket::INET module passes it through pack_sockaddr_in before passing it up to IO::Socket::bind
  3. gkmccone

    how to bind to specific nic for udp send

    I have a mahine that has two nic cards in it that sit on two different LANs. I am trying to send upd messages to one of the LANs but not the other. I am using the following code fragment to create the socket. $self->{udpSocket} = IO::Socket::INET->new( Proto => 'udp'...
  4. gkmccone

    How to know user accessing page when using auth

    I am using Apache's basic authorization method, but I would like to know from within my cgi scripts which user is accessing the page, not their client IP address. Is this information available in any fashion within Apache 1.3.27?
  5. gkmccone

    How to set guid bit on a dir/file within perl

    Boy do I feel dumb. I knew that using chmod( '2755', @files) would cause problems, so I was calling it as chmod( 2755, @files ), but since I didn't have the leading zero, Perl was interpreting 2755 as a decimal instead of octal. Thanks again,
  6. gkmccone

    How to set guid bit on a dir/file within perl

    I am trying to set the guid bit on a bunch of files within a perl script that performs my software install. I have tried using the Perl chmod with 2755 as the permissions, but this seems to completly confuse chmod as the permission on the dir looks like "d-ws----wt". I was hoping to...
  7. gkmccone

    chgrp in perl??

    Without doing a system call from Perl, does anyone know how to change the group permissions on a file/dir? If there is a method, does anyone know if it will work for "nix" and Win32?
  8. gkmccone

    Loading Module using scalar variable

    Don't have time to write a complete reply, but you must use the "require" command for any dynamic module loading. The "use" is evaluated at compile time and thus must be static.
  9. gkmccone

    Finding Installed Modules

    I know someone posted a very nifty way of finding out what modules are installed on a system. It even reported the version of the module that was installed. I need to audit my system and this sure seemed to way to do it.
  10. gkmccone

    Perl fork() zombie problems.

    I took this right out of perldoc. You can read it in its entirty by typing "perldoc -f fork" on your command line. From perldoc:::::::: If you "fork" without ever waiting on your children, you will accumulate zombies. On some systems, you can avoid this by setting...
  11. gkmccone

    redirecting default STDOUT for system() calls

    Hey, thanks for the reply. It works when you directly open STDERR or STDOUT using: open(STDOUT, "> logfile"); but doing a open(LOG, "> logfile"); *STDOUT = *LOG; doesn't, and I don't upderstand how they differ. Maybe the key lies in the depths of perldoc. I'll give it a...
  12. gkmccone

    reading directories

    This probably isn't the slickest implemenation but it works: $dir = "/home/gmccone/"; opendir( DIRS, $dir ); foreach $dirEntry ( readdir DIRS ) { push( @subDirs, $dirEntry ) if -d ($dir . $dirEntry); } closedir DIRS; printf "Subdirectories:\n %s" , "@subDirs&quot...
  13. gkmccone

    finding who owns a file in unix

    This works on a solaris box, so I am guessing it will work on all Unix like boxes. It doesn't seem to work on NT ($ownerid, $groupid) = (stat( "/home/gmccone" ))[4,5]; $ownerName = getpwuid($ownerid); $groupName = getgrgid($groupid); print "owner: $ownerName , group...
  14. gkmccone

    redirecting default STDOUT for system() calls

    OK, I want to redirect all the STDOUT of a system( cmd ) to a log file. Now I know you are saying, "Hey thats simple, just use a redirection metacaracter in the system() call, like system( cmd > /dir/logFile).", but what if your system doesn't support those shell metacaracter...
  15. gkmccone

    problem with return status from system

    Turns out that I left out a "use" line from my posted sample script. When testing this problem I had a: "use Schedule::Cron;" line at the very end of the script. For some reason when I "use" this Module from CPAN on a solaris system it causes all return statuses...
  16. gkmccone

    problem with return status from system

    I am trying to make a system call and capture the return status of the process that completed from the system call. Problem is that everything is reporting -1 as the return status. I executed the command line from csh and checked the status with "echo $status" and it returns 0...
  17. gkmccone

    Can I unset -show for Tk::Entry once set

    Trying to make an Entry widget for password entry. Most of the time a password is needed by at times it is not. I default the Entry box to -show => '*', but when I run across a case where a password is not needed I want to place text in the Entry widget and disable it so it is not editable...

Part and Inventory Search

Back
Top