Hi,
here is my perl script.This script creates an array and is sorting it using the in-built sort function in perl.
#!/usr/local/bin/perl
my number=6;
my @num_arr=(1,2,3,4,5);
my @array=(23,"$number","Hello",2.345,@num_arr);
#printing the array
print "@array\n";
#sorting the array
my @sorted = sort @array;
print "Sorted : @sorted\n";
The output is an shown below:
23 6 Hello 2.345 1 2 3 4 5
Sorted : 1 2 2.345 23 3 4 5 6 Hello
Can anyone suggest why the sort function act differently?
With Regards
Dileep Pattayath