Order of operations!

2001-10-30 Thread Matthew Blacklow
Below is some perl code which works fine when executed locally, however when I telnet to the system it is on and and it is run things are not run in the correct order. In fact it skips the first system call all together. Any suggestions on how to fix this? #!/usr/bin/perl $pid = getppid; print

logging out a user

2001-10-29 Thread Matthew Blacklow
Hi Guys, Got a bit of a conundrum here. I have a perl script that does various things for any user who runs it. What I need it to do is, at the end of the script, not only exit the script, but actually log that user out of their shell login on the box completely. Sounds like a weird thing to do,

RE: searching and capturing portions of text

2001-10-02 Thread Matthew Blacklow
$error_num = $1" doing. I know that it is storing something into error_num and suppossedly what i searched for but i dont follow it. Thanks, Matthew Blacklow >my $error_num; > >while(@output_arr) { > > if(/Error: (\d*)/) { $error_num = $1 } >} -- To unsubscribe, e-

searching and capturing portions of text

2001-10-02 Thread Matthew Blacklow
I need to know how to capture text from a string and place it into another variable. I have a program whose output i am able to capture into a variable and looks like the following: stuff i dont care about Error: 4 more stuff that doesn't matter what i need to do is store the number 4 in a varia

Capturing STDOUT of system launched process

2001-09-26 Thread Matthew Blacklow
I am writing a script at the moment which among others things creates another process using the system call. What I need to do is capture the screen output of this process into a string variable so that it can latter be manipulaterd. ie. capture the STDOUT. Any help, suggestions or sample code wo