On Jun 3, 2004, at 8:11 AM, Singh, Ajit p wrote:

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

I hope not. The second one is fine:

> perl -e 'print map { "[ $_ ]\n" } split /\//, "abcde/fghi"'
[ abcde ]
[ fghi ]

I suspect something else is going on you're not telling us about.

James


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