[Omaha.pm] bug hunt

Andy Lester andy at petdance.com
Sun Jul 1 18:07:58 PDT 2007


On Jul 1, 2007, at 1:04 PM, Jay Hannah wrote:

> my $w1=$original_when;
> my $w1=~s/[\s:-]//;
>
>
>
> Jay asserts:
>
> That can't be right. The second line uses "my" again, which wipes out
> the assignment from the first line.

If the original code had been run under "use warnings", it would have  
put out this message:


"my" variable $w1 masks earlier declaration in same scope at foo line 2.
Use of uninitialized value in substitution (s///) at foo line 2.

--
Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance






More information about the Omaha-pm mailing list