in reply to Sub Routine Malfunction
As perl can automatically transform string to integer.#!/usr/bin/perl my @list=(qw/zero one two three four five six seven eight nine/); print "give the input:"; my $in=<STDIN>; print "$list[$in]\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sub Routine Malfunction
by apl (Monsignor) on Aug 29, 2008 at 11:56 UTC | |
|
Re^2: Sub Routine Malfunction
by koolgirl (Hermit) on Aug 29, 2008 at 12:16 UTC |