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. 1yura1

    open3() usage, need assist

    Hello, No the command axecutes fine, but error exit code (-1 or 255) is returned... But there is no reaseon for such ending...
  2. 1yura1

    open3() usage, need assist

    Hello, Yes, I'm using IPC::Open3. I wrote such code to be able to run different commands, pass them need data into STDIN, and store their STDOUT and STDERR. and exam various exit codes: sub _run { my $cmd = shift; # CMD to execute as plain string my $input = shift; # CMD STDIN data...
  3. 1yura1

    open3() usage, need assist

    Hello, Does anybody can assist me with open3()? It is require correct STDIN, STDOUT, STDERR, exit code, child process's manipulation, correct zombies cleanup, disable child(s) buzz Thanks in advance for your time and help. Best Regards
  4. 1yura1

    Versions comparator

    Hi all in the forum. Does anybody know any versions comparator perl module? For example, it is required to compare linux rpm packages versions. Thanks, Best Regards.
  5. 1yura1

    Open new Unix console session from perl script

    <Mike> Hi, no I'm running Linux. I konow that it has to be very simple.
  6. 1yura1

    Open new Unix console session from perl script

    Hello, I need to start/open new console session from my perl script, and allow user to run any commands (like as in usual Linux console). Thanks, Yura.
  7. 1yura1

    Export scalars with 'on fly' generated names

    OK, Thanks a lot. Best Regards. Yura.
  8. 1yura1

    Export scalars with 'on fly' generated names

    Hi Chessbot. Yes, exactly, are the same possible in Perl? Thanks, Yura.
  9. 1yura1

    Export scalars with 'on fly' generated names

    Hello, It is easier to work with imported scalars instead of hash ,,, And it is interesting for me if there is the way to do such export/import. Best Regards.
  10. 1yura1

    Export scalars with 'on fly' generated names

    Hello, Thanks for your replies. The issue is that I don't know hash keys/values, theirs number (in general). The hash is stored in XML, and has to be loaded from it. So I need dynamicly form @EXPORT_OK. But the script will import variables as you wrote by: use ModuleName qw($cat $grep $host)...
  11. 1yura1

    Export scalars with 'on fly' generated names

    Hi All. I have symple hash in module (ModuleName), for example: my %exec; $exec{'cat'} = '/bin/cat'; $exec{'grep'} = '/bin/grep'; $exec{'host'} = '/usr/bin/host'; I want module export scalars with 'on fly' generated (from this hash) names=hash keys, and scalars values=hash...
  12. 1yura1

    eval & rmtree

    Thanks for your help I found the same solution: { local $SIG{'__WARN__'} = sub { print $_[0]; }; eval { File::Path::rmtree($dir) }; } Best Regards. Yura.
  13. 1yura1

    eval & rmtree

    Hi all. I'm using the following structure in my perl script: eval { File::Path::rmtree($dir) }; if ($@) { do_somth(); } But sometimes, the script prints to STDOUT/STDERR following warnings/errors: Can't remove directory /some/dir: Directory not empty at script.pl line XXX It is required...
  14. 1yura1

    Compute date/time string to the corresponding time(2) value in seconds

    Hi All in forum, I need to compute/convert date/time string like: Tue Jul 6 06:24:29 EDT 2004 to the corresponding time(2) value in seconds since the system epoch, using standard Perl functions. Best Regards, Yura.
  15. 1yura1

    Child processes &quot;reaping&quot;

    Hello, I use 'system' to execute another programs. When executed processe fork another child processe(s), and this processe stop or not respond, 'system' not receive any signals from it. Then I need to write my own processes "reaper" for my second, third, ... level child processes. Does...
  16. 1yura1

    Set new environment variable for currient user sesion

    Thanks for help. Perl cannot change/set 'wide' system enviroment variables. The only way to do this for all new sesions - create exporting files/scripts for different shells and plase them into '/etc/profile.d/' (for Linux). Thanks again. Yura.
  17. 1yura1

    Set new environment variable for currient user sesion

    Hi All. I need to set new environment variable value (or change an old one), not for the running script fork, but for currient user sesion. Thanks, Yura.
  18. 1yura1

    use, require ?

    Hi Scotty The module get loaded (use, require) after the script modifies the config file, but when I use imported variables, Thay have old (not modefied) values? Thanks, Yura
  19. 1yura1

    use, require ?

    Hi all. I have the module Vars.pm, that parthes and exports some configuration variables: #!/usr/bin/perl -w package Module::Vars; require 5.004; require Exporter; use strict; use Exporter; BEGIN { use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); $VERSION = 0.1...
  20. 1yura1

    $? ($CHILD_ERROR) variable value

    Hi all in forum. In my perl script i try to examine $? variable value: --- system(&quot;&quot;); $exit_value = $? >> 8; if( $exit_value == 0 ){ ... } When I run the script from command line, $? returns correct value. But smth. goes wrong when the script is executed by cron (daemon to execute...

Part and Inventory Search

Back
Top