FILEHANDLE question on AIX machine

2006-03-03 Thread Families Laws
I have to maintain a perl script, and encounter the following section: can anyone help me to understand what is the purpose of ". 2>&1 |" ? This is a AIX machine. Thanks. unless (@errors) { open(FILEHANDLE, "$PATH_TO_WSADMIN -f $tmpFile ". ' 2>&1 |'); while () { if

how to change directory in AIX in Perl ?

2002-01-07 Thread Families Laws
I tried to do a change directory and then do a tar of the directory: My program: system("cd /usr/apps"); system("tar -cf tarfile.tar DDA/*"); It looks like the cd command does not work ? Thanks in advance. __ Do You Yahoo!? Send FREE video

Issue Unix command in Perl and get back the result

2002-01-02 Thread Families Laws
The Unix command is: `cp -ip $file1 $file2`. I needed to know if the cp operation is successful. I tried $result = `cp -ip $file1 $file2`; $result does not contain any value after the execution even when $file1 does not exist. How can I find out if the 'cp' operation is successful or not ? Thank

How to use reg-exp to parse

2001-11-01 Thread Families Laws
I have a character string that looks like: {/Node:sys1/Application:test appl/ /Node:sys1/Application:test app2/ /Node:sys2/Application:new name/ {/Node:sys2/Application:other name/ /Node:sys2/Application:other name2/ I cannot figure out how to write a reg-exp to parse them into strings such as:

How to parse a string with ..{..}..{..}..

2001-09-05 Thread Families Laws
I have a input string of ..{}..{..}..., I need to get the output in an array that contains only: {} {..} character strings. I tried: $instr1 = "111{first first}222 333{second}444"; $_ = $instr1; @outstr = m/{.+}/g; @outstr has a value of {first first}222 333{second}; I would li