Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with Multiple Constraint

Status
Not open for further replies.

Heyman

ISP
Dec 15, 1999
14
US
I am trying to make an if statement to have multiple constraints.

Can it be done using perl??

I have so far:

$serial = `cut -d : -f 3 serial.txt`;

print ("$serial");
chomp ($serial);
if ($serial (>= 2000000) && (<= 2600000))
{
print (&quot;$serial is greater than 2000000 Woah!\n&quot;);
}

This didn't work anybody have any suggestions?
[sig][/sig]
 
if ($serial >= 2000000 && $serial <= 2600000)

above statement will evaluate true if $serial is between 2000000 and 2600000 (inclusive)
[sig]<p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top