Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: next within one subroutine that looks to another subroutine

by dragonchild (Archbishop)
on Feb 13, 2002 at 19:40 UTC ( [id://145268]=note: print w/replies, xml ) Need Help??


in reply to next within one subroutine that looks to another subroutine

sub action { for my $i (@list) { my $rc = decide($i); next unless $rc; # Do stuff here with $rc } } sub decide { my $i = shift; return 0 if $i =~ /^C/; print $i, $/; }

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-16 18:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found