On Tue, 2008-12-09 at 22:20 -0500, Mr. Shawn H. Corey wrote:
> On Wed, 2008-12-10 at 03:04 +0000, Rob Dixon wrote:
> > Mr. Shawn H. Corey wrote:
> > >
> > > print '', (split( /\./, $ipAddress ))[-1];
> > 
> > Ugly, ugly, ugly.
> > 
> OK, try:
> 
> print substr($ipAddress,rindex($ipAddress,'.')+1);

Or if you prefer:

print 
scalar(reverse(substr(reverse($ipAddress),0,index(reverse($ipAddress),'.'))));


-- 
Just my 0.00000002 million dollars worth,
  Shawn

The key to success is being too stupid to realize you can fail.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to