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);
$ perl -le'
my $ipAddress = "23.34.45.56";
print $ipAddress =~ /([^.]+)$/;
'
56
John
--
Those people who think they know everything are a great
annoyance to those of us who do. -- Isaac Asimov
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/