in reply to perl equiv to cmd start
exec ('$myexe $myfile');
...
exec '""','$myexe','$myfile';
Judging by hippo's post, it seems you may already have abandoned your post. If not, you should realize that single-quotes do not interpolate scalars (update: or anything else). E.g.,:
Please see Quote and Quote-like Operators in perlop.c:\@Work\Perl\monks>perl -wMstrict -le "my $myexe = 'foo'; my $myfile = 'bar'; ;; my $string = '$myexe $myfile'; print qq{>$string<}; " >$myexe $myfile<
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl equiv to cmd start
by enrgyxprt (Acolyte) on Jan 17, 2017 at 20:16 UTC | |
by soonix (Chancellor) on Jan 18, 2017 at 13:49 UTC | |
by haukex (Archbishop) on Jan 18, 2017 at 14:08 UTC | |
by soonix (Chancellor) on Jan 18, 2017 at 15:32 UTC | |
by LanX (Saint) on Jan 22, 2017 at 01:51 UTC |