brant_chen has asked for the wisdom of the Perl Monks concerning the following question:
--------------------------------------#!/usr/bin/perl use warnings; #Chapter 3, Exercise 2 @name = qw / fred betty barney dino Wilma pebbles bamm-bamm /; @getnum = map {chomp; $_} <STDIN>; foreach $num(@getnum) { print "\nNo".$num."\tname:".$name[${num}-1]."\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Basic question:how to sort either numeric or alpha string?
by moritz (Cardinal) on Dec 09, 2008 at 09:22 UTC | |
Re: Basic question:how to sort either numeric or alpha string?
by ccn (Vicar) on Dec 09, 2008 at 09:15 UTC | |
Re: Basic question:how to sort either numeric or alpha string?
by hawtin (Prior) on Dec 09, 2008 at 12:28 UTC | |
by brant_chen (Initiate) on Dec 10, 2008 at 02:59 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |