| Is there any easy way to strip a single character from every | element in an | array? @array = qw(one1 two1 three1); chop @array; print "@array"; Hope this helps. -- Marcus | -----Original Message----- | From: John Edwards [mailto:[EMAIL PROTECTED]] | Sent: Thursday, August 23, 2001 4:45 PM | To: Perl Beginners (E-mail) | Subject: Strip charactes from every element in array | | | Is there any easy way to strip a single character from every | element in an | array? | | @array = qw(one1 two1 three1); | | And I need the elements to be (one two three). | | | My only idea is copy to another array, run a foreach, s/// | the char out and | push into another array, then after the foreach has finished | empty the first | array and replace with the fixed one. There must be a better | way, right.... | | John Edwards | IT Support | Runecraft Leeds | | Phone: 0113 2206317 | Fax: 0113 2206301 | Mobile: 07961 356186 | | | | --------------------------Confidentiality--------------------------. | This E-mail is confidential. It should not be read, copied, | disclosed or | used by any person other than the intended recipient. | Unauthorised use, | disclosure or copying by whatever medium is strictly | prohibited and may be | unlawful. If you have received this E-mail in error please | contact the | sender immediately and delete the E-mail from your system. | | | | -- | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Strip charactes from every element in array
HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1) Thu, 23 Aug 2001 07:23:18 -0700
- Strip charactes from every elemen... John Edwards
- Re: Strip charactes from eve... Luke Bakken
- RE: Strip charactes from eve... HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)
- RE: Strip charactes from eve... HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)