Al Hospers wrote:

> I need a regular expression that will only allow a variable to contain
> digits. it should fail if there is anything else in the variable:
> dollar signs, commas, dots, alphas, spaces, quotes etc. I thought the
> following would work, I am obviously incorrect.
> 
>  return 1 unless ($Bid_Amount =~ [/d/] );


if you're trying to return 'true' unless $Bid_Amount contains a 
non-digit, try this:

return 1 unless $Bid_Amount =~ /\D/;


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to