in reply to Using If/Else

Calling with  sub vamp looks very wrong. Do a vamp()

Same for the other call.

You are basically redefining the sub again.

Please use strict and warnings to catch such problems earlier.

(Untested b/c I'm on mobile)

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

update

The next issue will be that the 2 case can never be reached because you'll always die before in the first else .

Consider using elsif

if ($choice==1) { ... } elsif ($choice==2) { ... } else { die "wrong choice $choice" }

See perlsyn#Compound-Statements