xjlittle has asked for the wisdom of the Perl Monks concerning the following question:
Hi all
I have script that I need to write using data embedded in the application. Part of this data contains the string */. The * could represent several hundred entries that change on a daily basis.
Here is what I have (The array is longer than just the 1 element)
The real command looks like this:my @testqueue = (10.10.10.10); &pause; sub pause { my $pback = "/usr/sbin/cmd"; my $set = "pause queue"; while (@testqueue){ my $out = `$pback $set */$testqueue[0]`; print "$out"; shift @testqueue; } }
$cmd pause queue */10.10.10.10
Thanks for your help!
xj
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using */ with backticks in perl
by ikegami (Patriarch) on Feb 09, 2010 at 23:37 UTC | |
|
Re: Using */ with backticks in perl
by chromatic (Archbishop) on Feb 09, 2010 at 23:35 UTC | |
|
Re: Using */ with backticks in perl
by cdarke (Prior) on Feb 10, 2010 at 11:20 UTC | |
by JavaFan (Canon) on Feb 10, 2010 at 14:23 UTC |