use strict; use warnings; my %lookup = ( 1 => 567898, 2 => 543267, ); my @test = qw(0 a 2 1); for (@test) { print exists $lookup{$_} ? $lookup{$_} : $_, "\n"; } __END__ 0 a 543267 567898
In reply to Re: Convert a number to another number?
by toolic
in thread Convert a number to another number?
by fatfinger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |