Manfred Lotz schreef:
> What I actually want is to write a script where I call system commands
> which I want to specify as strings and I don't want to escape
> backslashes etc in the command string. That's why q() would be fine.
>
> On the other hand I like to have Perl variables in the command string
> which I want to have evaluated before issuing the system command.
> Which makes q() a nogo.
>
>
> Example:
>
> my $DRYRUN="--dry-run";
> my $cmd = q(rsync $DRYRUN -avh \
> -exclude bla1 \
> -exclude bla2 \
> src tgtdir
> };
>
>
> system($cmd);
>
>
> I would be happy if all occurences of simple vars ($v, $a_b etc.)
> would be evaluated. More complex stuff like $h{$key} would be nice
> but isn't really that important to have.
See `perldoc -f system`, and pay attention to the word "LIST" in there.
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/