| and if the character isn't there.... | | @array(one1 two three1); | | I end up with | | one tw three @array = qw(one1 two1 three1); s/\d+$// for @array; print "@array"; -- Marcus | -----Original Message----- | From: John Edwards [mailto:[EMAIL PROTECTED]] | Sent: Thursday, August 23, 2001 4:49 PM | To: 'HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)' | Subject: RE: Strip charactes from every element in array | | | and if the character isn't there.... | | @array(one1 two three1); | | I end up with | | one tw three | | -----Original Message----- | From: HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1) | [mailto:[EMAIL PROTECTED]] | Sent: 23 August 2001 15:49 | To: 'John Edwards' | Subject: RE: 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); | 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] | | | | | --------------------------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]
RE: Strip charactes from every element in array
HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1) Thu, 23 Aug 2001 07:26:15 -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)
- HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)
