Re: Could [you] [please] tell me how to remove white spacees presentbetween delimiter[s]
- From: adave@xxxxxxxxxxx (Abhishek Dave)
- Date: Thu, 22 Sep 2005 23:27:57 +0530
Hy,
If i under stand clearly try this my $s="'123P8888S01A'~^ '123P8888S01B'~^ '123P8888S01C'~^ '123P8888S01D'~^"; my @abhi=split(/ /,$s);
for ( my $i=0;$i<@abhi;$i++) {print $abhi[$i] . "\n"; }
Abhishek Dave
----- Original Message ----- From: "Mayank Ahuja" <mayank.ahuja@xxxxxxx>
Newsgroups: perl.beginners
To: <cdevers@xxxxxxxxx>
Sent: Friday, September 02, 2005 9:20 PM
Subject: Fw: Could [you] [please] tell me how to remove white spacees presentbetween delimiter[s]
'---'~^ '123P8888S01D'~^
here delimiter is ~^
'---'~^'123P9999S01D'~^
Do u see the difference in the two lines In the first one there is space is present i want to remove that one The second is ok.......... I think it will clear u in the better way.................
with regards
Mayank Ahuja Assistant System Engineer Tata Consultancy Services Limited Ph:- 044-55555816 Cell:- 9283199460 Mailto: mayank.ahuja@xxxxxxx Website: http://www.tcs.com ----- Forwarded by Mayank Ahuja/CHN/TCS on 09/02/2005 09:16 PM -----
Chris Devers <cdevers@xxxxxxxxx> 09/02/2005 09:03 PM Please respond to Perl Beginners List <beginners@xxxxxxxx>
To mayank.ahuja@xxxxxxx cc Perl Beginners List <beginners@xxxxxxxx> Subject Re: Could [you] [please] tell me how to remove white spacees presentbetween delimiter[s]
On Fri, 2 Sep 2005 mayank.ahuja@xxxxxxx wrote:
I have a file like this in which data is abc,def,xyz,mno,
means the delimter is comma here
but in the string if it comes abc, def, xyz, mno
then [please] tell me how to remove this white space.
The popular way to do this around here is with a Perl program.
Can you show the list the Perl program you've tried so far?
If you can, we can try to give you feedback.
Good luck!
-- Chris Devers
ForwardSourceID:NT00006BA2
Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
.
- References:
- Prev by Date: Regular expression in varaible
- Next by Date: Re: Regular expression in varaible
- Previous by thread: Re: Fw: Could [you] [please] tell me how to remove white spacees presentbetween delimiter[s]
- Next by thread: Re: test
- Index(es):
Relevant Pages
|