in reply to system() and backticks question

I frequently use Perl scripts with Oracle's SQL*Plus (please don't ask... DBI/DBD is out in this situation... *Grins*) Anyway, here is a sample foreach loop I use to process the output from the Unix SQL*Plus.

foreach (split(/\n/,`$_SQLPLUS -silent /nolog \@$_TMPSCRIPT`)) { #-- Stuff }

This code executes a temporary SQL script with SQL*Plus, splits the output based on a newline, and processes each line (one at a time) as $_.

What I am trying to show is that newlines *ARE* preserved with backticks.

Replies are listed 'Best First'.
Re: Backticks and newlines...
by Jerry (Scribe) on Sep 05, 2001 at 22:03 UTC