try

chomp(my @strm = split(/\s+/, $IntegrationStream));

as your only splitting on 1 space where 2 are present in your string.

-----Original Message-----
From: Sayed, Irfan (Irfan) [mailto:[EMAIL PROTECTED]
Sent: 30 October 2007 09:38
To: beginners @ perl. org
Subject: Split function


Hi All,
 
I have one variable which stores the value as follows.
 
"2007-09-07T12:50:26+05:30  aic_8.0_Integration  ccvob01" Now my
requirement is that I want to store aic_8.0_Integration part of the
string in different variable.
 
so what I did was I ran following code.
 
chomp(my @strm = split(/ /, $IntegrationStream)); where
$IntegrationStream stores the above string.
 
But the issue is that when I try to access $strm[1] , I am not getting
expected result. i.e. aic_8.0_Integration  
 
Can you please guide me how should I achieve this.
 
Regards
Irfan.
 
 
 
 
 
 
 


This e-mail is from the PA Group.  For more information, see
www.thepagroup.com.

This e-mail may contain confidential information.  Only the addressee is
permitted to read, copy, distribute or otherwise use this email or any
attachments.  If you have received it in error, please contact the sender
immediately.  Any opinion expressed in this e-mail is personal to the sender
and may not reflect the opinion of the PA Group.

Any e-mail reply to this address may be subject to interception or
monitoring for operational reasons or for lawful business practices.





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


Reply via email to