On Wed, Apr 25, 2001 at 07:20:22PM +0200, M.W. Koskamp ([EMAIL PROTECTED]) spew-ed 
forth:
[snip]
> 
> So does split(#.#, $ARGV[0]).
> Perl allows to use different delimiters for regular expressions, i case it
> helps to make the expressing more readable.
> Say i want to split on a backslash.
> That would be: split(/\\/, $tosplit);
> This can also be written as:
> split (#\\#, $tosplit) or split("\\", $tosplit).
> It makes things a bit more readable.

No. If you have 'split(#\\#,$tosplit)' you will get a syntax error. If you are
using a matching pattern (which split is doing) and you change the delimiter
from /PATTERN/ to #PATTERN# (or you change the // to anything else) you need
to do m#PATTERN# (add the 'm' for matching). 

Look back at the other emails in this thread.. split("\\", $tosplit) will not
work as you are thinking. m"\\" would be OK though.

Cheers,
Kevin

Writing CGI Applications with Perl - http://perlcgi-book.com
-- 
Jazz is not dead...it just smells funny. -- Beebop tango introduction
        -- Frank Zappa

Reply via email to