in reply to Data manipulation confusion

hi there. You could just use the perl pattern matching to achieve this. it s very simple and easy. Just incorporate this below piece of code on your array.
@webserverlist = qw(server1:NY:3600 webserver1:NY:3600 server2:NY:3600 + server3:NY:3600 webserver4:NY:3600 server4:Boston:3600); foreach (@webserverlist) { if ( $_ =~ m/^web.*/ ) { push (@list, $_."\n" ); } } print @list;
this will get all the WEB*servers into the array @list. enjoy scripting......

Replies are listed 'Best First'.
Re^2: Data manipulation confusion
by ikegami (Patriarch) on Mar 11, 2010 at 05:38 UTC
    server2 and server3 are not in the output as they should be.

    Update: s/are in/are not in/