(undef, $userid) = split(qr{(?:/|\\)}, $ENV{'REMOTE_USER'}); #### # Alternation with non-capturing clustering (?:foo) (undef, $userid) = split(qr{(?:/|\\)}, $ENV{'REMOTE_USER'}); # Alternation without clustering (undef, $userid) = split(qr{\\|/}, $ENV{'REMOTE_USER'}); # Character class including '\' and '/' (undef, $userid) = split(qr{[\\/]}, $ENV{'REMOTE_USER'});