On Thursday, November 13, 2003, at 02:37 PM, I wrote:

Hi! I'm writing a program, and I've reached a point where it makes (I think) to combine two lines into one. The two original lines are something like:
my $var = $hash{$val};
next unless (defined($var));


I'm thinking that it might make more sense (given the flow of the program at this point which is a large variety of 'next unless' statements) to write:
next unless my $val = $hash{$val};


However, I recall at a previous Boston.pm meeting there being a discussion about issues with 'my' in conditional clauses. I don't, however, remember the details. Is this usage of 'my' the one that causes the problem?

Thanks muchly to those who responded with the answer -- my code doesn't run into the problem...


Ricky

_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to