Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > Re: one liner f...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 7 Topic 11043 of 11532
Post > Topic >>

Re: one liner for for and if

by Uri Guttman <uri@[EMAIL PROTECTED] > May 9, 2008 at 03:56 AM

>>>>> "RD" == Rob Dixon <rob.dixon@[EMAIL PROTECTED]
> writes:

  RD> Richard Lee wrote:
  >> 
  >> print "$_\n" for @[EMAIL PROTECTED]
 last if "$_" eq q/three/;

  RD> And you want to write it in one line why?

  RD> print "$_\n" for grep /one/ .. /three/, @[EMAIL PROTECTED]
 the same as his (broken) code. that needs to know 'one' is the first
token in the array. his just is supposed to stop after it hits 'three'.

uri

-- 
Uri Guttman  ------  uri@[EMAIL PROTECTED]
  --------  http://www.sysarch.com
--
-----  Perl Code Review , Architecture, Development, Training, Sup****t
------
--------- Free Perl Training --- http://perlhunter.com/college.html
---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com
---------
 




 7 Posts in Topic:
one liner for for and if
rich.japh@[EMAIL PROTECTE  2008-05-08 18:25:55 
Re: one liner for for and if
anexpert@[EMAIL PROTECTED  2008-05-08 21:37:11 
Re: one liner for for and if
Uri Guttman <uri@[EMAI  2008-05-09 03:20:26 
Re: one liner for for and if
rob.dixon@[EMAIL PROTECTE  2008-05-09 04:29:21 
Re: one liner for for and if
rob.dixon@[EMAIL PROTECTE  2008-05-09 04:26:53 
Re: one liner for for and if
Uri Guttman <uri@[EMAI  2008-05-09 03:56:57 
Re: one liner for for and if
rich.japh@[EMAIL PROTECTE  2008-05-08 23:47:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 6:25:52 CDT 2008.