Hi Singh,

Try this:

$mystring = "abcde/fghi";

@a = split (/\//, $mystring);
print "$a[0]\n";
print "$a[1]";


Regards,

Cristi Ocolisan

-----Original Message-----
From: Singh, Ajit p [mailto:[EMAIL PROTECTED] 
Sent: 3 iunie 2004 16:11
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

how do i specify / as the delimitter.

----------------------------------------------------------------------------
----------------

regards,

Ajitpal Singh,

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





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