sagarkha has asked for the wisdom of the Perl Monks concerning the following question:
system("ping $_ >/root/scripts/log.txt"); The above code works for me in Linux But in windows, the simililar code does not work system("ping $_ >c:\temp\log.txt"); By using, single cotes, i can use it like system('ping 10.56.1.1 >c:\temp\log.txt'); But my scripts requires this command to be used in a loop, but this do +esn't permit to use scalar variable. system('ping $_ >c:\temp\log.txt'); So this command doesnt work
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Output redirection problem in Windows ActivePerl
by Corion (Patriarch) on Sep 20, 2010 at 12:15 UTC | |
|
Re: Output redirection problem in Windows ActivePerl
by cdarke (Prior) on Sep 20, 2010 at 15:28 UTC |