Okies... yeah ..later I changed it to glob() and it worked, but I was little
bit concerned why it works with switch module. Nevertheless, I have had
wierd troubles with Switch module in past ...

Thanks
Madhur

On 12/28/06, Mumia W. <[EMAIL PROTECTED]> wrote:

On 12/28/2006 01:42 AM, Madhur Kashyap wrote:
> Hi there,
>
> Have a look at these two different implementations. IMPL2 works somehow.
> The
> problem I am facing is that the glob <$pat> does not return any value in
> IMPL1 but it returns in IMPL2. Can somebody tell what could be the
problem.
> [...]


Use strictures and warnings, and you'll probably see that <$pat> is
being interpreted as an attempt to read from a file. Use glob($pat)
instead.

The Switch module evidently installs a source filter that has some
strange effects on Perl code. I advise avoiding it.




Reply via email to