When I execute this I expect see 'five-@-four-@-one-@-three-@-two'
#!/usr/bin/perl use strict; use warnings; my@array = qw(one two three four five); print "The original array contains @array \n\n"; my$string = join ("-@-", sort@array); print "The string contains $string \n";
But why do I see? 'The string contains five-four-one-three-two'
In reply to Join function by truthseeker66
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |