Re: Remembering Positions in Array after processing the element

2005-07-31 Thread Wijaya Edward
Dear John, Thanks so much for your snippet. It's been really really helpful. > I guess you didn't see Chris' posting. :-) I'm really sorry. Will try to be more attentive next time. --- Regards, Edward WIJAYA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

Re: Remembering Positions in Array after processing the element

2005-07-31 Thread Chris Charley
Hello John I don't feel very comfortable with some of the code I listed. I thought that using @i and @j was a way to avoid warnings (as originally proposed by Edward W.) when the array argument had bad data, but the same situation occurs even with my solution. I guess the question is how woul

Re: Remembering Positions in Array after processing the element

2005-07-31 Thread John W. Krahn
Wijaya Edward wrote: > Hi John, Hello, > I was testing your code below with this array: > > my @x = qw( * * A B C D ); > > but how come in the end it gives: > * XA * XB XC XD X > > instead of > * * XA XB XC XD I guess you didn't see Chris' posting. :-) $ perl -le' @x = qw( * * A B C D )

Re: Remembering Positions in Array after processing the element

2005-07-31 Thread Wijaya Edward
gt; Date: Monday, August 1, 2005 11:03 am Subject: Re: Remembering Positions in Array after processing the element > Chris Charley wrote: > > > >>> perl -le' > >> @x = qw( A B C * D ); > >> print @x . " @x"; > >> for ( reverse 0

Re: Remembering Positions in Array after processing the element

2005-07-31 Thread John W. Krahn
Chris Charley wrote: > > - Original Message - From: "John W. Krahn" <[EMAIL PROTECTED]> > >> Edward WIJAYA wrote: >> >>> I wanted to append two subsequent characters (non *) in >>> an array and then storing them into new array. >>> But then I also want to restore the '*' string in its >>>

Re: Remembering Positions in Array after processing the element

2005-07-31 Thread Chris Charley
- Original Message - From: "John W. Krahn" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "Perl Beginners" Sent: Friday, July 29, 2005 10:35 PM Subject: Re: Remembering Positions in Array after processing the element Edward WIJAYA wrote: Hi, Hello

Re: Remembering Positions in Array after processing the element

2005-07-29 Thread John W. Krahn
Edward WIJAYA wrote: > Hi, Hello, > I wanted to append two subsequent characters (non *) in > an array and then storing them into new array. > But then I also want to restore the '*' string in its > initial position in the new array result. Perhaps this will give you some ideas: > perl -le' @x