in reply to passing arguments to a shell script in a here document passed to system() ?
Or more generic :#! /usr/bin/perl sub whatever { my ($arg1,$arg2)=@_; system << "ARGS" . <<'SCRIPT'; if [ -n "$arg1" ] then set $arg1 $arg2 fi ARGS date echo "what about this?" echo $1 $2 SCRIPT } whatever $ARGV[0], $ARGV[1];
#! /usr/bin/perl sub whatever { system << "ARGS" . <<'SCRIPT'; if [ -n "@_" ] then set @_ fi ARGS date echo "what about this?" echo $* SCRIPT } whatever @ARGV;
|
|---|