in reply to Bug in 'strict'??

You're using $2 without verifying the previous match truly matched. That's a "reject from code review" mistake in my book. Go back and ensure that the regex is matching.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: Re: Bug in 'strict'??
by Jouke (Curate) on Apr 05, 2001 at 16:53 UTC
    You're right merlyn but that's not the case here. I just reduced it to the minimum, and this DOES work without 'strict' and DOESN'T with 'strict'. I surely want to know why (and btw: it matches...)

    Jouke Visser, Perl 'Adept'
        IIRC
        $CGI::SL represents the path separator for the current OS
        I think you can also have $CGI::OS to identify the OS
        $CGI::SL is the value of the 'slash' (/ on unix, \\ on DOS, etcetera)...it is used to only find the last part of a file/path combination (the original filename)

        But I've tried if $localfilename gets a value at all. It does. If I print $localfilename after the assign statement, it perfectly represents what I want.
        But right at the moment 'open' is called, it loses it's value. And only when I use strict.

        Jouke Visser, Perl 'Adept'