rimmern has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to split strings that look like this - "Wed 24 May 2006 09:56:12 AM EDT kdelibs3-devel"
I used @info = split(/ /, $reversedpackages[$index]); but the last element in info is "EDT kdelibs3-devel" instead of being "kdelibs3-devel".
I got @reversedarray using rpm -qa --queryformat '%{INSTALLTIME}\t%{INSTALLTIME:date}\t%{NAME}\n' | sort -g | cut -f 2-
What am I doing wrong ?
Edited by planetscape - added code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Split not working
by bpphillips (Friar) on Jun 06, 2006 at 15:59 UTC | |
|
Re: Split not working
by swampyankee (Parson) on Jun 06, 2006 at 16:15 UTC | |
|
Re: Split not working
by socketdave (Curate) on Jun 06, 2006 at 16:06 UTC | |
|
Re: Split not working
by ambrus (Abbot) on Jun 06, 2006 at 17:56 UTC | |
|
Re: Split not working
by ptum (Priest) on Jun 06, 2006 at 16:02 UTC |