#!/usr/bin/perl

my $st1="'---'~^  '123P8888S01D'~^";
for(split(/\~\^/,$st1)) {
  $_ =~ s/\s//g;
  # Do something with your variable....
}


Is that what you're asking? I'm unsure

[EMAIL PROTECTED] wrote:

'---'~^  '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!




--
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