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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"mod" operation in perl 1

Status
Not open for further replies.

EfratS

MIS
Aug 4, 2004
15
CA
Hello,

Does someone knows how can I implement the "mod" operation in perl?

meaning:
x= 5 mod 2
x = 1

thanks.
 
Hi,
Percent (%) symbol is what your looking for :
Code:
$x=5%2;
print "\n\$x value is $x";
Regards,
Zephan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top