in reply to matching white spaces in perl

Well, since any string either has white space at the beginning, or it is without white space at the beginning, the question as you ask it is just "how do I match any string".
/(?=)/

Will do that, but that's probably not what you want.

I could look at your example, but then I'd come up with the regexp:

/^ ?<result>$/
That would match the two strings mentioned in the example, and nothing else. Which may be what you want, but I doubt it.

You know, 98% of the regex questions can be solved by defining what you want - once you do that, the regexp follows easily.