RE: Split function



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:isayed@xxxxxxxxx]
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.




.



Relevant Pages

  • Re: Intel Memory Ordering White Paper
    ... "Code dependent upon sequential store ordering should not use the string ... rep movsb ... no it's worse than that -- intel fast string stores can become globally ... core could see the zeroes out of order with another core performing some ...
    (Linux-Kernel)
  • Re: Brook Mays Chapter 11
    ... string selection is comical They have like one 5 string set and one 6 ... I guess what I'm saying is, the stores here don't serve the PLAYERS anymore. ... the whole operation is geared towards bottom line ...
    (alt.guitar.bass)
  • Re: "Terms" in PHP
    ... >blog_id INT UNASIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, ... the unsigned integer type. ... varchar has a small overhead to store the length of the string that's ... but it only stores the data you put in it. ...
    (php.general)
  • Re: "Terms" in PHP
    ... > the unsigned integer type. ... > varchar has a small overhead to store the length of the string that's ... but it only stores the data you put in it. ... > will store a single character as a 100 character string. ...
    (php.general)
  • RE: parsing csv-file for inserting in database
    ... String found where operator expected at ./csv_auslesen.pl line 34, ... (Missing semicolon on previous line?) ... This e-mail may contain confidential information. ... Any opinion expressed in this e-mail is personal to the sender ...
    (perl.beginners)