have a look at Split function:

http://www.perldoc.com/perl5.8.4/pod/func/split.html

sudhindra k s wrote:

Hi

I have a file with lines as shown below

//abc/... - //xyz/...
//abc1/... - //xyz1/...

Now i want to split the lines at "-" and get the string on the left in one array and 
the string on the right in another array.

ie: array1 = (//abc, //abc1) and array2 = (//xyz, //xyz1).

How do i do this?

Thanks
Sudhindra






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