Path: utzoo!attcan!uunet!cs.utexas.edu!sun-barr!ccut!wnoc-tyo-news!sragwa!hxrdgw!ishii From: ishii@hexard.co.jp (Koji Ishii) Newsgroups: comp.lang.perl Subject: sort differs in PL#36 from PL#28? Message-ID: Date: 22 Oct 90 01:43:24 GMT Sender: ishii@hexard.co.jp Distribution: comp Organization: Hexard Inc., Tokyo, Japan. Lines: 37 sort in a packge is different. In PL#28, hxrdgw:~/unnews/test[21]% perl28 sorttest.pl 1 5 4 9 1 4 5 9(28) 1 5 4 9(36) But in PL#36 hxrdgw:~/unnews/test[22]% perl sorttest.pl 1 5 4 9 1 5 4 9(28) 1 4 5 9(36) Is this a feature or ??? sorttest.pl follows. #!/usr/bin/perl &sorttest( 1, 5, 4, 9 ); exit 0; package test; sub numerical28 { $main'a - $main'b; } sub numerical36 { $a - $b; } sub main'sorttest { local( @x ) = @_; print "@x\n"; local( @y ) = sort numerical28 @x; print "@y(28)\n"; local( @z ) = sort numerical36 @x; print "@z(36)\n"; } -- ---------------------------------- Koji Ishii Hexard Inc., Tokyo, Japan. JUNET: ishii@hexard.co.jp