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" <[EMAIL PROTECTED]>
Newsgroups: perl.beginners
To: <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
Website: http://www.tcs.com
----- Forwarded by Mayank Ahuja/CHN/TCS on 09/02/2005 09:16 PM -----

Chris Devers <[EMAIL PROTECTED]>
09/02/2005 09:03 PM
Please respond to
Perl Beginners List <beginners@perl.org>


To
[EMAIL PROTECTED]
cc
Perl Beginners List <beginners@perl.org>
Subject
Re: Could [you] [please] tell me how to remove white spacees
presentbetween  delimiter[s]






On Fri, 2 Sep 2005 [EMAIL PROTECTED] 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


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to