Re: confusion with splitting columns using [-n, -n] (e.g; my ( $country, $bytes ) = ( split )[ -2, -1 ])
- From: "jeevs" <jeevan.ingale@xxxxxxxxx>
- Date: 30 Jan 2007 01:48:41 -0800
On Jan 30, 1:49 pm, "jeevs" <jeevan.ing...@xxxxxxxxx> wrote:
On Jan 30, 1:21 pm, "jeevs" <jeevan.ing...@xxxxxxxxx> wrote:
-2 and -1 are the indexes used by split which tells -1 is the last(split)[-1,-2];
column selected by split in your case its the bytes column. and -2 is
the country column.To add more the syntax used that is
is nothing more than split used like
@arr = split (/ /,$string) ; ######## corrected line
and then later
accessing array with indexes i.e @arr[-1,-2];
.
- References:
- Prev by Date: Re: confusion with splitting columns using [-n, -n] (e.g; my ( $country, $bytes ) = ( split )[ -2, -1 ])
- Next by Date: Re: I don't know where to start with this one.
- Previous by thread: Re: confusion with splitting columns using [-n, -n] (e.g; my ( $country, $bytes ) = ( split )[ -2, -1 ])
- Next by thread: Re: confusion with splitting columns using [-n, -n] (e.g; my ( $country, $bytes ) = ( split )[ -2, -1 ])
- Index(es):