B::Deparse tells perl to spit back what it parsed your code as, optionally adding parens which you may have omitted to make precedence clearer.
As for =~, it does say match against what's on the left hand side; the problem in this case is that what you had on the right hand side wasn't a simple m// so it was treated as an expression yielding a regexp object as if you'd used qr//. In other words, what you did was more:
$foo = /^#+/; # match against $_. a false '' since you never set $_ $bar = not $foo; # take the logical opposite, so always "1" $baz = qr/$bar/; # make a regep object from the contents matching "1" $one_line =~ m/$baz/; # returns true if $one_line has a 1
In reply to Re: Re: Re: Re: Re: Help with recurring "uninitialized variable" problem.
by Fletch
in thread Help with recurring "uninitialized variable" problem.
by C_T
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |