Re: Could [you] [please] tell me how to remove white spacees presentbetween delimiter[s]



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

.



Relevant Pages

  • RE: sniffer cable
    ... a small 4-port hub would do the trick. ... Why not just put 2 NIC's in your laptop ... This e-mail and any attachments may be confidential or legally privileged. ... should destroy the e-mail message and any attachments or copies, ...
    (Security-Basics)
  • How do i regularly update my free bsd
    ... African Palliative Care Association ... This e-mail message, including any attachments, is for the sole use of the ... If you are not the intended recipient, ...
    (freebsd-questions)
  • Re: PHP Programmers
    ... Thanks everyone for the responses. ... I am a programmer myself, however, I ... The content of this e-mail message and any attachments are confidential and ... email and destroy the message and its attachments. ...
    (php.general)
  • Re: Attached JPEG is stripped when sent to non-outlook user. Please help!!
    ... When you send an e-mail message with attachments to a recipient who is not ... using Microsoft Outlook, the attachments may be missing when the recipient ...
    (microsoft.public.outlook)
  • RE: nc help needed.
    ... This could be because port 139 is already bound to something else. ... as the NetBIOS protocol?? ... This e-mail, including attachments, is confidential and is ... This footnote also confirms that this e-mail message ...
    (Security-Basics)