in reply to Query on Perl system command
It looks like a quoting problem. It seems that you want to interpolate your variable $filename within your quoted string but interpolation does not happen within Perl's single quotes.
There are several possibilities, but one would be to use double quotes, then escape the double quotes and "\n" you are using:
system "echo -e \"$filename.txt\\n$filename.xls\\n\" | phylip";Also note that, on my system at least, I need the -e option to get backslash escapes to be interpreted.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Query on Perl system command
by Anonymous Monk on Mar 04, 2011 at 14:22 UTC | |
by Eliya (Vicar) on Mar 04, 2011 at 15:48 UTC | |
by Anonymous Monk on Mar 04, 2011 at 18:35 UTC |
In Section
Seekers of Perl Wisdom