hodag has asked for the wisdom of the Perl Monks concerning the following question:
I can execute it from the command line just fine...foo() { print $1 }
However if I try and execute it from within Perl...% foo bar %bar
Here's what I get...#!/usr/bin/perl -w $foo=`foo bar`; print $foo;
I've tried using "system" and "qx" rather than bacticks but to no avail.%foo.pl Can't exec "foo": Permission denied at x.pl line 3. Use of uninitialized value in print at x.pl line 4.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Executing ksh function from within perl script
by nardo (Friar) on Apr 07, 2001 at 03:52 UTC |