"Adam" <[EMAIL PROTECTED]> 在郵件 news:[EMAIL PROTECTED] 中撰寫... > Expected error message: "Global symbol "$b" requires explicit package name". > However, I get result: "test". > I've checked the special variables and it looks like $b is one of these. > > use warnings; > use strict; > zzz ($b); > print "$b\n"; > sub zzz{ > $_[0] = "test"; > } > > Does it mean - that in general - we should not use one character variables > in Perl? > thanks > adam >
It runs fine from my PC, but $a and $b are normally using for sorting array more then just lexcal sorting. @sorted = sort { $a <=> $b} @unsorted ; perldoc -f sort HTH, Bee