in reply to Passing Variables to External Subroutines (Perl/Tk)

Oooh! Ohhh! I always wanted to say this ...

You shoud use strict.

Also you might not want to use the variable names $a and $b because of how sort works.
Update with Example:
Plankton@Chum_Bucket:~/perl/perlmonks> cat scritp.pl #!/usr/local/bin/perl use strict; require "ex.txt"; my $bb = "blue\n"; &numbers ( $bb ); Plankton@Chum_Bucket:~/perl/perlmonks> cat ex.txt sub numbers { my $v = shift; print "$v" } 1;

Plankton: 1% Evil, 99% Hot Gas.