in reply to Re: passing regular expression
in thread passing regular expression

thank you, Is it possible to write a subroutine which can take regular expression like split function does.
@a = split(/ /,"this is a string");

Replies are listed 'Best First'.
Re^3: passing regular expression
by moritz (Cardinal) on Oct 09, 2009 at 08:53 UTC
    I don't think that's possible for non-builtin functions. If it is, it might work with a prototype, see perlsub.