in reply to Return a string to Unix Script

In a Perl script called, say, perl_test:

#!/usr/bin/perl -w use strict; print 'here is an output string';

In a shell script called, say, call_perl:

#!/bin/sh output = `perl_test` echo $output

Does that help?

--
<http://www.dave.org.uk>

Perl Training in the UK <http://www.iterative-software.com>

Replies are listed 'Best First'.
Re: Re: Return a string to Unix Script
by GroundZero (Initiate) on Sep 06, 2001 at 04:26 UTC
    Just to note the backQuote( Usually found on the ~ key ) chars in Unix shells cause the command to be executed. I just added this for extra clarity as it may be hard to see the difference on the screen.
      ( Usually found on the ~ key )

      Perhaps in America and UK, but for the rest of the keyboard-world usually somewhere else. :-)