in reply to manipulating array

It sounds like you have one line in each array element. If so, your grep is filtering out all lines that have /A192*4/ in them. But from your results, I'm guessing you actually say /A192.*4/. /A192*4/ means zero or more 2's between a A19 and a 4, and none of your examples match that. /A192.*4/ means match zero or more of any characters (except a newline) between a A192 and a 4.

Instead, loop through your array, removing the column you don't want:

for my $line (@call) { # remove A192.*4 and following whitespace from the beginning of eac +h line $line =~ s/^A192.*4\s+//; }

Replies are listed 'Best First'.
Re^2: manipulating array
by pysome (Scribe) on Aug 23, 2007 at 06:57 UTC
    Try that:
    use strict; use warnings; my @call = ( 'A19284 hostname 07/09/07 moredata moredata', 'A19384 hostname 06/09/07 moredata moredata', 'A19234 hostname 07/08/07 moredata moredata', ); print "$_,$/" for map {s/^\w+\s//;$_} @call;