On Tue, 2008-12-09 at 15:55 -0500, David Shere wrote:
> On Tue, 2008-12-09 at 15:51 -0500, Mr. Shawn H. Corey wrote:
> > print '', (split( /\./, $ipAddress ))[-1];
> 
> Thanks.  I was searching for about an hour before I posted here; I found
> an answer online a few minutes later:
> 
> http://www.perlmonks.org/?node_id=299283
> 
> Curious:  What's the '', for?  Scalar context?

So print won't that the first parenthesis as part of its function.  An
alternative is:

print ((split( /\./, $ipAddress ))[-1]);

See `perldoc -f print` for details.


-- 
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