> -----Original Message-----
> From: Singh, Ajit p [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, June 03, 2004 3:11 PM
> To: Singh, Ajit p; [EMAIL PROTECTED]
> Subject: splitting with special characters
> 
> 
> Hello All,
> 
> I am trying to split a string with the / ( forward slash) as 
> the marker.
> 
> $mystring = "abcde/fghi"
> 
> split (///,$mystring)  -- gives me compile error
> split (/\//,$mystring)  -- gives me abcdefghi

Your syntax is ok.
split (/\//,$mystring) actually retuns an array.
In your case this array will be ('abcde', 'fghi').

use Data::Dumper;
my @array=split /\//,$mystring;
print Dumper [EMAIL PROTECTED];
#you did probably
#print @array;
#that's why you have seen abcdefghi ;)

José.


**** DISCLAIMER ****

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


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