marutcar has asked for the wisdom of the Perl Monks concerning the following question:
Perl Monks: Thanks You are the best. Obviously this is my intial forey into this. i had in my head what i wanted to do, but don't know how to accomplish.
This is working now on the data i want to manipulate. Thanks for putting me the right track.
Original Post
does this code look right. it exectutes but does not produce desired results. it changes all lines, although it is being told to look for object-group at $array[0] and the then make change if condition is met..Thanks
open (FILE, $ARGV[0]) or die("Error:'\n"); open(OUTPUT,">output.txt"); my $line; while ($line = <FILE>) { chomp($line); @array = split(" ", $line); for($array[0]=object-group) { print OUTPUT "set shared address-group $array[2]\n"; } } close (FILE); exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sanity check
by Corion (Patriarch) on Sep 20, 2011 at 20:21 UTC | |
|
Re: sanity check
by ikegami (Patriarch) on Sep 20, 2011 at 20:20 UTC | |
|
Re: sanity check
by cdarke (Prior) on Sep 21, 2011 at 05:56 UTC | |
|
Re: sanity check
by Jim (Curate) on Sep 20, 2011 at 21:09 UTC | |
by jwkrahn (Abbot) on Sep 21, 2011 at 00:21 UTC | |
by ww (Archbishop) on Sep 21, 2011 at 02:38 UTC | |
by jwkrahn (Abbot) on Sep 21, 2011 at 05:39 UTC | |
by BrowserUk (Patriarch) on Sep 21, 2011 at 03:12 UTC |