How do I use Perl to parse the output of the sqlplus command?
- by benjamin button
I have an SQL file which will give me an output like below:
10|1
10|2
10|3
11|2
11|4
.
.
.
I am using this in a Perl script like below:
my @tmp_cycledef = `sqlplus -s $connstr \@DLCycleState.sql`;
after this above statement, since @tmp_cycledef has all the output of the SQL query,
I want to show the output as:
10 1,2,3
11 2,4
How could I do this using Perl?