Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Perl & modulus

by K_M_McMahon (Hermit)
on Feb 15, 2005 at 09:37 UTC ( [id://431078]=note: print w/replies, xml ) Need Help??


in reply to Perl & modulus

What kind of loop are you trying to perform?
This modulus loop runs, hope this gets you in the right direction:
my $i=99; while (($i%5)!=0) { print "$i not evenly divisible by 5.\n"; $i--; }

-Kevin
my $a='62696c6c77667269656e6440676d61696c2e636f6d'; while ($a=~m/(^.{2})/s) {print unpack('A',pack('H*',"$1"));$a=~s/^.{2}//s;}

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://431078]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2025-01-13 13:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (31 votes). Check out past polls.