chris01010
Programmer
Hi,
I have a PERL script which executes a script which interrogates a database on another server and produces an output file (an example of this is at the bottom). Of this file I only want a section of the data, from USER until the last number. I have written the code below but when run it doesn't return anything.
Any ideas?
Code:
Output:
Pseudo-terminal will not be allocated because stdin is not a terminal.
mesg: cannot stat
SQL*Plus: Release 11.2.0.2.0 Production on Tue Nov 22 16:40:51 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> SQL> SQL> SQL> 2 3 4 5 6 7
USER OPERATOR CURRENTSESSIONID LASTOUTBOUNDSEQ LASTOUTBOUNDACKED
----------- -------- ---------------- --------------- -----------------
AAAAAAAA OP1 0 27427 22776
BBBBBBBB OP2 0 556006 555361
CCCCCCCC OP3 0 13291 10955
DDDDDDDD OP4 202200 16354418 16353714
EEEEEEEE OP5 0 1685781 1550961
FFFFFFFF OP6 0 3 0
GGGGGGGG OP7 202182 2692535 2692507
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
I'm new to PERL so any help would be greatly appreciated.
I have a PERL script which executes a script which interrogates a database on another server and produces an output file (an example of this is at the bottom). Of this file I only want a section of the data, from USER until the last number. I have written the code below but when run it doesn't return anything.
Any ideas?
Code:
Code:
undef $/;
$_ = <>;
$var = /^USER.*/;
print "$var";
Output:
Pseudo-terminal will not be allocated because stdin is not a terminal.
mesg: cannot stat
SQL*Plus: Release 11.2.0.2.0 Production on Tue Nov 22 16:40:51 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> SQL> SQL> SQL> 2 3 4 5 6 7
USER OPERATOR CURRENTSESSIONID LASTOUTBOUNDSEQ LASTOUTBOUNDACKED
----------- -------- ---------------- --------------- -----------------
AAAAAAAA OP1 0 27427 22776
BBBBBBBB OP2 0 556006 555361
CCCCCCCC OP3 0 13291 10955
DDDDDDDD OP4 202200 16354418 16353714
EEEEEEEE OP5 0 1685781 1550961
FFFFFFFF OP6 0 3 0
GGGGGGGG OP7 202182 2692535 2692507
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
I'm new to PERL so any help would be greatly appreciated.