Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Backticks and newlines...

by Rhose (Priest)
on Sep 05, 2001 at 21:21 UTC ( #110362=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://110362]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2019-08-19 20:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?






    Results (141 votes). Check out past polls.

    Notices?