I'm trying to take user arguments into an array and print them into a while loop, can anyone help?
my @user_args = sort (@ARGV);
chomp(@user_args);
my $i = -1;
while (++$i <= $#ARGV)
{
print "$ARGV[$i] \n";
}
print "\nStep #2\n";
my @user_args2 = sort {$b cmp $a} @ARGV;
while (++$i <= $#ARGV)
{
print "@user_args2[$i] \n";
}
this is my updated code, I'm trying now to figure out how to sort it increasingly and decreasing based off of these arguments "Ask ask as How 100 "abc def" oK ok" please help!