in reply to IF Statement Testing

Change your code as follows

if ($expire !~m#^(1|2|3|4|5|6|7|8|9|10|11|12|13|14)$#) { die "Don't tamper with me!"; }

Update:: Remove doubel "|" to single

Replies are listed 'Best First'.
Re^2: IF Statement Testing
by ikegami (Patriarch) on May 14, 2005 at 05:49 UTC

    Except it should be single "|"s in your regexp, not "||"s

    But why use a regexp at all?

    if ($expire < 1 || $expire > 14) { die "Don't tamper with me!"; }