Lennent has asked for the wisdom of the Perl Monks concerning the following question:
I want to achieve something along the lines of:#!/usr/bin/perl -w use warnings; sub test { my ($gil, $char) = @_; print ("you have $gil for $char."); } &test (925, "Mithos");
Does perl have a function for this or.. ?if ($gil != num){die "Gil should be a number.";} if ($char != string){die "Your characters name should consist of lette +rs only.";}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Checking for Number or String
by ikegami (Patriarch) on Nov 15, 2009 at 23:09 UTC | |
by Lennent (Initiate) on Nov 15, 2009 at 23:28 UTC | |
|
Re: Checking for Number or String
by biohisham (Priest) on Nov 15, 2009 at 23:10 UTC |