in reply to Re: Use of uninitialized value error
in thread Use of uninitialized value error

Variable should not put into double/single quote during assignment to another variable. Here last line should be ...

That's generally good advice, but it's sometimes wrong (sometimes forcing string interpolation of a regex capture is the safest approach) and it won't make a difference in this case.

Replies are listed 'Best First'.
Re^3: Use of uninitialized value error
by lidden (Curate) on Jul 05, 2011 at 14:28 UTC
    You do get a warning if you try to interpolate an undefined variable into a string, but not from assigning it to another variable.

    If that is good or bad in OPs case depends on if it is ok for the variable to be undefined or not.