.------[ Jerry Preston wrote (2003/01/22 at 11:59:14) ]------
|
| I am looking for a better way, a perl way for the following:
|
| foreach ( @data ) ) {
| s/^ //;
| $data_[ $jp++ ] = $_;
| }
|
`-------------------------------------------------
I'm assuming you are wanting to remove all entries in @data that
begin with a space, this will do it in one line:
@data = map( { if( $_ !~ s/^ //) { $_; } }, @data);
---------------------------------
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
---------------------------------
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]