Re: Strange problem with glob <>
- From: physiologoius@xxxxxxxxx (Madhur Kashyap)
- Date: Thu, 28 Dec 2006 17:37:00 +0530
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. <mumia.w.18.spam+nospam@xxxxxxxxxxxxx> 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.
- References:
- Strange problem with glob <>
- From: "Madhur Kashyap"
- Re: Strange problem with glob <>
- From: Mumia W.
- Strange problem with glob <>
- Prev by Date: Re: Strange problem with glob <>
- Next by Date: Re: better way to skip first few lines of file read?
- Previous by thread: Re: Strange problem with glob <>
- Next by thread: click_button gives error on a existing button
- Index(es):